Universidad Privada Boliviana / Universidad del Pacífico (Lima, Perú)
Prof. J. Dávalos (Ph.d.)
Modeling \(\sigma_t\) (volatility)
Introduction
Biographical note
“I took a sabbatical at LSE in 1979. Lindsey was then 2 and we rented a lovely row house in Hampstead with a back garden and a study in the back of the first floor. It was there that a new idea came.
I was interested in Milton Friedman‘s conjecture that inflation uncertainty was a central cause of business cycles. Investors who did not know what prices and wages would be in the future might invest less. To test this, a time series model was needed with variances that could change over time. There were two tools that came together to solve this problem. I had done a lot of work with the Kalman Filter and recognized that a one step predictive density would be sufficient to define a likelihood function. The second tool was a test. Clive had recently proposed a test for bilinear time series models. He came by my computer one day before I left and suggested I square the residuals and then fit an autoregression. To my amazement, it was quite significant. I suspected that this test was the optimal Lagrange Multiplier test for some new type of model, but not the bilinear model. I was later to discover that it is indeed the optimal test for ARCH and it is so called today.
Lunch and tea at the LSE were very stimulating times for me. Each day I would get a little further on this new model and would talk with Sargan or Durbin or Hendry or Harvey about its properties and my proofs. David Hendry eventually named it AutoRegressive Conditional Heteroskedasticity and offered to have Frank Srba program it. We applied it to UK inflation data and the ARCH model was launched…”
Modeling uncertainty by endogeneizing \(\sigma_t\) quickly found applications in investment and portfolio management technologies.
Now it was possible to introduce further uncertainty in asset pricing models (Black and Scholes pricing among others), enhanced portfolio optimization (Markov models), market risk estimation (parametric Value at Risk, etc.)
Although to be fair, stochastic volatility models were available much earlier, they were not as parsimonious in terms of estimation and interpretation.
In economics
Countless macro models relied on homoskedasticity assumptions
Specifically, ARMA models impose constant variance on the WN
Modeling \(\sigma_t\) aka heteroskedasticity. How ?
“…He [Clive Granger] came by my computer one day before I left and suggested I square the residuals and then fit an autoregression. To my amazement, it was quite significant…” R. Engle III.
Remember the linear regression is a model for the conditional expectation: \(E(Y_t| . ) = a + \sum_{j=1}^p \delta_j Y_{t-j}\)
Given a zero mean error term noted \(u_t\) whose volatility is suspected to be time varying means that:
\(V(u_t| . ) = E(u_t^2| . ) = \sigma_t^2\)
By definition, this variance is allowed to be time varying, however, it must be covariance stationary.
The ARCH model
An autoregression AR(p) on the latter \(u_t\) means:
“…David Hendry eventually named it AutoRegressive Conditional Heteroskedasticity and offered to have Frank Srba program it…”
The GARCH model
So that was the ARCH model… an AR(p) on the squared residuals.
“…Tim [Bollersllev] took the ARCH model, added a moving average and created GARCH. The GARCH model is an infinite order ARCH model with a geometrically declining set of weights…”:
This is an ARMA on the squared residuals, where \(\epsilon_t\) must be WN as well. Hence, we could apply the full Box-Jenkins technology to specify a volatility model.
Covariance stationarity of \(u_t^2\) must hold: \(\sum_j |\alpha_j| <1\)
Implementation
A well specified model for the mean (conditional expectation) must exist i.e. its error term must be WN
A manual (less-efficient) two-step estimation may generate the residuals from \(E(Y_t|.)\) model. This is the first step.
In a second step, one estimates an ARMA(p,q) based on the squared residuals (Box-Jenkins, etc.)
Most software employ a one-step full information maximum likelihood estimator. It is more efficient and does not neglect the randomness of the first step. We do not need to stick to normality since alternative ML distributions exist.
Two-step inefficient implementation
The following stata code specifies a model for the U.S. inflation. The Box-Jenkins approach suggests an ARMA(1,1).
A battery of tests on the ARMA(1,1) residuals show that they are WN but are not normal.
The correlogram on the squared residuals unveil the autocorrelations that characterize an ARMA process i.e. GARCH process. However, the order of the process is hard to identify.
A parsimonious ARCH(4) is retained, its residual (wn_z) is white noise although it is not normally distributed.
Revisiting (the correlogram) and normality test on \(\sqrt{\varepsilon_t^2/\sigma_t^2}\) which should have variance = 1 reject the null. The standarization does not resolve the non-normality issue.
This may be the consequence of a structural shock in the WN distribution during the 1970’s which goes beyond the variance.
Stata code
webuse wpi1, cleartsline wpi* Inflation rategenpi = d.ln_wpitslinepi* The meanmodel* ARMA(?,?){* Box-Jenkins stage Icorrgrampi ,lags(10)acpi* Correlograms suggest ARMA(1,1) AR(2) AR(3) AR(4)arimapi , ar(1) ma(1)estaticpredict res11 , r* -756 -745arimapi , ar(1/4)estatic* -756 -739predict res4 , rarimapi , ar(1/3)estatic*-753 -739arimapi , ar(1/2)estatic* -753 -742predict res2 , r}* Stage II* IC suggest ARMA(1,1) and AR(4)* Stage III* WN testsforeachnamein res4 res11{ * 1 Visualization `name'tsline`name' , name(line`name', replace) * 2 Correlograms and Q-test (Portmanteau) `name'corrgram`name' , lags(10)ac`name' , name(ac`name', replace) * 3 Normality `name'sfrancia`name'hist(`name' ), normalname(hist`name', replace)}* The ARMA(1,1) and AR(4) residuals donot pass the normality test* Yet, both have well behaved correlograms* The high volatility during the 70s may cause these residuals * no to benormal (they are fat tailed, see the histogram)* The ARMA(1,1) has better IC so it is the best one.* GARCH(?,?) modeling* Box - Jenkins* Stage Igen z = res11^2 // squared residualscorrgram z, lags(10)ac z* The first AC =0.* high PACF at lags 2, 4, 6* high ACF at lag 2, 4* The model could be an ARCH(4) (several other were implemented)* B-J Stage II * ARCH modelqui:arima z , ar(1 2 3 4) // all lagsestaticpredict wn_z , rpredict sigma2_t , xb// predicted variance of the error* Stage III - is the errorof the ARCH equation WN* 1 Visualization tsline wn_z , name(line_wnz, replace) * This has some issues during the 70s* 2 Correlograms and Q-test (Portmanteau) zcorrgram wn_z , lags(10) * Portmanteau tests alldonot reject the nullac wn_z , name(ac_wnz, replace) * Individual autocorrelations also donot reject the null* Error are white noise* 3 Normality zsfrancia wn_zhist(wn_z ), normalname(histwnz, replace)* Revisiting the normality of the meanerror (ARMA(1,1))* by standarizing its WN errorgen Standarized = sqrt(z/sigma2_t)sfrancia Standarized
One-step FIML implementation
This is computationally intensive but guarantees proper statistical inference as it integrates both equations multivariate process.
Since variances need to be positive, the estimation algorithms introduce natural constraints on the GARCH, ARCH parameters
Normality should not be a concern as alternative distributions exist.
Implementation in STATA
Stata cannot handle MA(q) terms in the mean equation, so to replicate our trial with US inflation we will use the second best AR(4) process which had non-normal WN errors.
We also implement a ARCH-LM test on the OLS regression.
webuse wpi1, cleargenpi = d.ln_wpi* Mean equation:regpil.pi l2.pi l3.pi l4.pi* LM testforarcheffects (from the OLS estimator):estatarchlm, lags(5)* arch estimation by MLarchpil.pi l2.pi l3.pi l4.pi, arch(1 2 3 4)
Pick Bolivia’s inflation rate, the longest quarterly time series available and identify whether its volatility may be modelled by an GARCH or ARCH process. * Specify the best AR(p) process for the mean using B-J approach (summarize your diagnostics) * Analyze the correlogram of the squared residuals and run the ARCH-LM test * Specify your ARCH - GARCH model, and perform diagnostics on your standarized residuals * What are the periods of high inflation uncertainty, other than the mid-80’s?