[R-SIG-Finance] Questions on fitted garch(1,1)

Patrick Burns patrick at burns-stat.com
Thu Nov 4 22:12:27 CET 2010


Taking Alexios' advice will probably
help, but I wouldn't be surprised if
they are still not the same.  The
garch likelihood is extremely tricky
to optimize -- specialized optimizers
would be the ideal.

Assuming you can give starting values
to the optimizer in both cases, you can
give the other's answer to each and see
what happens.

On 04/11/2010 21:02, alexios wrote:
> The default for fGarch::garchFit is to estimate the mean, assuming a
> non-zero mean dataset is passed, as can be seen from the returned "mu"
> parameter ( a call to 'args(garchFit)' should highlight the
> 'include.mean' argument ). The default for tseries garch is to assume
> zero mean data.
>
> Demean the data before passing to tseries garch by the estimated 'mu'
> value from 'fgarch.fitted' and you should obtain closer results.
>
> -Alexios
>
>
>
> On 11/4/2010 8:44 PM, Mark Breman wrote:
>> Hi everyone,
>>
>> I'm trying to predict volatility using a garch(1,1) model and I'm running
>> into some interesting issues I cannot find an answer for.
>>
>> Suppose I have the following code:
>>
>> library(quantmod)
>> library(tseries)
>> library(fGarch)
>>
>> # get some returns
>> r = dailyReturn(Ad(getSymbols("SPY", from="2000-01-01", to="2010-11-04",
>> auto.assign=F)))
>>
>> # fit models
>> garch.fitted = garch(na.omit(r), order = c(1,1))
>> fgarch.fitted = fGarch::garchFit(~ garch(1,1), data = as.zoo(na.omit(r)),
>> trace = FALSE)
>>
>> Now if I look at the values of the coefficients for both fitted models they
>> are not the same:
>>
>>> coef(garch.fitted)
>>            a0           a1           b1
>> 1.339912e-06 8.165689e-02 9.101754e-01
>>> coef(fgarch.fitted)
>>            mu        omega       alpha1        beta1
>> 4.990616e-04 1.370880e-06 8.307080e-02 9.086447e-01
>>
>> Q1) Why are they different? What do I have to change to make the coefficient
>> values of fgarch.fitted the same as garch.fitted?
>>
>> If I try to predict the volatility with: predict(garch.fitted) I get the
>> "conditional standard deviation predictions" (an interval) for every period
>> return in r.
>>
>> Q2) Is this a 1 period prediction (i.e. the volatility prediction for the
>> next day)? How do I get a prediction for let's say 2 periods in the future?
>>
>>
>> If I use predict(fgarch.fitted) I get:
>>
>>> predict(fgarch.fitted)
>>     meanForecast   meanError standardDeviation
>> 1  0.0004990616 0.006677350       0.006677350
>> 2  0.0004990616 0.006751925       0.006751925
>> 3  0.0004990616 0.006825079       0.006825079
>> 4  0.0004990616 0.006896859       0.006896859
>> 5  0.0004990616 0.006967315       0.006967315
>> 6  0.0004990616 0.007036491       0.007036491
>> 7  0.0004990616 0.007104428       0.007104428
>> 8  0.0004990616 0.007171167       0.007171167
>> 9  0.0004990616 0.007236745       0.007236745
>> 10 0.0004990616 0.007301198       0.007301198
>>
>> Q3) Why is the meanForecast for all 10 future periods the same?
>>
>> Thanks,
>>
>> -Mark-
>>
>>
>>
>> predict(garch)
>>
>> 	[[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only. If you want to post, subscribe first.
>> -- Also note that this is not the r-help list where general R questions should go.
>>
>>
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>

-- 
Patrick Burns
patrick at burns-stat.com
http://www.burns-stat.com
http://www.portfolioprobe.com/blog



More information about the R-SIG-Finance mailing list