Lesson 3.3: Time-Series Analysis
Introduction
In this lesson, we will explore Time-Series Analysis, a pivotal topic in Quantitative Methods, particularly for CFA Level II candidates. This lesson covers trend models, autoregressive models, unit roots, and seasonality, with the aim of equipping you with the essential skills to select and interpret appropriate time-series models, test for nonstationarity, and understand their application in forecasting.
Learning Objectives
By the end of this lesson, you should be able to:
- Understand trend models, autoregressive models, unit roots, and seasonality.
- Forecast and assess model stability over time.
- Select and interpret an appropriate time-series model.
- Test for nonstationarity and adjust the model accordingly.
- Explain the main ideas and terminology behind Time-Series Analysis.
What is Time-Series Analysis?
Time-Series Analysis is a statistical technique that deals with time-ordered data points, allowing analysts to identify trends, patterns, and relationships over time. Time series are widely used in various fields, including finance, economics, and environmental science.
Components of Time-Series Data
- Trend: The long-term movement in the data. A trend can be upward, downward, or flat.
- Seasonality: The regular pattern or fluctuations that occur at certain periods such as days, months, or seasons.
- Cyclical: The long-term fluctuation that is not regular and occurs over several years.
- Irregular or Random Component: Unpredictable variation in the data.
Trend Models
Trend models help capture the long-term progression of the data. A linear trend can be modeled as:
$$
Y_t = $\beta_0$ + $\beta_1$ t + \epsilon_t
$$
where:
- $Y_t$ is the value of the time series at time $t$,
- $\beta_0$ is the intercept,
- $\beta_1$ is the slope (indicating the trend direction), and
- $\epsilon_t$ is the error term.
Example of a Trend Model
Consider a scenario where you want to analyze the sales of a company over a period of 10 years.
- Yearly sales data (in thousands): 100, 120, 150, 180, 210, 240, 300, 360, 450, 500
We can create a trend line to predict future sales. By applying simple linear regression to the data:
- Calculate the coefficients using statistical software or Excel.
- Predict sales for year 11 (by substituting $t=11$ in the equation).
After calculating, let’s say you find:
- $\beta_0 = 90$, $\beta_1 = 40$. Then the trend equation becomes:
$$
$Y_t = 90 + 40t$
$$
Substituting $t=11$ gives:
$$
Y_{11} = 90 + 40 * 11 = 490
$$
Thus, projected sales for year 11 would be $490,000.
Autoregressive Models
Autoregressive (AR) models use the dependency between an observation and a number of lagged observations (previous time points). An $AR(p)$ model is expressed as:
$$
Y_t = $\phi_1$ Y_{t-1} + $\phi_2$ Y_{t-2} + $\ldots$ + $\phi$_p Y_{t-p} + \epsilon_t
$$
where:
- $\phi_i$ are the coefficients,
- $Y_{t-i}$ are the lagged values,
- $\epsilon_t$ is white noise.
Worked Example
Assume a stock price series has the following values:
- $Y_1 = 30$, $Y_2 = 32$, $Y_3 = 34$, $Y_4 = 36$, $Y_5 = 38$
To fit an $AR(1)$ model, we would take:
$$
$Y_t = \phi_1 Y_{t-1} + \epsilon_t$
$$
Let’s say we found $\phi_1 = 0.9$ using statistical software.
To predict $Y_6$:
$$
Y_6 = 0.9 Y_5 = 0.9 * 38 = 34.2
$$
Thus, the predicted stock price at time 6 is $34.2.
Unit Roots and Nonstationarity
A time-series is said to have a unit root if it is nonstationary, meaning its mean and variance depend on time. Nonstationarity can invalidate many statistical tests. The Augmented Dickey-Fuller (ADF) test is commonly used to test for a unit root.
ADF Test Example
Assume we have a time series with values:
- $Y = \{5, 6, 7, 8, 9\}$
To conduct an ADF test, you typically:
- Specify a null hypothesis $H_0$: The series has a unit root.
- Calculate the test statistic.
- Compare it to the critical value.
If the calculated statistic is less than the critical value (typically negative), you can reject the null hypothesis, meaning the series is stationary.
Seasonality in Time Series
Seasonality indicates periodic fluctuations. Seasonal patterns can often be observed on a monthly or quarterly basis. To account for seasonality, you can either:
- Detrend the data (removing trend components) before analyzing.
- Use seasonal decomposition to separate seasonal effects from the trend.
Example of Seasonality
Consider monthly sales data:
- January: 100
- February: 120
- March: 110
- April: 140
... (continue for all 12 months)
You can calculate average sales and then see how each month compares to the average over a few years, helping detect seasonal trends such as increased holiday sales in December.
Forecasting with Time-Series Models
Once a suitable model has been established, forecasting can be done to predict future values. A common forecasting method is the moving average, where future values are essentially an average of past observations.
Example of Moving Average Forecasting
Assuming the last five sales figures are:
- 100, 200, 300, 400, 500: The three-period moving average forecast would be:
$$
MA_t = $\frac{Y_{t-1} + Y_{t-2} + Y_{t-3}}{3}$
$$
Substituting:
$$
MA_6 = $\frac{300 + 400 + 500}{3}$ = $\frac{1200}{3}$ = 400
$$
So, the forecast for the next period is 400.
Conclusion
In this lesson, we have explored the fundamentals of Time-Series Analysis, including trend models, autoregressive models, unit roots, seasonal effects, and forecasting methods. Mastery of these concepts is essential not only for successful completion of the CFA Level II exam but also for practical applications in various fields of analysis.
Study Notes
- Time-Series Analysis involves various components including trend, seasonality, and irregular variations.
- Trend models represent the long-term direction of data.
- Autoregressive models utilize past values to forecast future values.
- Nonstationarity can be tested using the ADF test to identify unit roots in a time series.
- Seasonal patterns must be accounted for in modeling to improve forecasting accuracy.
