Displaying 2 results from an estimated 2 matches for "harrvj".
2012 Jul 19
1
Change log(J) to log(J+1) to stop log(0) from occurring in harModel
...or&pathrev=1028.
It is not my code and I make no claim to other's good 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, off...
2012 Jul 19
1
Switching log(J) to log(J+1) to avoid log(0) in HAR-RVJ model
...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?_(t-22) + ?_J J_t
+ ?_(t,t+h) # NULL model in code at bottom
2. (RV?_(t,t+h) )^(1/2) = ?_0+ ?_D ??RV?_t?^(1/2)+ ?_W (?R...