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

alexios ghalanos alexios at 4dscape.com
Sun Mar 3 23:17:11 CET 2013


Hi Max,

Please search the R-SIG-FINANCE mailing list archive of the last week or 
so to see a similar issue and some suggested solutions with regards to 
external regressors in the variance equation.

Regards,
Alexios

On 03/03/2013 21:35, Max Alletsee wrote:
> Hi Alexios,
>
> thanks for your quick and extremely helpful response (and for your
> beautiful package).
>
> You were right, the nrow() of both objects weren't equal (if anybody has
> a similar problem and finds this post in the mailing list while
> searching for help, here is my mistake: nrow(ts.rtr.zoo) was the length
> of the time series, while nrow(as.matrix(df.merged.__imputed[1,c(4, 9,
> 11)])) was the number of time series itself).
>
> Sorry for bothering you again, but i have some troubles fitting the
> model. The estimates for my external regressors seem to be very close to
> zero (in fact, all digits that are displayed are zero) and it happens
> quite often that ugarchfit cannot invert hessian.
> I have seen that it is possible and helpful to manipulate the solver
> using solver.control in order to get a better fit of the models, but i
> wonder if there are any rules of thumb for some cases? (I want to
> estimate parameters for 225 different univariate time series which i
> believe to be quite similar, so simply playing around with
> solver.control for every time series until it fits the data will be
> quite painful.) I've noticed that adjusting the tolerance parameter
> "tol" was helpful sometimes, but not in every single case. Is there some
> information in the data itself which tells me what kind of adjustments
> for the solver might be most helpful?
>
> Best regards,
> Max
>
>
> 2013/3/3 alexios ghalanos <alexios at 4dscape.com <mailto:alexios at 4dscape.com>>
>
>     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
>
>     _________________________________________________
>     R-SIG-Finance at r-project.org <mailto:R-SIG-Finance at r-project.org>
>     mailing list
>     https://stat.ethz.ch/mailman/__listinfo/r-sig-finance
>     <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