[R-SIG-Finance] Problem with garch (tseries)

Patrick Burns patrick at burns-stat.com
Sat Aug 19 11:10:34 CEST 2006


Two ideas, no guarantees.

The working paper "The quality of Value at Risk via
univariate GARCH" on the Burns Statistics website
indicates that giving more weight to recent observations
in the estimation can be a good thing.

I don't have experience with it, but it seems to me that
Bayesian estimates could be useful.  We have a reasonable
idea of what are silly estimates and what are not so silly,
so an informative prior makes sense.

If you have implied volatilities at different expiries, then you
should be able to get a sense of the half-life.  For the garch(1,1)
model this is a function of alpha plus beta.  So that would be
something to put a prior on.  But the components model
(described in the paper already referred to) is likely to give
better predictions, and its half-life only depends on one
parameter.

Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

michael mathews wrote:

>As I mentioned to Joe off list I am dealing with natural Gas prices at
>houston ship channel. While I could assemble a longer price series it
>seems that nat gas has entered into a new price/volatility regime in
>the last two years which I think makes using older data somewhat
>problematic.
>
>If garch does not like "small" samples what would be a robust way to
>estimate the volatility?
>
>thanks for your input
>
>michael
>
>--- Patrick Burns <patrick at burns-stat.com> wrote:
>
>  
>
>>These are good points.  But probably a key aspect
>>is that garch thinks 800 data points is a small sample,
>>and 400 points (at least for daily data) is likely to yield
>>parameter estimates that are exceptionally variable.
>>
>>Patrick Burns
>>patrick at burns-stat.com
>>+44 (0)20 8525 0696
>>http://www.burns-stat.com
>>(home of S Poetry and "A Guide for the Unwilling S User")
>>
>>Joe W. Byers wrote:
>>
>>    
>>
>>>Micheal,
>>>
>>>Physical natural daily prices are a problem with time series models 
>>>especially if the physical asset is storable.  Storable assets means
>>>      
>>>
>>>that the prices are not an easy single model time series process but
>>>      
>>>
>>a 
>>    
>>
>>>multi-variate model ie Supply and Demand.  Another problem is the 
>>>returns of these prices are not normally distributed especially over
>>>      
>>>
>>>short times series. Other things to think about are how liquid are
>>>      
>>>
>>these 
>>    
>>
>>>asset prices, the breath and depth of the markets, are is there a
>>>      
>>>
>>well 
>>    
>>
>>>developed forward market?
>>>
>>>These do not mean that your model is not going to work, it may just
>>>      
>>>
>>not 
>>    
>>
>>>be robust next time you estimate it.  I would suggest running some 
>>>outlier tests for spikes in the prices, looking at volatility
>>>      
>>>
>>clustering 
>>    
>>
>>>around these outliers.  Also consider using a GED GARCH model that
>>>      
>>>
>>is 
>>    
>>
>>>normal distribution under restrictions on the parameters and a
>>>      
>>>
>>negative 
>>    
>>
>>>exponential on others.  My collegues and I and U Tulsa have found
>>>      
>>>
>>this 
>>    
>>
>>>works well for some Power prices and Weather Temps.  I am working on
>>>      
>>>
>>it 
>>    
>>
>>>for other prices series as well.
>>>
>>>Good Luck
>>>Joe
>>>
>>>michael mathews wrote:
>>> 
>>>
>>>      
>>>
>>>>Hi folks,
>>>>I have been playing with garch models to model the volatility in
>>>>physical natural prices. 
>>>>Here is the issue I have a dataset of 801 daily returns (attached).
>>>>If I run
>>>>
>>>>garchall<-garch(hsc)
>>>>
>>>>***** ESTIMATION WITH ANALYTICAL GRADIENT ***** 
>>>>
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>summary(garchall)
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Call:
>>>>garch(x = hsc)
>>>>
>>>>Model:
>>>>GARCH(1,1)
>>>>
>>>>Residuals:
>>>>   Min      1Q  Median      3Q     Max 
>>>>-4.3424 -0.5734  0.0000  0.6037  4.0501 
>>>>
>>>>Coefficient(s):
>>>>   Estimate  Std. Error  t value Pr(>|t|)    
>>>>a0 2.507e-05   9.200e-06    2.726  0.00642 ** 
>>>>a1 1.218e-01   2.085e-02    5.840 5.21e-09 ***
>>>>b1 8.759e-01   1.937e-02   45.212  < 2e-16 ***
>>>>---
>>>>Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
>>>>
>>>>Diagnostic Tests:
>>>>       Jarque Bera Test
>>>>
>>>>data:  Residuals 
>>>>X-squared = 62.7291, df = 2, p-value = 2.387e-14
>>>>
>>>>
>>>>       Box-Ljung test
>>>>
>>>>data:  Squared.Residuals 
>>>>X-squared = 0.0384, df = 1, p-value = 0.8447
>>>>
>>>>Now if we run the same model on a subset say the last 351 days we
>>>>        
>>>>
>>get
>>    
>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>garch351<-garch(tail(hsc,351))
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>***** ESTIMATION WITH ANALYTICAL GRADIENT ***** 
>>>>
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>summary(garch351)
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Call:
>>>>garch(x = tail(hsc, 351))
>>>>
>>>>Model:
>>>>GARCH(1,1)
>>>>
>>>>Residuals:
>>>>     Min        1Q    Median        3Q       Max 
>>>>-4.171521 -0.424628  0.008727  0.532158  3.962116 
>>>>
>>>>Coefficient(s):
>>>>   Estimate  Std. Error  t value Pr(>|t|)    
>>>>a0 2.511e-05   1.589e-05    1.580 0.114167    
>>>>a1 1.043e-01   2.950e-02    3.536 0.000406 ***
>>>>b1 8.957e-01   2.567e-02   34.896  < 2e-16 ***
>>>>---
>>>>Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
>>>>
>>>>Diagnostic Tests:
>>>>       Jarque Bera Test
>>>>
>>>>data:  Residuals 
>>>>X-squared = 76.3704, df = 2, p-value < 2.2e-16
>>>>
>>>>
>>>>       Box-Ljung test
>>>>
>>>>data:  Squared.Residuals 
>>>>X-squared = 1.2806, df = 1, p-value = 0.2578
>>>>
>>>>still ok. Now finally we get t the point of this email lets look at
>>>>        
>>>>
>>352
>>    
>>
>>>>days of data:
>>>>
>>>>garch352<-garch(tail(hsc,352))
>>>>
>>>>***** ESTIMATION WITH ANALYTICAL GRADIENT ***** 
>>>>
>>>>
>>>>Warning message:
>>>>NaNs produced in: sqrt(pred$e) 
>>>>   
>>>>
>>>>        
>>>>
>>>>>summary(garch352)
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Call:
>>>>garch(x = tail(hsc, 352))
>>>>
>>>>Model:
>>>>GARCH(1,1)
>>>>
>>>>Residuals:
>>>>    Min       1Q   Median       3Q      Max 
>>>>-4.16377 -0.58155  0.01454  0.70886 12.41242 
>>>>
>>>>Coefficient(s):
>>>>   Estimate  Std. Error  t value Pr(>|t|)    
>>>>a0 2.428e-05   1.556e-05    1.561 0.118632    
>>>>a1 1.043e-01   2.947e-02    3.540 0.000400 ***
>>>>b1 8.962e-01   2.556e-02   35.058  < 2e-16 ***
>>>>---
>>>>Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
>>>>
>>>>Diagnostic Tests:
>>>>       Jarque Bera Test
>>>>
>>>>data:  Residuals 
>>>>X-squared = 10993.57, df = 2, p-value < 2.2e-16
>>>>
>>>>
>>>>       Box-Ljung test
>>>>
>>>>data:  Squared.Residuals 
>>>>X-squared = 0.1831, df = 1, p-value = 0.6687
>>>>
>>>>whats up? Any Ideas. 
>>>>I have also tried using garchFit from the fSeries package but it
>>>>        
>>>>
>>locks
>>    
>>
>>>>up completely left it running last night and it was still spinning
>>>>        
>>>>
>>this
>>    
>>
>>>>morning when I got back to the office.
>>>>
>>>>thanks in advance
>>>>
>>>>michael
>>>>
>>>>   
>>>>
>>>>        
>>>>
>=== message truncated ===
>
>_______________________________________________
>R-SIG-Finance at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>--------------------------------------------------------
>
>If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail.     http://www.ml.com/email_terms/
>--------------------------------------------------------
>
>
>  
>



More information about the R-SIG-Finance mailing list