Session Ready
Exercise

Plotting moving averages

In this exercise, you will plot pre-computed moving averages of AAPL stock prices in distinct subplots.

  • The time series aapl is overlayed in black in each subplot for comparison.
  • The time series mean_30, mean_75, mean_125, and mean_250 have been computed for you (containing the windowed averages of the series aapl computed over windows of width 30 days, 75 days, 125 days, and 250 days respectively).
Instructions
100 XP
  • In the top left subplot, plot the 30-day moving averages series mean_30 in 'green'.
  • In the top right subplot, plot the 75-day moving averages series mean_75 in 'red'.
  • In the bottom left subplot, plot the 125-day moving averages series mean_125 in 'magenta'.
  • In the bottom right subplot, plot the 250-day moving averages series mean_250 in 'cyan'.