7 Fitting time series models

 

This chapter covers

  • Time series components and analysis
  • ARIMA models
  • Exponential smoothing models
  • Model evaluation and diagnostics
  • Forecasting

Transitioning from traditional models like linear and logistic regression and decision trees and random forests to time series analysis represents a shift from working with unordered data sets to analyzing sequential, time-ordered data where temporal patterns, such as trends and seasonality, may play a significant role. In many statistical methods, we often work with independent and identically distributed data, where predictions are made based on historical data without considering the order of the data points. However, in time series analysis, the temporal order of observations is crucial, as each data point may depend on prior values.

7.1 Distinguishing forecasts from predictions

7.2 Importing and plotting the data

7.2.1 Fetching financial data

7.2.2 Understanding the data

7.2.3 Plotting the data

7.3 Fitting an ARIMA model

7.3.1 Autoregression (AR) component

7.3.2 Integration (I) component

7.3.3 Moving average (MA) component

7.3.4 Combining ARIMA components

7.3.5 Stationarity

7.3.6 Differencing

7.3.7 Stationarity and differencing applied

7.3.8 AR and MA components

7.3.9 Fitting the model

7.3.10 Evaluating model fit

7.3.11 Forecasting

7.4 Fitting exponential smoothing models

7.4.1 Model structure

7.4.2 Applicability

7.4.3 Mathematical properties