[R-SIG-Finance] Get forecasted sigmas of ugarchforecast() functions
alexios ghalanos
alexios at 4dscape.com
Sat Oct 27 15:52:32 CEST 2012
Read the documentation on the available methods to work with the
returned object of class uGARCHforecast:
?'uGARCHforecast-class'
In particular, the "as.data.frame" method which takes additional
arguments e.g. as.data.frame(forecast, which = "sigma").
Also available for more complicated forecast setups is the "as.array"
and "as.list" methods.
-Alexios
On 27/10/12 16:04, jaimie villanueva wrote:
> Dear ALL,
>
> I'm using ugarchforecast() to make predictions of a Garch1.1 model.
> I'm just interesting in 1 day ahead prediction so I have run this lines:
>
> *spec=ugarchspec(variance.model = list(model = "sGARCH", garchOrder =
> c(1,1)),mean.model = list(armaOrder = c(0,0), include.mean =
> F),distribution.model = "norm")*
> *model=ugarchfit(spec,sample,solver = "solnp")*
> *forecast=ugarchforecast(model, data = sample, n.ahead = 1, n.roll =
> 0,out.sample =0)*
>
> The code works properly and when I ask to see forecast results, I obtain
> the following:
>
> **------------------------------------*
> ** GARCH Model Forecast *
> **------------------------------------*
> *Model: sGARCH*
> *Horizon: 1*
> *Roll Steps: 0*
> *Out of Sample: 0*
> *
> *
> *0-roll forecast: *
> * sigma series*
> *6436 0.01436 0*
>
>
> My question is: How can I get the sigma value= 0.01436 ??
>
> I've tried to accessing to " forecast at forecast$forecasts " but I obtained
> the following:
>
> forecast at forecast$forecasts
> [[1]]
> sigma series
> 6436 0.01435821 0
>
> The output are this 3 figures but I just want the sigma and I'm not able to
> choose it.
>
> I've also tried "forecast at forecast$forecasts[1] " without success.
>
> I guess I'm pretty close to get It but I can't.
>
> Any idea would be greatful.
>
> Thanks in advanced and have a good weekend All of You.
>
> Jaimie
> *
> *
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at r-project.org 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.
>
More information about the R-SIG-Finance
mailing list