Generating dynamic forecasts
Now lets move a little further into the future, to dynamic predictions. What if you wanted to predict the Amazon stock price, not just for tomorrow, but for next week or next month? This is where dynamical predictions come in.
Remember that in the video you learned how it is more difficult to make precise long-term forecasts because the shock terms add up. The further into the future the predictions go, the more uncertain. This is especially true with stock data and so you will likely find that your predictions in this exercise are not as precise as those in the last exercise.
Diese Übung ist Teil des Kurses
ARIMA Models in Python
Anleitung zur Übung
- Use the
resultsobject to make a dynamic predictions for the latest 30 days and assign the result todynamic_forecast. - Assign your predictions to a new variable called
mean_forecastusing one of the attributes of thedynamic_forecastobject. - Extract the confidence intervals of your predictions from the
dynamic_forecastobject and assign them to a new variableconfidence_intervals. - Print your mean predictions.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Generate predictions
dynamic_forecast = results.______(____=___, ____=____)
# Extract prediction mean
mean_forecast = ____.____
# Get confidence intervals of predictions
confidence_intervals = ____.____
# Select lower and upper confidence limits
lower_limits = confidence_intervals.loc[:,'lower close']
upper_limits = confidence_intervals.loc[:,'upper close']
# Print best estimate predictions
print(____)