search for: harmodel

Displaying 2 results from an estimated 2 matches for "harmodel".

2012 Jul 19
1
Change log(J) to log(J+1) to stop log(0) from occurring in harModel
...od work, and apologize if I should even be posting it I am not sure, but in the transform function it allows to change the model to `log` or `sqrt`, but when then model is changed to log and the model used is either "HARRVJ" or "HARRVCJ" it will return the following error: x = harModel(dat, periods = c(1,5,22), periodsJ=c(1), RVest = c("RCov","RBPCov"), + type="HARRVJ", h=22, transform="log") ; # Estimate .... [TRUNCATED] Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : NA/NaN/Inf in foreign functio...
2012 Jul 19
1
Switching log(J) to log(J+1) to avoid log(0) in HAR-RVJ model
...ot;)) dat <- as.xts(dat) ## cleaned data here to get daylist <- lapply(split(dat, "days"), function(x) { if(NROW(x) >= 10) x }) do.call(rbind, daylist) -> dat makeReturns(dat) -> dat the code I am running to get the HAR regressions (full code for it shown below) is x = harModel(dat, periods = c(1,5,22), periodsJ=c(1), RVest = c("RCov","RBPCov"), type="HARRVJ", h=5, transform="log") ; # Estimate the HAR model of type HARRVJ The three HAR models on paper are: 1.?RV?_(t,t+h) = ?_0+ ?_D ?RV?_t+ ?_W ?RV?_(t-5)+ ?_M ?RV?_(...