[R-SIG-Finance] rugarch package

alexios ghalanos alexios at 4dscape.com
Sun Jun 23 18:55:42 CEST 2013


Hi Jun,

This is likely related to the time format of the data you are passing to 
the ugarchfit function ('data' argument). Ideally it should be an xts 
object, with a POSIXct (or Date) index, and you have also set your 
timezone (e.g. Sys.setenv(TZ="GMT") ).

You should really take some time to familiarize yourself with R's 
Date/Time functions and the xts package (it will payoff in the long run, 
IMHO).

Best,

Alexios

On 23/06/2013 17:38, jun wang wrote:
> Hi, Alexios,
>
> I am using the rugarch package to get the conditional variance of the
> uni variate garch model. But the result i got seems a little weird, see
> below:
>
> uspec = ugarchspec(mean.model = list(armaOrder = c(0,0),include.mean=TRUE),
>                     variance.model = list(garchOrder = c(1,1), model =
> "sGARCH"),
>                     distribution.model = "ghyp")
> fit1=ugarchfit(uspec,data=jpm)
> fit2=ugarchfit(uspec,data=sp500)
>
> a=sigma(fit1)
> b=sigma(fit2)
> H=cbind(1/a,1/b)
>
> In the matrix H, i had the following format:
> 1970-01-01 19:00:00 0.10648731 0.004840093
> 1970-01-02 19:00:00 0.13220160 0.003223305
>
> Any way to get rid of  1970-01-01 19:00:00?
>
> Many thanks!!!
>
> Jun
>



More information about the R-SIG-Finance mailing list