0% found this document useful (0 votes)
15 views16 pages

Tsay For CH 3, 4

The document provides solutions to various time series analysis exercises, including MA(1) and AR(2) models for bond returns and daily log returns, respectively. It covers forecasting, autocorrelations, and model selection for U.S. unemployment rates, stock decile returns, long memory in stock returns, electricity demand, and day-of-week effects in stock returns. Each exercise outlines the problem, methodology, and results, emphasizing statistical techniques and model diagnostics.

Uploaded by

Bryan Yang
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)
15 views16 pages

Tsay For CH 3, 4

The document provides solutions to various time series analysis exercises, including MA(1) and AR(2) models for bond returns and daily log returns, respectively. It covers forecasting, autocorrelations, and model selection for U.S. unemployment rates, stock decile returns, long memory in stock returns, electricity demand, and day-of-week effects in stock returns. Each exercise outlines the problem, methodology, and results, emphasizing statistical techniques and model diagnostics.

Uploaded by

Bryan Yang
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/ 16

Complete Solutions to Ruey Tsay Time Series Analysis Exercises

Exercise 2.1: MA(1) Model for Monthly Bond Returns


Problem
Suppose the simple return of a monthly bond index follows the MA(1) model:
Rt = ω + 0.2εt−1 + εt ,
​ ​ ​ σε = 0.025

Assume $\mu_R = 0.01$. Compute:


1. 1-step and 2-step ahead forecasts at origin $t = 100$
2. Standard deviations of forecast errors
3. Lag-1 and lag-2 autocorrelations of returns
Solution
Step 1: Understanding the model
We have an MA(1) model for bond returns. This means returns depend on:
A constant term $\omega$ (equal to the mean $\mu_R = 0.01$)
The previous period's random shock $\varepsilon_{t-1}$ (with coefficient 0.2)
The current period's random shock $\varepsilon_t$
Step 2: Computing forecasts
For an MA(1) model, the 1-step ahead forecast is:
^ 101∣100 = ω + 0.2ε100
R ​ ​

The value of $\varepsilon_{100}$ can be calculated from past data:


ε100 = R100 − ω − 0.2ε99
​ ​ ​

Without specific values for $R_{100}$ and $\varepsilon_{99}$, we express the forecast as:
^ 101∣100 = 0.01 + 0.2ε100
R ​ ​

For the 2-step ahead forecast:


^ 102∣100 = ω = 0.01
R ​

This equals the mean because MA(1) effects only last for one period.
Step 3: Computing forecast error standard deviations
For 1-step ahead, the forecast error is:
^ 101∣100 = ε101
e101∣100 = R101 − R
​ ​ ​ ​

Therefore, $\sigma_{e_{101|100}} = \sigma_\varepsilon = 0.025$


For 2-step ahead, the forecast error is:
^ 102∣100 = 0.2ε101 + ε102
e102∣100 = R102 − R ​ ​ ​ ​ ​

Since $\varepsilon_{101}$ and $\varepsilon_{102}$ are independent:


σe2102∣100 = (0.2)2 σε2 + σε2 = (1 + 0.22 )σε2 = 1.04 × (0.025)2 = 0.00065

​ ​ ​ ​

Therefore, $\sigma_{e_{102|100}} = \sqrt{0.00065} \approx 0.0255$


Step 4: Computing autocorrelations
For an MA(1) process, the theoretical autocorrelations are:
θ1 0.2 0.2
ρ1 = ​

1+θ12


​ = 1+(0.2)2
​ = 1.04
​ ≈ 0.1923

ρ2 = 0​

All higher-order autocorrelations are also zero.


Exercise 2.2: Daily Log Returns Model
Problem
Suppose the daily log return of a security follows the model:
rt = 0.01 + 0.2rt−2 + at
​ ​ ​

where $a_t$ is Gaussian white noise with mean zero and variance 0.02.
Required:
1. Find the mean and variance of the return series
2. Find the lag-1 and lag-2 autocorrelations
3. Assuming $r_{98} = -0.01$ and $r_{99} = 0.02$, compute 1-step and 2-step ahead forecasts at
origin $t = 100$
4. Find the standard deviations of forecast errors
Solution
Step 1: Identifying the model type
This is an AR(2) model with a "gap" - the coefficient for $r_{t-1}$ is zero.
Step 2: Mean and variance
For this AR(2) model, the mean is:
c 0.01 0.01
μr = ​

1−ϕ1 −ϕ2 ​ ​
​ = 1−0−0.2 ​ = 0.8 ​ = 0.0125

The variance is:


σa2
σr2 = = 0.02
= 0.02
≈ 0.0208

1−ϕ22 1−(0.2)2 0.96


​ ​ ​ ​


Step 3: Autocorrelations
For an AR(2) model, autocorrelations follow:
ρ1 = ϕ1 + ϕ2 ρ1
​ ​ ​ ​

Since $\phi_1 = 0$, we get:


ρ1 = 0.2ρ1 ⟹ 0.8ρ1 = 0 ⟹ ρ1 = 0
​ ​ ​ ​

For lag-2:
ρ2 = ϕ1 ρ1 + ϕ2 = 0 × 0 + 0.2 = 0.2
​ ​ ​ ​

Step 4: Forecasts
For 1-step ahead forecast:
r^101∣100 = 0.01 + 0.2r99 = 0.01 + 0.2 × 0.02 = 0.01 + 0.004 = 0.014
​ ​

For 2-step ahead forecast:


r^102∣100 = 0.01 + 0.2r100
​ ​

Since we don't know $r_{100}$, we estimate it:


r^100 = 0.01 + 0.2r98 = 0.01 + 0.2 × (−0.01) = 0.01 − 0.002 = 0.008
​ ​

Therefore:
r^102∣100 = 0.01 + 0.2 × 0.008 = 0.01 + 0.0016 = 0.0116

Step 5: Forecast error standard deviations


For 1-step ahead:
e101∣100 = r101 − r^101∣100 = a101
​ ​ ​ ​

Therefore, $\sigma_{e_{101|100}} = \sigma_a = \sqrt{0.02} \approx 0.1414$


For 2-step ahead:
e102∣100 = 0.2(r100 − r^100 ) + a102 = 0.2a100 + a102
​ ​ ​ ​ ​ ​

Therefore:
σe2102∣100 = (0.2)2 σa2 + σa2 = 1.04 × 0.02 = 0.0208

​ ​ ​

Thus, $\sigma_{e_{102|100}} = \sqrt{0.0208} \approx 0.1442$


Exercise 2.3: U.S. Unemployment Rate Analysis
Problem
Consider the monthly U.S. unemployment rate from January 1948 to March 2009. Build a time series
model, forecast for April-July 2009, and determine if the model implies business cycles.
Solution
Step 1: Data exploration
First, we would need to plot the unemployment data to see patterns, trends, and potential seasonal
effects. Even though the data is seasonally adjusted, we should verify stationarity.
Step 2: Testing for stationarity
We would use the Augmented Dickey-Fuller test to check if the series is stationary. For unemployment
data, we might need to difference the series to achieve stationarity.
Step 3: Model identification
After ensuring stationarity, we would examine the ACF and PACF plots to identify potential
ARIMA(p,d,q) models. For unemployment data, we often see:
Strong persistence (significant ACF at many lags)
Gradual decay in ACF
Several significant PACF lags
A typical model might be ARIMA(2,1,0) or ARIMA(2,1,1).
Step 4: Model estimation
Using maximum likelihood estimation, we would fit several candidate models and select the best one
based on AIC/BIC criteria and residual diagnostics.
Step 5: Business cycle analysis
To determine if the model implies business cycles, we would:
1. Analyze the characteristic equation of the AR part. For an AR(2) model: 1 − ϕ1L − ϕ2L2 = 0
​ ​

2. If this equation has complex roots with modulus less than 1, the model implies cyclical behavior.
3. The cycle length would be calculated as: Cycle period = cos (ϕ2π/2 ϕ )
−1
1 ​
2 ​ ​

Step 6: Forecasting
For a fitted ARIMA model, we would generate point forecasts and prediction intervals for April-July
2009 using the recursive forecasting equations.
Exercise 2.4: Analysis of Stock Decile Returns
Problem
Analyze monthly returns of stock deciles based on market cap from 1970-2008:
1. Test if first 12 autocorrelations are zero for Decile 2 and 10
2. Build an ARMA model for Decile 2
3. Produce 1- to 12-step ahead forecasts
Solution
Step 1: Testing autocorrelations
We would use the Ljung-Box Q-statistic to test if the first 12 autocorrelations are jointly zero:
12 ρ^2k
Q(12) = T (T + 2) ∑k=1
​ ​

T −k ​

Under the null hypothesis (no autocorrelation), this follows a $\chi^2(12)$ distribution.
The decision rule:
If $Q(12) > \chi^2_{0.95}(12) = 21.03$, reject the null hypothesis
Otherwise, fail to reject
Step 2: ARMA modeling for Decile 2
If we reject the null in Step 1, we would:
1. Examine ACF and PACF patterns to identify appropriate ARMA(p,q) orders
2. Estimate parameters for candidate models
3. Check residual diagnostics (white noise properties)
4. Select the best model using AIC/BIC
For stock returns, common models include ARMA(1,1), AR(1), or MA(1).
Step 3: Forecasting
For the selected ARMA(p,q) model, we would compute:
1. Point forecasts for 1-12 steps ahead using the recursive formulas
2. Standard errors of the forecasts
3. Prediction intervals based on normal distribution
The general form for h-step ahead forecast:
r^T +h∣T = ϕ0 + ∑pi=1 ϕi r^T +h−i∣T + ∑qj=1 θj ε^T +h−j∣T
​ ​ ​ ​ ​ ​ ​

Where future innovations $\hat{\varepsilon}_{T+j|T} = 0$ for $j > 0$.


Exercise 2.5: Long Memory in IBM Stock Returns
Problem
Analyze daily IBM stock returns (1970-2008) by computing the first 100 lags of ACF for absolute
returns and investigate long-range dependence.
Solution
Step 1: Understanding long-range dependence
Long-range dependence (LRD) or "long memory" occurs when autocorrelations decay very slowly
(hyperbolically) rather than exponentially. This is common in volatility measures like absolute returns.
Step 2: ACF analysis
For the absolute returns series $|r_t|$, we would:
1. Calculate sample ACF up to 100 lags
2. Plot the ACF against lag order
3. Look for slow decay pattern (signature of LRD)
Step 3: Formal testing
To formally test for LRD, we would use:
1. Hurst exponent (H) estimation:
H = 0.5 indicates no long memory
0.5 < H < 1 indicates long memory
2. Fractional differencing parameter (d):
Estimate d using GPH method (log-periodogram regression)
0 < d < 0.5 indicates long memory
Step 4: Interpretation
In financial markets, LRD in absolute returns indicates:
Volatility clustering persists over very long time horizons
Shocks to volatility have longer impact than standard models suggest
The market has a "long memory" for volatility events
Exercise 2.6: Electricity Demand Analysis
Problem
Analyze logged monthly electricity demand for a manufacturing sector and build a model for 1-24 step
ahead forecasts.
Solution
Step 1: Data analysis
For logged monthly electricity demand, we would:
1. Plot the time series to identify trends and seasonality
2. Test for stationarity (ADF test)
3. Transform data if necessary (differencing, seasonal differencing)
Step 2: Model specification
A suitable model might be a seasonal ARIMA (SARIMA) model, given by:
Φ(Ls )ϕ(L)(1 − Ls )D (1 − L)d yt = Θ(Ls )θ(L)εt
​ ​
Where:
$\phi(L)$ and $\theta(L)$ are the non-seasonal AR and MA polynomials
$\Phi(L^s)$ and $\Theta(L^s)$ are the seasonal AR and MA polynomials
$s = 12$ for monthly data
$d$ and $D$ are the degrees of regular and seasonal differencing
Step 3: Model selection
We would fit multiple SARIMA models and select the best one based on:
AIC/BIC criteria
Residual diagnostics
Parsimony
Step 4: Forecasting
For the selected model, generate:
1. Point forecasts for 1-24 months ahead
2. Prediction intervals
3. Evaluate forecast accuracy using metrics like RMSE, MAE, or MAPE
Exercise 2.7: Day-of-Week Effects in Stock Returns
Problem
Analyze day-of-week effects in the equal-weighted index returns using regression with indicator
variables.
Solution
Step 1: Model specification
We would use a regression model with dummy variables:
rt = β0 + β1 D1t + β2 D2t + β3 D3t + β4 D4t + εt
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​

Where:
$r_t$ is the daily return
$D_{1t}, D_{2t}, D_{3t}, D_{4t}$ are dummy variables for Monday, Tuesday, Wednesday, and
Thursday
$\beta_0$ represents the mean return on Friday (reference category)
$\beta_j$ represents the difference between day j and Friday
Step 2: Estimation and testing
We would:
1. Estimate the model using OLS
2. Test individual coefficients with t-tests
3. Test joint significance with an F-test
Step 3: Residual analysis
Check residuals for:
Serial correlation (Durbin-Watson test)
Heteroskedasticity (White test)
Normality (Jarque-Bera test)
Step 4: Model refinement
If residuals show serial correlation, refine the model with ARMA errors:
rt = β0 + β1 D1t + β2 D2t + β3 D3t + β4 D4t + ut
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​

Where $u_t$ follows an ARMA process:


ut = ϕ1 ut−1 + ϕ2 ut−2 + ... + εt + θ1 εt−1 + ...
​ ​ ​ ​ ​ ​ ​ ​

Step 5: Interpretation
Interpret coefficient estimates as:
$\hat{\beta}_0$: Average return on Friday
$\hat{\beta}_0 + \hat{\beta}_1$: Average return on Monday
etc.
A significant negative $\hat{\beta}_1$ would indicate the "Monday effect" (lower returns on Mondays).
Exercise 2.8: S&P Composite Returns and Weekday Effects
Problem
Analyze daily S&P returns to:
(a) Test for weekday effects
(b) Check residual serial correlations
(c) Refine model if necessary
Solution
Step 1: Model for weekday effects
Same regression model as in Exercise 2.7:
rt = β0 + β1 D1t + β2 D2t + β3 D3t + β4 D4t + εt
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​
Step 2: Testing procedures
For weekday effects:
Individual t-tests: $H_0: \beta_j = 0$ vs. $H_1: \beta_j \neq 0$
Joint F-test: $H_0: \beta_1 = \beta_2 = \beta_3 = \beta_4 = 0$
For residual autocorrelation:
Ljung-Box Q(12) statistic
Compare with critical value $\chi^2_{0.95}(12) = 21.03$
Step 3: Model refinement
If Q(12) is significant, refine model with ARMA errors:
1. Identify appropriate ARMA orders using ACF/PACF of residuals
2. Estimate regression with ARMA errors
3. Check refined model's residuals
4. Re-evaluate weekday effects with more efficient estimates
Step 4: Interpretation
Compare results with the general finance literature on calendar anomalies, which typically finds:
Negative Monday returns ("weekend effect")
Positive Friday returns
Different patterns in different market periods
Exercise 2.9: IBM Stock Weekday Effect Analysis
Problem
Similar to Exercise 2.8, but for IBM stock returns:
(a) Test for weekday effects
(b) Check for residual serial correlations
(c) Refine model using time series errors
Solution
Step 1: Regression model for weekday effects
rt,IBM = β0 + β1 D1t + β2 D2t + β3 D3t + β4 D4t + εt
​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​

Step 2: Hypothesis testing


Individual tests: $H_0: \beta_j = 0$ vs. $H_1: \beta_j \neq 0$
Joint test: $H_0: \beta_1 = \beta_2 = \beta_3 = \beta_4 = 0$
Step 3: Serial correlation analysis
Compute Q(12) statistic for residuals
Compare with $\chi^2_{0.95}(12) = 21.03$
Step 4: Model refinement
If serial correlation is detected:
Identify appropriate ARMA(p,q) structure for errors
Re-estimate model with ARMA errors
Perform residual diagnostics
Re-evaluate weekday effects
Step 5: Comparison analysis
Compare IBM-specific weekday effects with:
Market-wide patterns (from Exercise 2.8)
Industry-specific patterns
Size and value characteristics
Exercise 2.10: Bond Yield Statistical Analysis
Problem
Analyze weekly yields of Moody's Aaa and Baa bonds (1962-2009):
Compute summary statistics
Test for skewness and heavy tails
Solution
Step 1: Summary statistics calculation
For each yield series, compute:
Mean, median, minimum, maximum
Standard deviation
Skewness coefficient: $\hat{S} = \frac{1}{T}\sum_{t=1}^{T}\left(\frac{y_t - \bar{y}}{s}\right)^3$
Excess kurtosis: $\hat{K} = \frac{1}{T}\sum_{t=1}^{T}\left(\frac{y_t - \bar{y}}{s}\right)^4 - 3$
Step 2: Statistical tests
For skewness:
S^
zS = ∼ N(0, 1)
6/T
​ ​


For excess kurtosis:
^
zK = K
∼ N(0, 1)
24/T
​ ​

Joint test for normality (Jarque-Bera):


(S^2 + 4 )
^2
JB = T
6

K
​ ∼ χ2 (2)

Step 3: Interpretation
For bond yields:
Positive skewness would indicate more frequent small decreases but occasional large increases
Excess kurtosis would indicate more frequent extreme movements than normal distribution
Compare Aaa vs. Baa yields for differences in distribution characteristics
Exercise 2.11: Time Series Model for Aaa Bond Yields
Problem
Build a time series model for monthly Aaa bond yields from the previous exercise.
Solution
Step 1: Data analysis
1. Plot the time series to identify trends and patterns
2. Test for stationarity using ADF test
3. Transform if necessary (e.g., differencing)
Step 2: Model identification
Based on ACF and PACF patterns:
Slowly decaying ACF suggests non-stationarity or high persistence
Significant PACF at first few lags suggests AR process
For bond yields, ARIMA(p,d,q) models are common, especially ARIMA(1,1,0) or ARIMA(2,1,0)
Step 3: Model estimation
Fit candidate models using maximum likelihood estimation and select best model based on:
Information criteria (AIC/BIC)
Residual diagnostics
Parameter stability
Step 4: Model validation
Check residuals for autocorrelation, heteroskedasticity, normality
Perform out-of-sample forecast evaluation
Test for parameter stability across subsamples
Step 5: Interpretation
Interpret model parameters in terms of:
Mean reversion properties (speed of adjustment)
Persistence of shocks
Implications for bond pricing and interest rate modeling
Exercise 2.12: Relationship Between Aaa and Baa Yields
Problem
Analyze the relationship between Aaa and Baa bond yields using a time series model.
Solution
Step 1: Cointegration analysis
First, determine if the two yield series are cointegrated:
1. Test both series for unit roots (typically both I(1))
2. Test for cointegration using Johansen procedure
3. If cointegrated, estimate a Vector Error Correction Model (VECM)
4. If not cointegrated, proceed with VAR in differences
Step 2: Model specification
If cointegrated, the VECM would be:
ΔytAaa = α1 (yt−1

Aaa

Baa
− βyt−1

− c) + short-term dynamics + ε1t
​ ​

ΔytBaa = α2 (yt−1

Aaa
− βyt−1

Baa
− c) + short-term dynamics + ε2t
​ ​ ​

Where:
$\alpha_1, \alpha_2$ are speed of adjustment parameters
$\beta$ is the long-run relationship coefficient
$c$ is a constant term
Step 3: Interpretation
The relationship between yields can be interpreted as:
The long-run credit spread ($y_{t}^{Baa} - y_{t}^{Aaa}$) tends to mean-revert
The speed of adjustment indicates how quickly yield spreads return to equilibrium
The coefficient $\beta$ indicates the sensitivity relationship between the yields
Step 4: Credit spread analysis
Analyze the credit spread series:
st = ytBaa − ytAaa
​ ​ ​

Model this spread directly using an appropriate ARIMA model.


Exercise 2.13: CRSP Equal-Weighted Index Returns Analysis
Problem
Analyze monthly log returns of CRSP equal-weighted index (1962-1999):
(a) Build an AR model
(b) Build an MA model
(c) Compare 1-2 step forecasts from AR and MA models
(d) Compare the fitted models
Solution
Step 1: AR model specification
1. Examine PACF to determine AR order p
2. Estimate AR(p) model: rt = ϕ0 + ϕ1rt−1 + ϕ2rt−2 + ... + ϕprt−p + εt
​ ​ ​ ​ ​ ​ ​ ​

3. Check model adequacy (residual diagnostics)


Step 2: MA model specification
1. Examine ACF to determine MA order q
2. Estimate MA(q) model: rt = θ0 + εt + θ1εt−1 + θ2εt−2 + ... + θq εt−q
​ ​ ​ ​ ​ ​ ​ ​ ​

3. Check model adequacy


Step 3: Forecasting comparison
For both models, compute:
1. 1-step ahead forecasts
2. 2-step ahead forecasts
3. Forecast standard errors
4. Compare forecast accuracy using methods like MAE or RMSE
Step 4: Model comparison
Compare models based on:
Information criteria (AIC/BIC)
Residual diagnostics
Forecast performance
Parsimony
Exercise 2.14: Futures-Spot Price Relationship Analysis
Problem
Analyze the dynamic relationship between spot and futures prices of S&P 500 index. Build a
regression model with time series errors.
Solution
Step 1: Model specification
Define:
$f_t$ = log price of futures
$s_t$ = log price of spot
$y_t = f_t - s_t$ (log basis or cost-of-carry)
$x_t = s_t - s_{t-1}$ (spot returns)
The model is:
yt = β0 + β1 xt + ut
​ ​ ​ ​ ​

Where $u_t$ follows an ARMA process.


Step 2: Theoretical background
Cost-of-carry relationship suggests:
Ft = St e(r−d)(T −t)
​ ​

In logs:
ft − st = (r − d)(T − t)
​ ​

Where:
$r$ is the risk-free rate
$d$ is the dividend yield
$T-t$ is time to maturity
Step 3: Estimation procedure
1. Estimate the regression model using OLS
2. Test residuals for autocorrelation
3. If autocorrelated, identify ARMA structure for $u_t$
4. Re-estimate using GLS or maximum likelihood
Step 4: Interpretation
$\beta_1$ captures the immediate impact of spot returns on the basis
The ARMA parameters in $u_t$ capture persistence in mispricing
The speed of mean reversion in $u_t$ indicates arbitrage efficiency
Exercise 2.15: GDP Deflator Analysis
Problem
Analyze quarterly GDP deflator for the US (1947-2008). Build an ARIMA model, check its validity, and
forecast inflation for each quarter of 2009.
Solution
Step 1: Data transformation
Convert GDP deflator to inflation rate:
πt = ln(GDP Dt ) − ln(GDP Dt−1 )
​ ​ ​

Step 2: Stationarity analysis


1. Plot the inflation series
2. Test for stationarity using ADF test
3. Apply appropriate transformation if needed
Step 3: Model identification
Examine ACF and PACF patterns to identify potential ARIMA(p,d,q) models. For inflation, common
specifications include:
ARIMA(1,0,0) - AR(1)
ARIMA(1,0,1) - ARMA(1,1)
ARIMA(2,0,0) - AR(2)
Step 4: Model estimation and selection
1. Estimate candidate models
2. Compare using information criteria
3. Check residual diagnostics
4. Test parameter stability
Step 5: Forecasting
For the best model:
1. Generate quarterly inflation forecasts for 2009
2. Compute forecast standard errors
3. Construct prediction intervals
4. Convert inflation forecasts back to GDP deflator levels: GDP DT +h = GDP DT ×
​ ​

exp(∑hj=1 π
^T +j )
​ ​

Step 6: Interpretation
Interpret the model in terms of:
Inflation persistence (AR parameters)
Mean-reverting behavior
Implications for monetary policy

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy