Skip to content

Latest commit

 

History

History
337 lines (233 loc) · 16.7 KB

lmegarch.rst

File metadata and controls

337 lines (233 loc) · 16.7 KB

Beta-t-EGARCH long memory models

Introduction ----------

Introducing a long-term and a short-term component into the Beta-t-EGARCH framework allows for the conditional volatility series to exhibit long memory, which is a feature of many financial time series, as first discussed by Mandelbrot in the 1960s:


yt = μ + exp (λt ∣ t − 1/2)ϵt


λt ∣ t − 1 = ω + λ1, t ∣ t − 1 + λ2, t ∣ t − 1

$$\lambda_{1, t\mid{t-1}} = \sum^{p}_{i=1}\alpha_{1,i}\lambda_{1,t-i} + \sum^{q}_{j=1}\beta_{1,j}u_{t-j}$$

$$\lambda_{2, t\mid{t-1}} = \sum^{p}_{i=1}\alpha_{2,i}\lambda_{2,t-i} + \sum^{q}_{j=1}\beta_{2,j}u_{t-j}$$


ϵt ∼ tν

We require α1 ≠ α2 for identifiability.

Developer Note ----------- This model type has yet to be Cythonized so performance can be slow.

Example

First let us load some financial time series data from Yahoo Finance:

import numpy as np
import pyflux as pf
import pandas as pd
from pandas_datareader import DataReader
from datetime import datetime
import matplotlib.pyplot as plt
%matplotlib inline 

jpm = DataReader('JPM',  'yahoo', datetime(2006,1,1), datetime(2016,3,10))
returns = pd.DataFrame(np.diff(np.log(jpm['Adj Close'].values)))
returns.index = jpm.index.values[1:jpm.index.values.shape[0]]
returns.columns = ['JPM Returns']

image

Let’s fit a long-memory Beta t EGARCH(1, 1) model using a point mass estimate zMLE:

model = pf.LMEGARCH(returns,p=1,q=1)
x = model.fit()
x.summary()

LMEGARCH(1,1)                                                                                             
======================================== =================================================
Dependent Variable: JPM Returns          Method: MLE                                       
Start Date: 2006-01-05 00:00:00          Log Likelihood: 6660.3439                         
End Date: 2016-03-10 00:00:00            AIC: -13306.6879                                  
Number of observations: 2562             BIC: -13265.748                                   
==========================================================================================
Latent Variable           Estimate   Std Error  z        P>|z|    95% C.I.                 
========================= ========== ========== ======== ======== ========================
Vol Constant              -9.263     0.6113     -15.1536 0.0      (-10.4611 | -8.0649)     
Component 1 p(1)          0.2491                                                           
Component 1 q(1)          0.0476                                                           
Component 2 p(1)          1.0                                                              
Component 2 q(1)          0.0935                                                           
v                         6.095                                                            
Returns Constant          0.0008     0.0386     0.0195   0.9844   (-0.075 | 0.0765)        
==========================================================================================

The standard errors are not shown for transformed variables. You can pass through a transformed=False argument to summary to obtain this information for untransformed variables.

Let’s plot the fit with :pyplot_fit:

model.plot_fit(figsize=(15,5))

image

And plot predictions of future conditional volatility with :pyplot_predict:

model.plot_predict(h=10)

image

Class Description ----------

References

Black, F. (1976) Studies of stock price volatility changes. In: Proceedings of the 1976 Meetings of the American Statistical Association. pp. 171–181.

Fernandez, C., & Steel, M. F. J. (1998a). On Bayesian Modeling of Fat Tails and Skewness. Journal of the American Statistical Association, 93, 359–371.

Harvey, A.C. & Chakravarty, T. (2008) Beta-t-(E)GARCH. Cambridge Working Papers in Economics 0840, Faculty of Economics, University of Cambridge, 2008. [p137]

Harvey, A.C. & Sucarrat, G. (2013) EGARCH models with fat tails, skewness and leverage. Computational Statistics and Data Analysis, Forthcoming, 2013. URL http://dx.doi.org/10.1016/j.csda.2013.09. 022. [p138, 139, 140, 143]

Mandelbrot, B.B. (1963) The variation of certain speculative prices. Journal of Business, XXXVI (1963). pp. 392–417

Nelson, D. B. (1991) Conditional heteroskedasticity in asset returns: A new approach. Econometrica 59, 347—370.