1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Visualization with Julia

Exercise

Correlated ETF funds

In this coding exercise, you will explore the relationship between two popular ETF funds, the SPDR S&P 500 (SPY) and Invesco QQQ, by creating a scatter plot that displays the correlation between their traded volumes. So, let's begin!

Two DataFrames named spy and qqq, which hold the historical prices of said funds, have been loaded for you. The DataFrames and Plots packages have been imported and are available for use.

Instructions

100 XP
  • Generate a scatter plot representing the trading volume of SPY on the x-axis and that of QQQ on the y-axis, using a black regression line with linewidth set to 2.5 and markercolor set to pink; hide the legend.
  • Add the title "Correlation Between SPY & QQQ Traded Volumes" to the scatter plot.
  • Label the x-axis as "SPY Daily Traded Volume" and the y-axis as "QQQ Daily Traded Volume".