After splitting my data as the "in and out-of-sample" for volatility forecasting purpose in R, I estimate HAR model, but my estimated HAR model is for the whole sample. It does not estimate for the in sample. is there any specific code to include only in-sample?


closed as off-topic by whuber Aug 8 at 13:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – whuber
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ i just found the code: HARestimate(vRealizedMeasure = rv5_SPX[1:1917], vLags = c(1,5,22)) just need to specify time interval after your variable as above $\endgroup$ – barr Aug 8 at 14:32