I work in a recursive dynamic CGE model.
my set is
t time /1*20 /;
I want to have one shock from t=1 to t=4 (for example increase tax) and I want to have another shock from t=5 to t=20 (for example increase productivity). But I do not know how I can write a loop for this purpose. please help me

I did exactly that, but when I increase the time, for example, from 20 to 30 years, my answer is different.
For example for t /120/
I increase the tax rate (t.val<5) then the average GDP decrease 0.5 % from the first year to fifth year
when t is /130/
and I increase the tax rate (t.val<5) then the average GDP decrease by 0.8 % from the first year to the fifth year.
I think it is wrong.