Hello, I am trying to program a forecast error variance decomposition of a VAR. I am using the bootstrap algorithm to compute standard errors for the explanation shares of the various shocks. After accumulating the impulses I need to take squares. But I found the following strange error inside my program. When I am squaring the impulse responses inside the bootstrap loop the resulting series is not the correct square of the original series.
I attached a file demonstrating the problem. This file is not my program, I just use it to demonstrate the problem shortly. I just took the bootvar.prg provided by estima. I calculated squares of the impulses inside the bootstrap loop. After finishing the bootstrap replications I read the mean of the impulse responses and calculate squares. I compare the squares of the responses calculated outside the bootstrap loop with those calculated inside the bootstrap. Normally the difference should be zero. But there is a growing bias. Where is my mistake?
Thanks a lot in advance
wolfgang
