Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rolling n-period ahead predictions #41

Open
sehoff opened this issue Oct 25, 2022 · 2 comments
Open

Rolling n-period ahead predictions #41

sehoff opened this issue Oct 25, 2022 · 2 comments

Comments

@sehoff
Copy link

sehoff commented Oct 25, 2022

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
Copy link
Owner

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
Copy link
Author

sehoff commented Oct 26, 2022

Great, I will have a look into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants