Session Ready
Exercise

Generating one-step-ahead predictions

It is very hard to forecast stock prices. Classic economics actually tells us that this should be impossible because of market clearing.

Your task in this exercise is to attempt the impossible and predict the Amazon stock price anyway.

In this exercise you will generate one-step-ahead predictions for the stock price as well as the uncertainty of these predictions.

A model has already been fitted to the Amazon data for you. The results object from this model is available in your environment as results.

Instructions
100 XP
  • Use the results object to make one-step-ahead predictions over the latest 30 days of data and assign the result to one_step_forecast.
  • Assign your mean predictions to mean_forecast using one of the attributes of the one_step_forecast object.
  • Extract the confidence intervals of your predictions from the one_step_forecast object and assign them to confidence_intervals.
  • Print your mean predictions.