wbnicholson / BigVAR

Dimension Reduction Methods for Multivariate Time Series
56 stars 17 forks source link

Rolling n-period ahead predictions #41

Open sehoff opened 1 year ago

sehoff commented 1 year ago

Hi, and thanks for this great package. It really helps!

I want to get the n-period ahead forecast in a rolling sense. This means that I need to find the best lambda, make n-period ahead predictions, increase my validation sample (recursive or rolling, this does not matter) by one time period, and re-do the step above.

What would be the most efficient way to get the n-ahead predictions for this scenario? Right now I am thinking about using cv.BigVAR to get the optimal lambda and subsequently re-fit using BigVAR.fit(), before predicting predict(n.ahead=n).

Put differently, I am wondering if my result can be achieved in a one-shot estimation?

wbnicholson commented 1 year ago

You should be able to accomplish this with a call to cv.BigVAR. You can adjust the forecast horizon by adjusting h in constructModel. The option rolling_oos=TRUE will update the penalty grid over the evaluation period. The out-of-sample predictions are stored in @preds.

sehoff commented 1 year ago

Great, I will have a look into it!