[R-SIG-Finance] fGarch predict
chalabi at phys.ethz.ch
chalabi at phys.ethz.ch
Fri Feb 29 10:30:22 CET 2008
Hi Spencer,
I checked this morning your issue with garch(1,0).
In fGarch package the conditional variance of the GARCH(p,q) is defined as
\sigma_t^2 = \omega
+ \sum_{i=1}^p \alpha_i \epsilon_{t-i}^2
+ \sum_{j=1}^q \beta_j \sigma_{t-j}^2
When the order q of this GARCH model is zero, the model is reduced to the
ARCH(p) model. But when the order p is zero, the model is
ill-specified (i.e p > 1).
It is normal that garch(0,1) fails. But there is indeed a problem in the case
garch(1,0). I made the appropriate changes to the dev-version of Rmetrics
to make it work and I added an error message when p is set to zero.
thanks for your feedback,
Yohan
and I made the
appropriate change to the dev-version of Rmetrics.
But in the case garch(0,1) is normat that it fails.
Spencer Graves <spencer.graves at pdf.com> writes:
> Hi, Yohan:
>
> I want to thank you again for working to improve 'garchFit' and
> the documentation.
>
> I wonder if you have time to also improve the documentation for
> predict.garchFit', including the following example:
>
> x <- garchSim()
> fit <- garchFit(~arma(1,0)+garch(1,1), data=x)
> predict(fit)
>
> Secondarily, I get error messages from garch(1, 0) and garch(0,
> 1):
>
> fit01 <- garchFit(~garch(0,1), data=x)
> Error in .garchInitParameters(formula.mean = formula.mean, formula.var
> = formula.var, :
> object "alpha" not found
>
> fit10 <- garchFit(~garch(1,0), data=x)
> Error in sum(beta) : invalid 'type' (closure) of argument
>
> Best Wishes,
> Spencer
>
> babel at centrum.sk wrote:
>> Hello
>> I want to predict the future values of time series with Garch
>> When I specified my model like this:
>> library(fGarch)
>> ret <- diff(log(x))*100
>> fit = garchFit(~arma(1,0,0)+garch(1, 1), data =ret)
>> predict(fit, n.ahead = 10)
>>
>> meanForecast meanError standardDeviation
>> 1 0.01371299 0.03086350 0.03305819
>> 2 0.01211893 0.03094519 0.03350248
>> ....................................................................................
>>
>> I know that if I use fit = garchFit(~garch(1, 1), data =ret) I got constant mean, so trherefore I include amra term to move with mean
>>
>> Iam not sure what values are hiding in this output. 1. Does
>> menForecast hold my future predicted values?
>> 2.Or I am able to just compute the confidence intervals for my prediction like meanForecast +-2*standardDeviation ??
>> 3Or I need to compute the future values like yt=meanForecast+meanError*sqrt(standardDeviation) ???
>> My return looks like standard return series with plus and minus
>> values, [748,] 0.008184311 [749,] 0.024548914 [750,]
>> -0.008182302
>>
>> so I hope I would get similar prediction to this return, not just a postive mean constant.Sorry, I know that Garch models are for volatility modelling, but I still doesnt find how to use that volatility for forecasting future values. Short example with 5 step ahead prediction will surely help.
>> Thank you
>>
>> _______________________________________________
>> 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.
>>
--
Yohan Chalabi
More information about the R-SIG-Finance
mailing list