GabauerDavid / ConnectednessApproach

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nfore parameter doesn't work when using ElasticNet Model

Jizhou625 opened this issue · comments

commented

Problem: nfore parameter doesn't work when using ElasticNet Model

Key words: nfore param; Variance decomposition; ElasticNet

Reproduction: I am using the ConnectedApproach api. When I set model="VAR", the "nfore = n" parameter works, it returns the correct forecast error variance decomposition with forecast step n.
However, when I set model="LASSO"/"Ridge"/"Elastic", the nfore parameter doesn't work. I tried to change nfore from 1-10, but it reports the same forecast error variance decomposition result.
Is this function not yet fully implemented?

Codes:
1680429710329

Thank you

Dear Jizhou,
As I am currently without laptop it is difficult for me to reproduce your error. Just by going through the code I could not spot an error. The GFEVD is a separate function which uses the VAR coefficient and variance covariances matrix and is the same for all models. According to the code the ElasticNet VAR should work. If not you should get a different error message. Please fix nfore to a specific number to avoid that n gets updated and is always the same number.
Best,
David

commented

It seems there is something wrong with my data. The coefficients of my ElasticNet VAR are all reduced to 0. The code is right, Thank you very much for the help

Always welcome!