0% found this document useful (0 votes)
16 views29 pages

LM05 Time Series IFT Notes

The document provides comprehensive notes on Time Series Analysis for the 2024 Level II CFA Program, covering various models such as linear and log-linear trend models, AR time-series models, and issues related to serial correlation in errors. It emphasizes the importance of ensuring covariance stationarity and discusses methods for detecting correlated errors in autoregressive models. Additionally, it includes examples and statistical tests to illustrate the application of these concepts in forecasting.

Uploaded by

ereden4030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views29 pages

LM05 Time Series IFT Notes

The document provides comprehensive notes on Time Series Analysis for the 2024 Level II CFA Program, covering various models such as linear and log-linear trend models, AR time-series models, and issues related to serial correlation in errors. It emphasizes the importance of ensuring covariance stationarity and discusses methods for detecting correlated errors in autoregressive models. Additionally, it includes examples and statistical tests to illustrate the application of these concepts in forecasting.

Uploaded by

ereden4030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

LM05 Time Series Analysis 2024 Level II Notes

LM05 Time Series Analysis

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

© IFT. All rights reserved 1


LM05 Time Series Analysis 2024 Level II Notes

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.

1.1 Challenges of Working with Time Series


The assumptions of the linear regression model are often violated when working with time
series.
Some common problems when dealing with time-series include the following:
• The residual errors are correlated instead of being uncorrelated. This is because time-
series data is often seasonal.
• The mean and/or variance of the time series changes over time.
For example, consider the following time series data:

© IFT. All rights reserved 2


LM05 Time Series Analysis 2024 Level II Notes

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.

2. Linear Trend Models


One of the simplest ways of forecasting is to estimate the trend in a time-series. The trend
may be sloping upward, downward, or constant. In this section, we focus on linear trend
models. In the next section we will focus on log-linear trend model.
In a linear trend model, the dependent variable changes at a constant amount with time. The
independent variable is time.

The linear trend equation for a time-series is given by:


yt = b0 + b1 t + εt , t = 1, 2, … , T
where:
yt = the value of the time series at time t (value of the dependent variable)
b0 = the y-intercept term
b1 = the slope coefficient or the trend coefficient
t = time, the independent or explanatory variable
εt = a random-error term
If the estimated values of coefficients are given, then the predicted value of y is given by:
𝑦̂t = b̂0 + b̂1 t
Example:
Say we have a linear trend model with b0 = 0.5 and b1 = 0.7. What is the predicted value of Y
when t = 10?
Solution:

© IFT. All rights reserved 3


LM05 Time Series Analysis 2024 Level II Notes

𝑦̂10 = 0.5 + 0.7(10) = 7.5

Example: The Trend in the U.S. Consumer Price Index


(This is based on example 1 from the curriculum.)
An analyst uses the monthly inflation data between 1995 and 2013 to predict future inflation
rates. She uses the regression equation yt = b0 + b1 t + εt where t = 1,2,….228.
Figure: Monthly CPI Inflation, Not Seasonally Adjusted
This is Figure 3 in the curriculum.

The results of regression are presented below:


Regression Statistics
R-squared 0.0033
Standard error 4.3297
Observations 228
Durbin-Watson 1.09

Coefficient Standard Error t-Statistic


Intercept 2.8853 0.5754 5.0144
Trend -0.0038 0.0044 -0.8636

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:

© IFT. All rights reserved 4


LM05 Time Series Analysis 2024 Level II Notes

ŷt = 2.8853 − 0.0038(1) = 2.8815 percent


Predicted value of inflation in period 228:
ŷt = 2.8853 − 0.0038(228) = 2.0189 percent
Figure: Monthly CPI Inflation with Trend
This is Figure 4 in the curriculum.

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.

3. Log-Linear Trend Models


Sometimes linear trend models do not correctly model the growth of a time series. They can
result in persistent rather than uncorrelated errors.
Example: A Linear Trend Regression for Quarterly Sales at Starbucks
(This is based on Example 2 from the curriculum.)
This example illustrates the problem of regression errors being correlated across
observations in a linear trend model.
An analyst uses 76 observations of Starbuck’s quarterly sales data from 1995 to 2013. He
uses the linear trend regression model yt = b0 + b1t + εt , t = 1, 2, … , 76. The results of
regression are given below:
Regression Statistics
R-squared 0.9595
Standard error 233.21
Observations 76

© IFT. All rights reserved 5


LM05 Time Series Analysis 2024 Level II Notes

Durbin-Watson 0.32

Coefficient Standard Error t-Statistic


Intercept -428.5380 54.0345 -7.9308
Trend 51.0866 1.2194 41.8949
Since the intercept and trend coefficient are statistically significant, the analyst plots the data
on Starbuck’s sales and the trend line as shown below:
Figure. Starbuck’s Quarterly Sales with Trend
This is Figure 6 in the curriculum.

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

© IFT. All rights reserved 6


LM05 Time Series Analysis 2024 Level II Notes

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

Example: A Log-Linear Regression for Quarterly Sales at Starbucks


(This is based on Example 3 from the curriculum.)
The analyst decides to use a log-linear model since the quarterly sales data showed
exponential growth. He estimates the regression equation as: ln yt = b0 + b1 t + εt , t =
1, 2, … , 76. The results of the regression are given below:
Regression Statistics
R-squared 0.9453
Standard error 0.2480
Observations 76
Durbin-Watson 0.12

Coefficient Standard Error t-Statistic


Intercept 5.1304 0.0575 89.2243
Trend 0.0464 0.0013 35.6923

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

© IFT. All rights reserved 7


LM05 Time Series Analysis 2024 Level II Notes

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

4. Trend Models and Testing for Correlated Errors


When using a linear trend and log-linear trend model, all the assumptions of a regression
model must be satisfied. However, both the models often have serial correlation in errors
which result in inconsistent coefficient estimates.
The Durbin-Watson statistic is used to test for serial correlation. In Example 3, the DW
statistic was 0.12. Suppose we want to test the null hypothesis of no positive serial
correlation at the 0.05 significance level. The critical value, dl, is 1.60. Since DW statistic is
below the critical value, we can reject the null hypothesis of no positive serial correlation.
Therefore, in Example 3, the log-linear model that uses natural log of Starbuck’s quarterly
sales is also not an appropriate choice to forecast sales as the errors have positive serial
correlation.
This is a limitation of trend models that by nature they tend to exhibit serial correlation in
errors. To overcome this issue, we use autoregressive time series models for forecasting the
time series.

5. AR Time-Series Models and Covariance-Stationary Series


An autoregressive model (AR) is a time series where a given variable is regressed on its own
past values. Autoregressive models are denoted by AR (p), where p indicates the number of
lagged values used. It is also known as the order of the model.
A first-order autoregression AR (1) equation for the variable xt is given by:
xt = b0 + b1 xt–1 + εt
where:
xt = current value of xt
xt-1 = the most recent past value of xt
A second-order autoregression AR(2) equation for the variable xt is given by:
xt = b0 + b1 xt–1 + b2 xt–2 + εt

© IFT. All rights reserved 8


LM05 Time Series Analysis 2024 Level II Notes

Similarly, a pth-order autoregression AR (p) equation is given by:


xt = b0 + b1 x(t–1) + b2 x(t–2) + … + bp x(t– p) + εt
Instructor’s Note: Due to the seasonality of time series data, the commonly used AR models
are AR(4) models when working with quarterly data, and AR(12) models when working
with monthly data.
5.1 Covariance-Stationary Series
For AR models to work, the time series must be covariance stationary. A time series is
covariance stationary if it meets the following three conditions:
• The expected value of the time series (the mean) must be constant and finite in all
periods (i.e., the time series should not trend upwards or downwards).
• The variance must be constant and finite in all periods (i.e., the time series’ volatility
around its mean should not change over time).
• The covariance of time series, past or future must also be constant and finite in all
periods (i.e., the covariance of the time series with leading or lagged values of itself
should be constant).

6. Detecting Serially Correlated Errors in an AR Model


Durbin-Watson test is invalid for AR models since the independent variables include past
values of the dependent variable.
We can detect serially correlated errors by testing whether the autocorrelations of the error
terms (error autocorrelations) differ significantly from 0. If the model is correctly specified,
none of the autocorrelations will be statistically significant.
A three-step process is used to determine if an AR model has been correctly specified:
• Estimate a particular autoregressive model such as AR (1) and calculate the error
terms.
• Estimate the autocorrelations of the residuals from the model, i.e., the correlation
between the error terms of one period and the error terms of previous periods.
• Perform the t-test to test whether the residual autocorrelations differ significantly
from 0.
Null hypothesis is: error autocorrelation at a specified lag equals 0.
1
Standard error of the residual correlation = , where T is the number of
√T
observations in the time series.
Test stat = residual autocorrelation / standard error
If the autocorrelations of the error term (error autocorrelations) differ significantly from 0,
then the model is not specified correctly.

© IFT. All rights reserved 9


LM05 Time Series Analysis 2024 Level II Notes

Example: Predicting Gross Margins for Intel


(This is based on Example 4 from the curriculum.)
An analyst decides to use a time series model to predict Intel’s gross margin. She uses a first-
order autoregressive time series model. The regression equation is:
Gross margint = b0 + b1 (Gross margint-1) + εt
The results of regression and autocorrelations of residuals from the model are given in the
table below.
Using the data given, determine if the estimated coefficients are statistically significant. Is
the model correctly specified? Assuming this quarter’s gross margin is 65 percent, predict
Intel’s gross margin in the next period.
Regression Statistics
R-squared 0.5429
Standard error 0.0337
Observations 59
Durbin-Watson 2.0987

Coefficient Standard Error t-Statistic


Intercept 0.1795 0.0635 2.8268
Lag 1 0.7449 0.0905 8.2309

Autocorrelations of the Residual


Lag Autocorrelation Standard Error t-Statistic
1 -0.0495 0.1302 -0.3802
2 -0.0392 0.1302 -0.3011
3 0.0524 0.1302 0.4025
4 0.1450 0.1302 1.1137
Solution:
Looking at the table, we can see that R2 is high and this is an AR(1) model as there is one lag.
0.7499 is b1 in the regression. There are 4 lags because we are looking at quarterly data. We
will now determine if the model is correctly specified.
1. Test for significance of coefficients.
The null hypothesis is that autocorrelation coefficient is equal to 0.
The critical tc value at 0.05 significance level and 57 degrees of freedom is 2. Since the t-
stats for intercept and coefficient on first lag are greater than 2, we can reject the null
hypothesis that the coefficients are equal to 0.
2. To determine if the model is correctly specified, we must test whether the residuals are
serially correlated.

© IFT. All rights reserved 10


LM05 Time Series Analysis 2024 Level II Notes

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

7. Mean Reversion and Multiperiod Forecasts


A time series shows mean reversion if it tends to fall when its level is above its mean and rise
when its level is below its mean.
For an AR (1) model: xt = b0 + b1 xt−1 + εt , the mean reverting level is given by:
b
Mean-reverting level xt = 1−b0
1
Instructor’s Note: A classic example of a time series showing mean reversion is inflation
data. For example, if the long term expected inflation rate for a country is 2%, inflation tends
to come down when it is above 2% and tends to rise when it is below 2%.

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

7.1 Multiperiod Forecasts and the Chain Rule of Forecasting


Multiperiod forecasting is used when you want to forecast for more than one period.
The chain rule of forecasting is a process in which the next period’s value, predicted by the
forecasting equation, is substituted into the equation to give a predicted value two periods
ahead.
The one-period forecast of xt from an AR (1) model is:
x̂t+1 = b̂0 + b̂1 xt
We will use xt+1 to forecast xt+2
x̂t+2 = b̂0 + b̂1 xt+1
As you can see, the forecast of xt+1 is used to forecast xt+2.
Example:
Say you are given the following AR(1) model: xt = 1 + 0.8 xt−1 + εt . xt=10. Calculate the
predicted value xt+2, using the chain rule of forecasting.
Solution:

© IFT. All rights reserved 11


LM05 Time Series Analysis 2024 Level II Notes

x̂t+1 = 1 + 0.8(10) = 9
x̂t+2 = 1 + 0.8(9) = 8.2

Example: Multiperiod Prediction of Intel’s Gross Margin


(This is based on Example 5 from the curriculum.)
Continuing with the previous example, if Intel’s current gross margin is 65 percent, predict
its gross margin two quarters from now.
Solution:
Intel’s gross margin one quarter from now = 0.1795 + 0.7449(0.65) = 0.6637
Intel’s gross margin two quarters from now = 0.1795 + 0.7449(0.6637) = 0.6739 = 67.39
percent

8. Comparing Forecast Model Performance


A model’s forecasting performance depends on its forecast error variance. The forecast error
is the difference between forecast value and the realized value of the variable. The model
with the smallest forecast error variance is the more accurate model.
There are two types of forecasting errors based on the period used to predict values:
• In-sample forecast errors: these are residuals from a fitted series model used to
predict values within the sample period.
• Out-of-sample forecast errors: these are regression errors from the estimated
model used to predict values outside the sample period. Out-of-sample analysis is a
realistic way of testing the forecasting accuracy of a model and aids in the selection of
a model.
Root mean squared error (RMSE) is used to compare the out-of-sample forecasting
performance of the models. RMSE is the square root of the average squared error. The model
with the smallest RMSE is the most accurate model.

9. Instability of Regression Coefficients


Estimates of regression coefficients of the time series models can change substantially across
different sample periods used for estimating the model. For example, using an AR(1) model
for a given time period may give us b0 = 1 and b1 = 0.8. But using the same model for a
different time period may give us b0 = 1.5 and b1 = 0.6. This is referred to as instability of
regression coefficients.
Therefore, choosing a correct sample period is an important decision for modeling a
financial time series. When selecting a time period:
• Determine whether the economics or environment has changed (a regime change).
• Look at graphs of data to see if the time series looks stationary.

© IFT. All rights reserved 12


LM05 Time Series Analysis 2024 Level II Notes

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.

10. Random Walks


In the previous sections, we looked at time series which were mean reverting. However,
there are many financial time series (for example, exchange rates) in which the changes
follow a random pattern. In this section will cover these ‘random walks.’
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:
The error term has an expected value of zero.
The error term has a constant variance.
The error term is uncorrelated with previous error terms.
Notice that this is an AR (1) model where b0 = 0 and b1 = 1.
Another variation is a random walk with a drift where b0 ≠ 0. The equation for a random
walk with drift is:
xt = b0 + b1 xt−1 + εt
where: b0 ≠ 0, b1 = 1, and E(εt ) = 0
Characteristics of a random walk time-series:
b b b0
• The time-series has no finite mean-reverting level.1− 0b = 1−1
0
= = undefined
1 0
• The time-series has no finite variance as the variance approaches infinity for large
values of period t. So, it is not covariance-stationary.
Consequences of a random walk time-series:
• The standard errors are invalid as the model is not covariance stationary.
• R2 would be very high and misleading as we will see in example 10.
• The statistical tests are invalid.
How to correct a random walk:
A random walk time-series is not covariance stationary, so standard regression analysis
cannot be used to estimate it without transforming the data. First differencing is the
process used to transform a random-walk time series to a covariance stationary time series.
In this method we define a first differenced variable yt such that:
yt = xt − xt−1 = εt

© IFT. All rights reserved 13


LM05 Time Series Analysis 2024 Level II Notes

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

Example: The Yen/US Dollar Exchange Rate


(This is based on Example 10 from the curriculum.)
This example shows why AR (1) models cannot be used to estimate random walks or any
time series that is not covariance stationary.
An analyst uses an AR (1) model to estimate the Japanese yen/US exchange rate. Based on
the regression output, comment if the time-series is a random walk. If it is, then transform
the data to confirm the same. The results of the regression without transformation are
presented below:
Regression Statistics
R-squared 0.9902
Standard error 4.9437
Observations 408
Durbin-Watson 1.8981

Coefficient Standard Error t-Statistic


Intercept 0.9958 0.7125 1.3976
Lag 1 0.9903 0.0049 202.1020

Autocorrelations of the Residual


Lag Autocorrelation Standard Error t-Statistic
1 0.0687 0.0495 1.3879
2 0.0384 0.0495 0.7758
3 0.0686 0.0495 1.3859
4 0.0407 0.0495 0.8222

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

© IFT. All rights reserved 14


LM05 Time Series Analysis 2024 Level II Notes

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

Coefficient Standard Error t-Statistic


Intercept -0.3128 0.2463 -1.2700
Lag 1 0.0506 0.0494 1.0243

Autocorrelations of the Residual


Lag Autocorrelation Standard Error t-Statistic
1 0.0193 0.0495 0.3899
2 0.0345 0.0495 0.6970
3 0.0680 0.0495 1.3737
4 0.0399 0.0495 0.8061
The intercept, the lag coefficient and the residual autocorrelations do not differ significantly
from 0. So, we can conclude that the yen/US dollar exchange rate is a random walk. The first-
differenced regression is the appropriate model even though the R2 is low. This is because
random models are unpredictable.

11. The Unit Root Test of Nonstationarity


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. If a time series is unit root, then it is a random walk and not covariance stationary. All
random walks (with and without drift) have a unit root.
We can detect the unit root problem by using the Dickey-Fuller test.
It is a unit root test based on a transformed version of the AR (1) model xt = b0 + b1 xt−1 +
εt
Subtracting xt-1 from both the sides, we get
xt − xt−1 = b0 + (b1 − 1) xt−1 + εt or
xt − xt−1 = b0 + g1 xt−1 + εt
where 𝑔1 = 𝑏1 − 1
If b1 = 1, then g1 = 0. This means there is a unit root in the model.
In this regression, the dependent variable is the first difference of the time series and the
independent variable is the first lag of the time series.

© IFT. All rights reserved 15


LM05 Time Series Analysis 2024 Level II Notes

Following are the steps for the Dickey Fuller test:


• Define the null hypothesis is H0: g1 = 0. This means the time series has a unit root and
is non-stationary. The alternative hypothesis is Ha: g1 < 0. This means the time series
does not have a unit root and is stationary.
• Determine the critical t values using the set provided for Dickey Fuller tests. These
values are larger than conventional ones.
• Compute the t-statistic. If t-statistic > tc, then reject the null hypothesis.
Example: AstraZeneca’s Quarterly Sales (2)
(This is based on Example 12 from the curriculum.)
Looking at the plot of AstraZeneca’s quarterly sales, an analyst is convinced that it is not
covariance stationary (has unit root).

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

© IFT. All rights reserved 16


LM05 Time Series Analysis 2024 Level II Notes

R-squared 0.3005
Standard error 0.0475
Observations 48
Durbin-Watson 1.6874

Coefficient Standard Error t-Statistic


Intercept 0.0222 0.0071 3.1268
Lag 1 -0.5493 0.1236 -4.4442

Autocorrelations of the Residual


Lag Autocorrelation Standard Error t-Statistic
1 0.2809 0.1443 1.9466
2 -0.0466 0.1443 -0.3229
3 0.0081 0.1443 0.0561
4 0.2647 0.1443 1.8344

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.

© IFT. All rights reserved 17


LM05 Time Series Analysis 2024 Level II Notes

12. Moving Average Time-Series Models


For some time series data, such as stock index returns, moving average (MA) are better than
AR models. Moving averages smooth out period-to-period fluctuations in a time series.
12.1 Smoothing Past Values with an n-Period Moving Average
An n-period 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
Example: AstraZeneca’s Quarterly Sales (3)
(This is Example 13 from the curriculum.)
Suppose we want to compute the four-quarter moving average of AstraZeneca’s sales as of
the beginning of the first quarter of 2012. AstraZeneca’s sales in the previous four quarters
were 1Q:2011, $8,490 million; 2Q:2011, $8,601 million; 3Q:2011, $8,405 million; and
4Q:2011, $8,872 million. The four-quarter moving average of sales as of the beginning of the
first quarter of 2012 is thus (8,490 + 8,601 + 8,405 + 8,872)/4 = $8,592 million.
Moving averages can also be depicted graphically as shown in Figure 13 from the curriculum
which plots the monthly Europe Brent Crude Oil spot prices along with a 12-month moving
average of oil prices.

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

© IFT. All rights reserved 18


LM05 Time Series Analysis 2024 Level II Notes

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.

13. Seasonality in Time-Series Models


Seasonality is common in financial data. If the error term of a time-series model shows
significant serial correlation at seasonal lags, it is said to have seasonality. A time-series with
seasonality is not covariance stationary.
How to detect seasonality:
We detect seasonality through autocorrelations in the data. In case of seasonality in a
quarterly time series, the fourth autocorrelation would differ significantly from zero. In case
of seasonality in a monthly time series, the 12th autocorrelation would differ significantly
from zero.
How to correct for 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 and AR(4) model:
xt = b0 + b1 x(t–1) + b2 x(t−4) + εt

Example: Seasonality in Sales at Starbucks


(This is based on Example 15 from the curriculum.)
An analyst wants to predict sales for Starbucks, Inc. He determines that the first difference of
the log of sales is covariance stationary. He estimates an AR(1) model using OLS on first-

© IFT. All rights reserved 19


LM05 Time Series Analysis 2024 Level II Notes

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

Coefficient Standard Error t-Statistic


Intercept 0.0669 0.0101 6.6238
Lag 1 -0.3183 0.1050 -3.6314

Autocorrelations of the Residual


Lag Autocorrelation Standard Error t-Statistic
1 -0.0141 0.1162 -0.1213
2 -0.0390 0.1162 -0.3356
3 0.0294 0.1162 0.2530
4 0.7667 0.1162 6.6981

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

© IFT. All rights reserved 20


LM05 Time Series Analysis 2024 Level II Notes

Observations 71
Durbin-Watson 2.0791

Coefficient Standard Error t-Statistic


Intercept 0.0084 0.0059 1.4237
Lag 1 -0.0602 0.0540 -1.1148
Lag 4 0.8048 0.0524 15.3588

Autocorrelations of the Residual


Lag Autocorrelation Standard Error t-Statistic
1 -0.0441 0.1187 -0.3715
2 0.0675 0.1187 0.5687
3 0.0749 0.1187 0.6310
4 -0.2091 0.1187 -1.7616
None of the t-statistics on the first four autocorrelations are significant. Hence, we can
conclude that the model is correctly specified. Notice that R2 of this model with the seasonal
lag is much higher than the previous one without the seasonal lag.
Present quarter sales forecast = 0.0084 – 0.0602(0.01) + 0.8048(0.02) = 2.39 percent

14. Moving Average and ARCH Models


A time series model may have both autoregressive and moving average processes in it
leading to a set of models known as ARMA models. An ARMA model combines both
autoregressive lags of the dependent variable and moving-average errors.
Despite the advantages of combining AR and MA characteristics in a single model, ARMA
models have severe limitations such as:
• The parameters can be very unstable.
• Choosing the right AR and MA order of the model can be difficult.
• A significant amount of data is required to design the model.
• Even with their additional complexity, ARMA models may not forecast well.
14.1 Autoregressive Conditional Heteroskedasticity Models
If the variance of the error in a time series depends on the variance of the previous errors,
then this condition is called autoregressive conditional heteroskedasticity (ARCH).
Consequences of ARCH:
If ARCH exists, the standard errors for the regression parameters will not be correct. We will
have to use generalized least squares or other methods that correct for heteroskedasticity, to
correctly estimate the standard error of the parameters in the time series model. If ARCH
does exist in the data, then the time-series is not a random walk.

© IFT. All rights reserved 21


LM05 Time Series Analysis 2024 Level II Notes

How to test for ARCH:


Analysts can test for first-order ARCH in a time-series model using the following steps:
1. Regress the squared residual from each period on the squared residual from the
previous period. Estimate the linear regression equation:
ε̂2t = a0 + a1 ε̂2t−1 + ut
where ut is the error term and a1 is the coefficient on the squared residual
2. The null hypothesis is that a1 is equal to 0. If the null hypothesis is rejected and a1 is
statistically significant, then the time-series model has ARCH (1) errors.
If a time-series model has significant ARCH(1), then we can predict the next period error
variance using the formula:
σ2t+1 = â0 + â1 ε̂2t
̂

15. Regressions with More Than One Time Series


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.
The four possible scenarios based on whether the dependent variable, the independent
variable, or both have a unit root are listed below:
• If neither of the time series has a unit root, then we can safely use linear regression.
• If only 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 they are not cointegrated, then we cannot use
linear regression.
Two time series are said to be cointegrated if a long-term financial or economic (macro)
relationship exists between the two variables or if they follow similar trends.
Engle-Granger Dickey-Fuller test:
The Engle-Granger Dickey-Fuller test can be used to determine if the time series are
cointegrated. The steps for Engle-Granger test are listed below:
1. Estimate the regression: yt = b0 + b1xt + εt
2. Test whether the error term in Step 1 has a unit root using Dickey-Fuller test. But,
instead of using a standard critical value for Dickey-Fuller test, use the critical values
computed by Engle-Granger.
3. If the test fails to reject the null hypothesis that the error term has a unit root, then
we can conclude that the error term in the regression is not covariance stationary.

© IFT. All rights reserved 22


LM05 Time Series Analysis 2024 Level II Notes

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.

16. Other Issues in Time Series


The focus of this reading was on issues related to time series which are most important to
financial analysts and which can be addressed with relative ease.
Some other issues in time series which were not addressed in the reading are:
• The uncertainty of forecasts can be very large, especially the uncertainty of the error
term and the uncertainty about the estimated parameters. Evaluating this uncertainty
is complicated when there is more than one independent variable.
• One may not have the information to split the data into different regimes, especially
when it is clear that the data cannot be pooled together.
16.1 Suggested Steps in Time-Series Forecasting
The following is a step-by-step guide to building a model to predict a time series. It is also an
excellent summary for this reading.
(This has been taken from Section 16.1 from the curriculum.)
1. Understand the investment problem you have, and make an initial choice of model. One
alternative is a regression model that predicts the future behavior of a variable based on
hypothesized causal relationships with other variables. Another is a time-series model
that attempts to predict the future behavior of a variable based on the past behavior of
the same variable.
2. If you have decided to use a time-series model, compile the time series and plot it to see
whether it looks covariance stationary. The plot might show important deviations from
covariance stationarity, including the following:
• a linear trend;
• an exponential trend;
• seasonality; or
• a significant shift in the time series during the sample period (for example, a change
in mean or variance).

© IFT. All rights reserved 23


LM05 Time Series Analysis 2024 Level II Notes

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.

© IFT. All rights reserved 24


LM05 Time Series Analysis 2024 Level II Notes

• 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.

© IFT. All rights reserved 25


LM05 Time Series Analysis 2024 Level II Notes

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.

© IFT. All rights reserved 26


LM05 Time Series Analysis 2024 Level II Notes

• 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: Explain mean reversion and calculate a mean- reverting level.


A time series is said to be mean-reverting if it tends to fall when its level is above its mean
and rise when its level is below its mean. If a time series is covariance stationary, then it will
be mean reverting.
The mean reverting level is calculated as:
b
Mean-reverting level xt = 1−b0
1

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.

© IFT. All rights reserved 27


LM05 Time Series Analysis 2024 Level II Notes

• 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.

© IFT. All rights reserved 28


LM05 Time Series Analysis 2024 Level II Notes

• 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

© IFT. All rights reserved 29

You might also like