D.1 AR(1)-GARCH(0,1)

Assume the return on the S&P 500 follows a AR(1)-GARCH(0,1) model. Write down the data generating process. Write down the likelihood function. Determine the two period ahead return forecast. Determine the two period ahead variance forecast.

Data Generation:

import matplotlib.pyplot as plt
import pandas as pd
from datetime import datetime
import yfinance as yf
import pandas_datareader.data as pdr
import numpy as np
import statsmodels.api as sm
from scipy import stats
yf.pdr_override()
start = datetime.strptime('2010-01-01', '%Y-%m-%d')
end = datetime.strptime('2020-01-01', '%Y-%m-%d')
sp500 = pdr.get_data_yahoo("^GSPC", start, end)['Adj Close']
sp500_1y_yield = (sp500.values[0:-365] - sp500.values[365:])/sp500.values[0:-365]
plt.plot(sp500_1y_yield)

#AR(1) y on X
X500AR1, y500AR1 = lag_data(sp500.values,1)
mean_equation = sm.OLS(y500AR1, sm.add_constant(X500AR1)).fit()
eps_y = mean_equation.resid

joint log-likelihood

$$ \begin{align*} ln L(.) &= \sum_{t=2}^T -\frac{1}{2} \ln (2\pi) - \frac{1}{2} \ln ( \sigma^2_{t-1} ) - \frac{1}{2} \, \frac{\epsilon^2_t}{ \sigma^2_{t-1} } \quad \text{with} \; \\\\ \epsilon_t & \equiv r^M_t - \phi_0 - \phi_1 r^M_{t-1} , \quad \text{and} \\ \\ \sigma^2_{t-1} & \equiv \alpha_0 + \, \beta_1 \, \times \, \sigma^2_{t-2} \quad \text{for} \, t>1 \\ \\ & \text{and} \; \sigma^2_{0} \equiv \frac{\alpha_0}{ 1 - \beta_j}. \end{align*} $$

Returns are modelled by AR(1) model:

$$ r^M_t = \phi_0 + \phi_1 r^M_{t-1} + \; \epsilon_t; $$

Therefore the two step ahead return forecast is given by the following equation:

$$ \begin{align*} E(r^M_{t+2}|\mathcal{F}t) &= \phi_0 + \phi_1 E(r^M{t+1}|\mathcal{F}t) + \underbrace{E(\epsilon{t+1}|\mathcal{F}t)}{=0} \\ \\ &= \phi_0 + \phi_1 E(r^M_{t+1}|\mathcal{F}t) \\ \\&= \phi_0 + \phi_1(\phi_0 + \phi_1 \times r^M{t} )\end{align*} $$

Additional the two step ahead volatility forecast is given by the next equation:

$$ \begin{align*} \hat{Var}u(r^M{u+2}) &= \hat{\alpha}0 + \hat{\alpha}1 \times (r^M{u+1} - E_u(r^M{u+1}))^2 + \hat{\beta}1 \, \times \hat{\sigma}^2{u+1}. \\ \\ \hat{Var}u(r^M{u+2})&=\hat{\alpha}0 + \hat{\alpha}1 \times (r^M{u+1} - E_u(r^M{u+1}))^2 \times \hat{\beta}_1 \, \times \hat{Var}u(r^M{u+1}) \\ \\\hat{Var}u(r^M{u+2}) &=\hat{\alpha}0 + \hat{\alpha}1 \times (r^M{u+1} - E_u(r^M{u+1}))^2 \\&+ \hat{\beta}_1 \, \times (\hat{\alpha}0 + \hat{\alpha}1 \times(r^M{u} - E_u(r^M{u}))^2 + \hat{\beta}1 \, \times \hat{\sigma}^2{u})\end{align*} $$


D.2 E-GARCH(1,2)

Assume the return on the BMW stock follows a E-GARCH(1,2). Write down the data generating process. Write down the likelihood. Explain how to estimate the parameters and how to find the time series of past return variance.

E-GARCH(1,2):

$$ \begin{align*} & \ln (\sigma^2_{t-1}):= \alpha_0 +\alpha_{1} \times \eta_{t-1}+\theta_{1}(|\eta_{t-1}|-E[|\eta_{t-1}|])+\beta_{1} \times \ln(\sigma^2_{t-2}) + \beta_{2} \times \ln(\sigma^2_{t-3})\end{align*} $$

with constant parameters $[\alpha_0, \alpha_1, \theta_1, \beta_1] \in \mathcal{R}^4$.