Thanks again Johannes! This is really beyond the call of duty!
I quickly skimmed your code. Is the following interpretation right
- You simulate looonnngg sequence with zero shocks and take the last value to of the path to get what you call “ergodicmean_no_shocks”.
- You simulate the shocked path starting from this “ergodicmean_no_shocks” and calculate the impulse responses as the deviation from the above mentioned “ergodic mean”.
Cheers,
Antti