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.
Este ejercicio forma parte del curso
Introduction to Data Visualization with Julia
Instrucciones del ejercicio
- 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).
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Import Plots.jl
____ ____
# Define price change
iwf[____, "____"] = iwf.____ - iwf.____
iwm[____, "____"] = iwm.____ - iwm.____
# Scatter plot of price changes
____(
iwm.____,
iwf.____
)