LM05 Time Series IFT Notes
LM05 Time Series IFT Notes
1. Introduction ...........................................................................................................................................................2
1.1 Challenges of Working with Time Series ...........................................................................................2
2. Linear Trend Models ..........................................................................................................................................3
3. Log-Linear Trend Models .................................................................................................................................5
4. Trend Models and Testing for Correlated Errors....................................................................................8
5. AR Time-Series Models and Covariance-Stationary Series .................................................................8
5.1 Covariance-Stationary Series..................................................................................................................9
6. Detecting Serially Correlated Errors in an AR Model ............................................................................9
7. Mean Reversion and Multiperiod Forecasts .......................................................................................... 11
7.1 Multiperiod Forecasts and the Chain Rule of Forecasting........................................................ 11
8. Comparing Forecast Model Performance................................................................................................ 12
9. Instability of Regression Coefficients ....................................................................................................... 12
10. Random Walks ................................................................................................................................................ 13
11. The Unit Root Test of Nonstationarity ................................................................................................... 15
12. Moving Average Time-Series Models ..................................................................................................... 18
12.1 Smoothing Past Values with an n-Period Moving Average ................................................... 18
12.2 Moving-Average Time-Series Models for Forecasting ............................................................ 19
13. Seasonality in Time-Series Models.......................................................................................................... 19
14. Moving Average and ARCH Models ......................................................................................................... 21
14.1 Autoregressive Conditional Heteroskedasticity Models .............................................................. 21
15. Regressions with More Than One Time Series ................................................................................... 22
16. Other Issues in Time Series ........................................................................................................................ 23
16.1 Suggested Steps in Time-Series Forecasting ............................................................................... 23
Summary................................................................................................................................................................... 26
This document should be read in conjunction with the corresponding learning module in the 2024
Level II CFA® Program curriculum. Some of the graphs, charts, tables, examples, and figures are
copyright 2023, CFA Institute. Reproduced and republished with permission from CFA Institute. All
rights reserved.
Required disclaimer: CFA Institute does not endorse, promote, or warrant the accuracy or quality of
the products or services offered by IFT. CFA Institute, CFA®, and Chartered Financial Analyst® are
trademarks owned by CFA Institute.
Version 1.0
1. Introduction
A time series is a set of observations on a variable’s outcomes in different time periods.
There are two main uses of time-series models:
• to explain the past.
• to predict the future of a time series.
For example, the figure below shows the monthly inflation-adjusted U.S. retail sales data.
This is a time series data which can be used to predict future retail sales.
Figure: Monthly U.S. retail Sales
This is Figure 2 in the curriculum.
We can see that the error terms are correlated. When the previous error term is positive the
next error term is also most likely positive and vice versa. Similarly, we can also see that the
mean is changing over time (trending upwards).
In such cases, before analyzing the time-series, we must either transform the time series or
specify the regression model differently, so that the regression assumptions are met. We will
cover these concepts in detail over the next few sections.
The analyst finds that the estimated intercept is statistically significant. However, the trend
coefficient is not statistically significant. Determine if inflation has been increasing or
decreasing during the period 1995-2013, and calculate the predicted value of inflation in
period 1 and period 228.
Solution:
The regression equation is given by:
ŷt = 2.8853 − 0.0038(t)
Predicted value of inflation in period 1:
From the fitted trend line which is slightly downward sloping, the analyst concludes that
inflation declined at a rate of about 38 basis points per month during the sample period.
However, the decline is not statistically significant from zero. Also, the R2 of this model is
quite low. The model explains only 0.33 percent of the variation of monthly inflation. This
indicates that inflation forecasts from this model are not very useful.
Durbin-Watson 0.32
Examine the trend line and determine if the model is appropriate to predict future sales.
Solution:
Looking at the fitted trend line, we can make the following observations:
Sales are persistently above the trend line between 1995 to 1998, 2007 to 2009, and after
2012.
Sales are persistently below the trend line between 1996 to 2006.
Since the sales are persistently above or below the trend line, the residuals will also be above
or below the fitted line. This violates the regression assumption that residuals (regression
errors) are not correlated across observations. We can conclude that the linear trend model
is not a right choice to model Starbuck’s quarterly sales time series.
Therefore, to satisfy the conditions of linear regression, we may need to transform the time
series. Log-linear trend models work well in fitting a time series with exponential growth
(constant growth at a particular rate).
The equation for the log-linear trend model is:
ln yt = b0 + b1t, where t = 1, 2, …, T
Example:
Say we have a log-linear trend model with b0 = 0.5 and b1 = 0.7. What is the predicted value
of Y when t = 10?
Solution:
ln y10 = 0.5 + 0.7(10) = 7.5
y10 = e7.5 = 1808
The fitted trend line for natural log of Starbuck’s quarterly sales is shown below.
Figure Natural log of Starbuck Quarterly Sales
This is figure 8 in the curriculum
Comment on if this is a better forecasting model than the linear trend model? Forecast
Starbuck’s quarterly sales for the first quarter of 2014.
Solution:
The log sales are not above or below the trend line for long periods of time. The trend line
fits the natural log of Starbuck’s sales. So, the shortcoming of the linear trend model as seen
in Example 2 has been addressed here.
First quarter of 2014 is period t = 77
In the equation, ln yt = b0 + b1 t + εt , with t = 77 and εt = 0, we get:
ln (yt) = 5.1304 + 0.0464 (77) = 8.7032
Predicted sales yt = e8.7032 = $6,022.15 million
1
Standard error for each of the correlations = = 0.1302
√T
Since the absolute value of none of the t-stats for the first four autocorrelations is greater
than 2, we fail to reject the null hypothesis that the autocorrelations equal 0. Hence, we
can conclude that the residuals are not serially correlated and the model is correctly
specified.
3. Intel’s gross margin in next period = 0.1795 + 0.7499 (0.65) = 66.69 percent
Example:
Say you are given the following AR(1) model: xt = 1 + 0.8 xt−1 + εt . Calculate the mean-
reverting level.
Solution:
1
Mean-reverting level = 1−0.8 = 5
x̂t+1 = 1 + 0.8(10) = 9
x̂t+2 = 1 + 0.8(9) = 8.2
Note: Due to the instability of regression coefficients, AR models are generally suitable for
short term forecasting. Predictions too far ahead may not be meaningful.
If the original series is a random walk, then the first-differenced series will yield b0 = 0 and
b1 = 0, and the error terms will not be serially correlated. The first differenced variable yt will
b
be covariance stationary. The mean reverting level of the first-differenced model is: 1− 0b =
1
0
= 0.
1
Solution:
From the regression output, it appears that the yen/US dollar exchange rate is a random
walk because the intercept is not significantly different from 0 and the estimated coefficient
on the first lag of exchange rate is close to 1. We cannot use the t-stats to confirm the
statistical significance because the standard errors in a random walk are invalid.
To test if it is a random-walk, we must first transform the data by first-differencing it and
check if yt = xt − xt−1 is covariance stationary. The results of regression yt = b0 + b1yt–1 + εt are
presented below. If the exchange rate is a random walk, then b0 = 0 and b1 = 0 and the error
term will not be serially correlated.
Regression Statistics
R-squared 0.0026
Standard error 4.9611
Observations 408
Durbin-Watson 2.0010
So, he creates a new series that is the first difference of the log of AstraZeneca’s quarterly
sales.
The analyst models the new series using an AR (1) model: ln(Salest ) − ln(Salest−1 ) = b0 +
b1 [ln (Salest−1 ) − ln (Salest−2 )] + εt . The results of the regression are presented below.
Comment if the model is specified correctly. Predict AstraZeneca’s sales for the first quarter
of 2012 if AstraZeneca’s sales were $8,405 million and $8,872 million in the third and fourth
quarter of 2011 respectively.
Regression Statistics
R-squared 0.3005
Standard error 0.0475
Observations 48
Durbin-Watson 1.6874
Solution:
Let us first analyze the regression results:
1. Define the null hypothesis: the autocorrelations are not significantly different from zero.
2. Compute the critical tc value at the 0.05 significance level for 46 degrees of freedom. It is
2.
3. The intercept and the coefficient on the first lag of the first-differenced series are
statistically significant.
4. The absolute value of the t-stats for the four autocorrelations does not have a value
greater than 2. Hence, we fail to reject the null hypothesis that each of the
autocorrelations is equal to 0. We can conclude that there is no significant
autocorrelation in the residuals.
The model is correctly specified and the estimates can be used to predict AstraZeneca’s sales.
AstraZeneca’s sales in first quarter of 2012: 𝑦̂𝑡+1 = 0.0222 − 0.5493 𝑦𝑡
First, we will compute yt using yt = ln(Salest ) − ln(Salest−1 )
yt = ln 8872 − ln 8405 = 0.0541
ŷt+1 = 0.0222 − 0.5493 ∗ 0.0541 = −0.0075
ŷt+1 = ln Salest+1 − ln Salest = ln(Salest+1 /Sales_t) = -0.0075
Salest+1 = 𝑆𝑎𝑙𝑒𝑠𝑡 ∗ e−0.0075 = $8,805 million
AstraZeneca’s sales in the first quarter of 2012 would be $8,805 million.
The moving average smooths out the monthly fluctuations in oil prices to show the longer-
term movements. However, the weakness of moving average is that it always lags large
movements in the actual data. For example, when oil prices rose quickly in late 2007, the
moving average rose gradually. Similarly, when oil prices fell sharply in 2008, the moving
average fell gradually. Thus, moving average time series models may not be the best
predictor of the future.
12.2 Moving-Average Time-Series Models for Forecasting
To improve a moving average model, instead of assigning equal weights to all observations,
different weights can be assigned to different observations. For example, more weights can
be assigned to the more recent observations.
A moving-average model of order 1, or simply an MA(1) model, means that the any value xt is
correlated with xt−1 and xt+1 but with no other time-series values. Thus, we can say that an
MA(1) model has a memory of only one period. All autocorrelations except for the first will
be equal to 0 in an MA(1) model.
For an MA(q) model, the first q autocorrelations will be significantly different from 0, and all
autocorrelations beyond that will be equal to 0. Thus, a MA(q) model has a memory of q
periods.
The autocorrelations give us the best clue in whether it is suitable to use a moving-average
time series model. For AR models, the autocorrelations will start large and gradually decline.
Whereas, for MA(q) models, the first q autocorrelations will be relatively large and suddenly
drop to 0 beyond q. However, most time series are best modelled with an AR model.
difference data. The equation is: (ln Salest − ln Salest−1) = b0 + b1(ln Salest−1 − ln Salest−2) +
εt. The sample period is from Jan. 1995 to Dec. 2012. Given the results of the regression
below, determine if the time series exhibits seasonality and correct it.
Also, compute this quarter’s sales if last quarter sales grew by 1 percent and by 2 percent
four quarters ago.
Regression Statistics
R-squared 0.1548
Standard error 0.0762
Observations 74
Durbin-Watson 1.9165
Solution:
Test for seasonality:
1. The null hypothesis is that none of the autocorrelations are significantly different from 0.
2. The critical t value at the 0.05 significance level for 68 observations and two degrees of
freedom is 2.
3. The fourth autocorrelation has a t-statistic of 6.6981. Since it is greater than the critical
value, we can reject the null hypothesis that it is equal to zero. We can conclude that the
model shows significant seasonal autocorrelation and is not correctly specified.
Correct for seasonality:
The model is corrected for seasonality by including a seasonal lag to the equation:
(ln Salest − ln Salest−1) = b0 + b1 (ln Salest−1 − ln Salest−2) + b2(ln Salest−4 − ln Salest−5) + εt.
The results of this regression are presented below:
Regression Statistics
R-squared 0.8163
Standard error 0.03405
Observations 71
Durbin-Watson 2.0791
The two time series are not cointegrated and the regression between the time series
is spurious.
4. If the test rejects the null hypothesis that the error term has a unit root, then we can
conclude that the error term in the regression is covariance stationary. The two series
are cointegrated, and the standard errors of linear regression will be consistent.
However, we must proceed with caution because the regression coefficients
represent the long-term relationship between the variables and may not be useful for
short-term forecasts.
3. If you find no significant seasonality or shift in the time series, then perhaps either a
linear trend or an exponential trend will be sufficient to model the time series. In that
case, take the following steps:
• Determine whether a linear or exponential trend seems most reasonable (usually by
plotting the series).
• Estimate the trend.
• Compute the residuals.
• Use the Durbin–Watson statistic to determine whether the residuals have significant
serial correlation. If you find no significant serial correlation in the residuals, then the
trend model is sufficient to capture the dynamics of the time series and you can use
that model for forecasting.
4. If you find significant serial correlation in the residuals from the trend model, use a more
complex model, such as an autoregressive model. First, however, reexamine whether the
time series is covariance stationary. Following is a list of violations of stationarity, along
with potential methods to adjust the time series to make it covariance stationary:
• If the time series has a linear trend, first-difference the time series.
• If the time series has an exponential trend, take the natural log of the time series and
then first-difference it.
• If the time series shifts significantly during the sample period, estimate different
time-series models before and after the shift.
• If the time series has significant seasonality, include seasonal lags (discussed in Step
7).
5. After you have successfully transformed a raw time series into a covariance-stationary
time series, you can usually model the transformed series with a short autoregression. To
decide which autoregressive model to use, take the following steps:
• Estimate an AR(1) model.
• Test to see whether the residuals from this model have significant serial correlation.
• If you find no significant serial correlation in the residuals, you can use the AR(1)
model to forecast.
6. If you find significant serial correlation in the residuals, use an AR(2) model and test for
significant serial correlation of the residuals of the AR(2) model.
• If you find no significant serial correlation, use the AR(2) model.
• If you find significant serial correlation of the residuals, keep increasing the order of
the AR model until the residual serial correlation is no longer significant.
7. Your next move is to check for seasonality. You can use one of two approaches:
• Graph the data and check for regular seasonal patterns.
• Examine the data to see whether the seasonal autocorrelations of the residuals from
an AR model are significant (for example, the fourth autocorrelation for quarterly
data) and whether the autocorrelations before and after the seasonal
autocorrelations are significant. To correct for seasonality, add seasonal lags to your
AR model. For example, if you are using quarterly data, you might add the fourth lag
of a time series as an additional variable in an AR(1) or an AR(2) model.
8. Next, test whether the residuals have autoregressive conditional heteroskedasticity. To
test for ARCH(1), for example, do the following:
• Regress the squared residual from your time-series model on a lagged value of the
squared residual.
• Test whether the coefficient on the squared lagged residual differs significantly from
0.
• If the coefficient on the squared lagged residual does not differ significantly from 0,
the residuals do not display ARCH and you can rely on the standard errors from your
time-series estimates.
• If the coefficient on the squared lagged residual does differ significantly from 0, use
generalized least squares or other methods to correct for ARCH.
9. Finally, you may also want to perform tests of the model’s out-of-sample forecasting
performance to see how the model’s out-of-sample performance compares to its in-
sample performance.
Using these steps in sequence, you can be reasonably sure that your model is correctly
specified.
Summary
LO: Calculate and evaluate the predicted trend value for a time series, modeled as
either a linear trend or a log- linear trend, given the estimated trend coefficients.
A time series is a set of observations on a variable measured over different time periods. A
time series model allows us to make predictions about the future values of a variable.
LO: Describe factors that determine whether a linear or a log- linear trend should be
used with a particular time series and evaluate limitations of trend models.
When the dependent variable changes at a constant amount with time, a linear trend model
is used. When the dependent variable changes at a constant rate (grows exponentially), a
log-linear trend model is used.
The linear trend equation is given by yt = b0 + b1 t + εt , t = 1, 2, … , T
The log-liner trend equation is given by ln yt = b0 + b1t, t = 1, 2, …, T
A limitation of trend models is that by nature they tend to exhibit serial correlation in errors.
To overcome this, we use autoregressive time series models for forecasting the time series.
LO: Explain the requirement for a time series to be covariance stationary and describe
the significance of a series that is not stationary.
A time-series is covariance stationary if it meets the following three conditions:
• The expected value of the time series (its mean) must be constant and finite in all
periods.
• The variance must be constant and finite in all periods
• The covariance of time series, past or future must also be constant and finite in all
periods.
AR models can only be used for time series that are covariance stationary.
LO: Describe the structure of an autoregressive (AR) model of order p and calculate
one- and two- period- ahead forecasts given the estimated coefficients.
An autoregressive time series model is a linear model that predicts its current value using its
most recent past value as the independent variable. They are denoted by AR(p), a general
equation is shown below.
xt = b0 + b1 x(t–1) + b2 x(t–2) + … + bp x(t– p) + εt
The chain rule of forecasting is used to predict successive forecasts. The one-period forecast
of xt from an AR(1) model is x̂t+1 = b̂0 + b̂1 xt
xt+1 can be used to forecast xt+2 ∶ x̂t+2 = b̂0 + b̂1 xt+1
LO: Explain how autocorrelations of the residuals can be used to test whether the
autoregressive model fits the time series.
• The autocorrelations of residuals are the correlations of the residuals with their own past
values. The autocorrelation between one residual and another one at lag k is known as
the kth order autocorrelation.
• If the model is correctly specified, the autocorrelation at all lags must be equal to 0. A t-
test is used to test whether the error terms in a time series are serially correlated.
residual autocorrelation
Test stat = standard error
LO: Contrast in- sample and out- of- sample forecasts and compare the forecasting
accuracy of different time- series models based on the root mean squared error
criterion.
In-sample forecasts are the in-sample predicted values from the estimated time-series
model. Out-of-sample forecasts are forecasts made from the estimated time-series model for
a time period different from the one for which the model was estimated. Root mean squared
error (RMSE), square root of the average squared error, is used to compare the out-of-
sample forecasting performance of the models.
LO: Explain the instability of coefficients of time- series models.
If the time-series coefficient estimates change substantially across different time periods,
then they are said to be instable. They may be different for shorter and longer sample
periods.
LO: Describe characteristics of random walk processes and contrast them to
covariance stationary processes.
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. The equation for a
random walk is given below:
xt = xt−1 + εt , where b0 = 0 and b1 = 1
They do not have a mean reverting level.
LO: Describe implications of unit roots for time- series 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.
• For an AR (1) model to be covariance stationary, the absolute value of the lag coefficient
b1 must be less than 1. When the absolute value of b1 is 1, the time series is said to have a
unit root.
• All random walks have unit roots. If the time series has a unit root, then it will not be
covariance stationary.
• A random-walk time series can be transformed into one that is covariance stationary by
first differencing the time series.
yt = xt − xt−1 = εt , where E(εt ) = 0, E(ε2t ) = σ2 , E(εt εs ) = 0 if t ≠ s
LO: Describe the steps of the unit root test for nonstationarity and explain the relation
of the test to autoregressive time- series models.
We can detect the unit root problem by using the Dickey-Fuller test.
LO: Explain how to test and correct for seasonality in a time- series model and
calculate and interpret a forecasted value using an AR model with a seasonal lag.
If the error term of a time-series model shows significant serial correlation at seasonal lags,
the time-series has significant seasonality. Seasonality can be corrected by including a
seasonal lag in the model. For instance, to correct seasonality in the quarterly time series,
modify the AR (1) model to:
xt = b0 + b1 x(t–1) + b2 x(t−4) + εt
LO: Explain autoregressive conditional heteroskedasticity (ARCH) and describe how
ARCH models can be applied to predict the variance of a time series.
If the variance of the error in a time series depends on the variance of the previous errors
than this condition is called autoregressive conditional heteroskedasticity (ARCH).
If a time-series model has significant ARCH, then we can predict the next period error
variance using the formula:
̂2t = â0 + â1 ε̂2t
σ
LO: Explain how time- series variables should be analyzed for nonstationarity and/or
cointegration before use in a linear regression.
If a linear regression is used to model the relationship between two time series, a test such
as the Dickey-Fuller 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 they are cointegrated, we may safely use linear
regression.
• If both time series have a unit root but are not cointegrated, then we cannot not use
linear regression.
The Engle-Granger/Dicky-Fuller test is used to determine if a time series is cointegrated.
LO: Determine an appropriate time- series model to analyze a given investment
problem and justify that choice.
Refer to the step-by-step guide in Section 16.1