[R-SIG-Finance] "rugarch" and external regressors

alexios ghalanos alexios at 4dscape.com
Sun Mar 3 19:51:10 CET 2013


On 03/03/2013 17:58, Max Alletsee wrote:
> Hi,
>
> i'm trying to fit some GARCH models with external regressors using the
> package "rugarch", but it keeps on failing...
>
> This is how I create my zoo-object:
>
>> ts.rtr <- ts(data=as.numeric(df.merged.imputed[1,32:5525]), start=1,
>> end=5494, frequency=1)
>> ts.rtr.zoo <- as.zoo(ts.rtr)
>
>
> This is the specification of my model:
>
>>   spec <- ugarchspec(variance.model = list(model="sGARCH", garchOrder =
>> c(1,1), external.regressors=as.matrix(df.merged.imputed[1,c(4, 9, 11)])))
>
Run:
'NROW(as.matrix(df.merged.imputed[1,c(4, 9, 11)])))'.

How many rows does that report? Are they the same as NROW(ts.rtr.zoo)?

>
> This is my attempt to fit the model:
>
>> fit <- ugarchfit(spec = spec, data = ts.rtr.zoo, solver = "hybrid")
>
>
> It always stops with the error message:
>
>> Error in .sgarchfit(spec = spec, data = data, out.sample = out.sample,  :
>
>    Subscript out of bounds
>
>
-Alexios



More information about the R-SIG-Finance mailing list