BaşlayınÜcretsiz Başlayın

Fitting an ARIMA model

In this exercise you'll learn how to be lazy in time series modeling. Instead of taking the difference, modeling the difference and then integrating, you're just going to lets statsmodels do the hard work for you.

You'll repeat the same exercise that you did before, of forecasting the absolute values of the Amazon stocks dataset, but this time with an ARIMA model.

A subset of the stocks dataset is available in your environment as amazon and so is the ARIMA model class.

Bu egzersiz

ARIMA Models in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Create an ARIMA(2,1,2) model, using the ARIMA class, passing it the Amazon stocks data amazon.
  • Fit the model.
  • Make a forecast of mean values of the Amazon data for the next 10 time steps. Assign the result to arima_value_forecast.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create ARIMA(2,1,2) model
arima = ____

# Fit ARIMA model
arima_results = ____

# Make ARIMA forecast of next 10 values
arima_value_forecast = ____.____(steps=____).____

# Print forecast
print(arima_value_forecast)
Kodu Düzenle ve Çalıştır