[R] Writing HAR-RV-CJ Model?

2012-07-12 Thread cursethiscure
I am trying to write a loop to forecast realized volatility over successive days for the purpose of VaR prediction using the HAR-RV-CJ model which is as follows: log(RV_t+1) = β_0 + β_CD log(CV_t) + β_CW log(CV_t-5) + β_CM log(CV_t-22) + β_JD log(J_t) + β_JW J_t-5 + β_JM J_t-22 + e_t where RV

[R] HAR-RV-CJ Moedel

2012-07-12 Thread cursethiscure
I am trying to write a loop to forecast realized volatility over successive days for the purpose of VaR prediction using the HAR-RV-CJ model which is as follows: log(RV_t+1) = β_0 + β_CD log(CV_t) + β_CW log(CV_t-5) + β_CM log(CV_t-22) + β_JD log(J_t + 1) + β_JW log(J_t-5 + 1) + β_JM log(J_t-2

[R] Change log(J) to log(J+1) to stop log(0) from occurring in harModel

2012-07-19 Thread cursethiscure
I think the code is part of the RTAQ package but is not included in it, as I obtained it from https://r-forge.r-project.org/scm/viewvc.php/pkg/RTAQ/R/HAR_model.R?view=markup&root=blotter&sortby=author&pathrev=1028. It is not my code and I make no claim to other's good work, and apologize if I sh