TimeSeries Analysis
Refresher reading access
Introduction
As financial analysts, we often use timeseries data to make investment decisions. A time series is a set of observations on a variable’s outcomes in different time periods: the quarterly sales for a particular company during the past five years, for example, or the daily returns on a traded security. In this reading, we explore the two chief uses of timeseries models: to explain the past and to predict the future of a time series. We also discuss how to estimate timeseries models, and we examine how a model describing a particular time series can change over time. The following two examples illustrate the kinds of questions we might want to ask about time series.
Suppose it is the beginning of 2020 and we are managing a USbased investment portfolio that includes Swiss stocks. Because the value of this portfolio would decrease if the Swiss franc depreciates with respect to the dollar, and vice versa, holding all else constant, we are considering whether to hedge the portfolio’s exposure to changes in the value of the franc. To help us in making this decision, we decide to model the time series of the franc/dollar exchange rate. Exhibit 1 shows monthly data on the franc/dollar exchange rate. The data are monthly averages of daily exchange rates. Has the exchange rate been more stable since 1987 than it was in previous years? Has the exchange rate shown a longterm trend? How can we best use past exchange rates to predict future exchange rates?
As another example, suppose it is the beginning of 2020. We cover retail stores for a sellside firm and want to predict retail sales for the coming year. Exhibit 2 shows monthly data on US retail sales. The data are not seasonally adjusted, hence the spikes around the holiday season at the turn of each year. Because the reported sales in the stores’ financial statements are not seasonally adjusted, we model seasonally unadjusted retail sales. How can we model the trend in retail sales? How can we adjust for the extreme seasonality reflected in the peaks and troughs occurring at regular intervals? How can we best use past retail sales to predict future retail sales?
Some fundamental questions arise in timeseries analysis: How do we model trends? How do we predict the future value of a time series based on its past values? How do we model seasonality? How do we choose among timeseries models? And how do we model changes in the variance of time series over time? We address each of these issues in this reading.
We first describe typical challenges in applying the linear regression model to timeseries data. We present linear and loglinear trend models, which describe, respectively, the value and the natural log of the value of a time series as a linear function of time. We then present autoregressive timeseries models—which explain the current value of a time series in terms of one or more lagged values of the series. Such models are among the most commonly used in investments, and the section addresses many related concepts and issues. We then turn our attention to random walks. Because such time series are not covariance stationary, they cannot be modeled using autoregressive models unless they can be transformed into stationary series. We therefore explore appropriate transformations and tests of stationarity. The subsequent sections address movingaverage timeseries models and discuss the problem of seasonality in time series and how to address it. We also cover autoregressive movingaverage models, a more complex alternative to autoregressive models. The last two topics are modeling changing variance of the error term in a time series and the consequences of regression of one time series on another when one or both time series may not be covariance stationary.
Learning Outcomes

calculate and evaluate the predicted trend value for a time series, modeled as either a linear trend or a loglinear trend, given the estimated trend coefficients;

describe factors that determine whether a linear or a loglinear trend should be used with a particular time series and evaluate limitations of trend models;

explain the requirement for a time series to be covariance stationary and describe the significance of a series that is not stationary;

describe the structure of an autoregressive (AR) model of order p and calculate one and twoperiodahead forecasts given the estimated coefficients;

explain how autocorrelations of the residuals can be used to test whether the autoregressive model fits the time series;

explain mean reversion and calculate a meanreverting level;

contrast insample and outofsample forecasts and compare the forecasting accuracy of different timeseries models based on the root mean squared error criterion;

explain the instability of coefficients of timeseries models;

describe characteristics of random walk processes and contrast them to covariance stationary processes;

describe implications of unit roots for timeseries analysis, explain when unit roots are likely to occur and how to test for them, and demonstrate how a time series with a unit root can be transformed so it can be analyzed with an AR model;

describe the steps of the unit root test for nonstationarity and explain the relation of the test to autoregressive timeseries models;

explain how to test and correct for seasonality in a timeseries model and calculate and interpret a forecasted value using an AR model with a seasonal lag;

explain autoregressive conditional heteroskedasticity (ARCH) and describe how ARCH models can be applied to predict the variance of a time series;

explain how timeseries variables should be analyzed for nonstationarity and/or cointegration before use in a linear regression; and

determine an appropriate timeseries model to analyze a given investment problem and justify that choice.
Summary

The predicted trend value of a time series in period t is b ‸ 0 + b ‸ 1 t in a linear trend model; the predicted trend value of a time series in a loglinear trend model is e b ‸ 0 + b ‸ 1 t .

Time series that tend to grow by a constant amount from period to period should be modeled by linear trend models, whereas time series that tend to grow at a constant rate should be modeled by loglinear trend models.

Trend models often do not completely capture the behavior of a time series, as indicated by serial correlation of the error term. If the Durbin–Watson statistic from a trend model differs significantly from 2, indicating serial correlation, we need to build a different kind of model.

An autoregressive model of order p, denoted AR(p), uses p lags of a time series to predict its current value: xt = b 0 + b 1 xt −1 + b 2 xt −2 + . . . + bpxt – p + ε t .

A time series is covariance stationary if the following three conditions are satisfied: First, the expected value of the time series must be constant and finite in all periods. Second, the variance of the time series must be constant and finite in all periods. Third, the covariance of the time series with itself for a fixed number of periods in the past or future must be constant and finite in all periods. Inspection of a nonstationary timeseries plot may reveal an upward or downward trend (nonconstant mean) and/or nonconstant variance. The use of linear regression to estimate an autoregressive timeseries model is not valid unless the time series is covariance stationary.

For a specific autoregressive model to be a good fit to the data, the autocorrelations of the error term should be 0 at all lags.

A time series is mean reverting if it tends to fall when its level is above its longrun mean and rise when its level is below its longrun mean. If a time series is covariance stationary, then it will be mean reverting.

The oneperiodahead forecast of a variable xt from an AR(1) model made in period t for period t + 1 is x ‸ t + 1 = b ‸ 0 + b ‸ 1 x t . This forecast can be used to create the twoperiodahead forecast from the model made in period t, x ‸ t + 2 = b ‸ 0 + b ‸ 1 x t + 1 . Similar results hold for AR(p) models.

Insample forecasts are the insample predicted values from the estimated timeseries model. Outofsample forecasts are the forecasts made from the estimated timeseries model for a time period different from the one for which the model was estimated. Outofsample forecasts are usually more valuable in evaluating the forecasting performance of a timeseries model than are insample forecasts. The root mean squared error (RMSE), defined as the square root of the average squared forecast error, is a criterion for comparing the forecast accuracy of different timeseries models; a smaller RMSE implies greater forecast accuracy.

Just as in regression models, the coefficients in timeseries models are often unstable across different sample periods. In selecting a sample period for estimating a timeseries model, we should seek to assure ourselves that the time series was stationary in the sample period.

A random walk is a time series in which the value of the series in one period is the value of the series in the previous period plus an unpredictable random error. If the time series is a random walk, it is not covariance stationary. A random walk with drift is a random walk with a nonzero intercept term. All random walks have unit roots. If a time series has a unit root, then it will not be covariance stationary.

If a time series has a unit root, we can sometimes transform the time series into one that is covariance stationary by firstdifferencing the time series; we may then be able to estimate an autoregressive model for the firstdifferenced series.

An nperiod moving average of the current and past (n − 1) values of a time series, xt , is calculated as [xt + xt −1 + . . . + xt −( n −1)]/n.

A movingaverage model of order q, denoted MA(q), uses q lags of a random error term to predict its current value.

The order q of a movingaverage model can be determined using the fact that if a time series is a movingaverage time series of order q, its first q autocorrelations are nonzero while autocorrelations beyond the first q are zero.

The autocorrelations of most autoregressive time series start large and decline gradually, whereas the autocorrelations of an MA(q) time series suddenly drop to 0 after the first q autocorrelations. This helps in distinguishing between autoregressive and movingaverage time series.

If the error term of a timeseries model shows significant serial correlation at seasonal lags, the time series has significant seasonality. This seasonality can often be modeled by including a seasonal lag in the model, such as adding a term lagged four quarters to an AR(1) model on quarterly observations.

The forecast made in time t for time t + 1 using a quarterly AR(1) model with a seasonal lag would be x t + 1 = b ‸ 0 + b ‸ 1 x t + b ‸ 2 x t − 3 .

ARMA models have several limitations: The parameters in ARMA models can be very unstable; determining the AR and MA order of the model can be difficult; and even with their additional complexity, ARMA models may not forecast well.

The variance of the error in a timeseries model sometimes depends on the variance of previous errors, representing autoregressive conditional heteroskedasticity (ARCH). Analysts can test for firstorder ARCH in a timeseries model by regressing the squared residual on the squared residual from the previous period. If the coefficient on the squared residual is statistically significant, the timeseries model has ARCH(1) errors.

If a timeseries model has ARCH(1) errors, then the variance of the errors in period t + 1 can be predicted in period t using the formula σ ‸ t + 1 2 = a ‸ 0 + a ‸ 1 ε ‸ t 2 .

If linear regression is used to model the relationship between two time series, a test should be performed to determine whether either time series has a unit root:

If neither of the time series has a unit root, then we can safely use linear regression.

If one of the two time series has a unit root, then we should not use linear regression.

If both time series have a unit root and the time series are cointegrated, we may safely use linear regression; however, if they are not cointegrated, we should not use linear regression. The (Engle–Granger) Dickey–Fuller test can be used to determine whether time series are cointegrated.

3 PL Credit
If you are a CFA Institute member don’t forget to record Professional Learning (PL) credit from reading this article.