Price changes
Scatter plots are an effective way of illustrating the relationship between two variables. In this exercise, you will examine the relationship between the daily price changes of two ETF funds: the iShares Russell 1000 Growth (IWF) and iShares Russell 2000 (IWM). There is a possibility of a relationship between the two as they both track the same type of index.
The CSV and DataFrames packages have been imported for you and the DataFrames iwf and iwm have been loaded and are available.
Questo esercizio fa parte del corso
Introduction to Data Visualization with Julia
Istruzioni dell'esercizio
- First, import the Plots.jl package.
- Define the
price_changecolumns for both funds by calculating the difference between thecloseandopenprices. - Create a scatter plot of the
price_change's foriwf(y-axis) versusiwm(x-axis).
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
# Import Plots.jl
____ ____
# Define price change
iwf[____, "____"] = iwf.____ - iwf.____
iwm[____, "____"] = iwm.____ - iwm.____
# Scatter plot of price changes
____(
iwm.____,
iwf.____
)