Unfortunately, I get as a result the irf as in column I. I suspect that part of the problem is that the irf result from i_y, which stays at 100 every period, but I can’t figure out how to adjust the code so that I get column G as an output. Does someone has an idea what I’m doing wrong and how I can solve it?

yes, I have failed to explain the column G. I started with column E, which is the index with an arbitrary starting value of 100 and each preceding element of column E is multiplied by (1+zxf /100) in subsequent periods. I derived column G by taking the log of column E and multiplying by 100: log(E)*100

I think I have made a mistake because the plot should display the deviation of the output from its trend as in A. However, the plot looks like in B., i.e. output does not fluctuate around the trend, but around a mean value.

I assume that the problem is that i_y_II does not rise with each period, since in each period the index i_y=100 is reinserted in i_y_I instead of the respective values of the previous period, which continue to increase steadily.