ComeçarComece de graça

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 exercício faz parte do curso

Introduction to Data Visualization with Julia

Ver curso

Instruções do exercício

  • First, import the Plots.jl package.
  • Define the price_change columns for both funds by calculating the difference between the close and open prices.
  • Create a scatter plot of the price_change's for iwf (y-axis) versus iwm (x-axis).

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Import Plots.jl
____ ____

# Define price change
iwf[____, "____"] = iwf.____ - iwf.____
iwm[____, "____"] = iwm.____ - iwm.____

# Scatter plot of price changes
____(
	iwm.____,
	iwf.____
)
Editar e executar o código