I have been trying to introduce shocks in a 6 Variable VAR with Exogenous variables to simulate the effects of interest rate decisions in GDP and CPI.I have monthly data from 1997:1 to 2024:7.
*VAR Setup
Code: Select all
system(model=canvar2)
variables rgdpagr cpiagr t0yrate n0ebill exrateagr m1ppagr
lags 1 to 3
det constant rgdpgrus cpigrus n0ebillus t0yrateus m1ppgrus popexogenousgr wtiexogenousgr
end(system)
estimate(resids=residsexo)Code: Select all
forecast(model=canvar2,steps=24,from=2024:07,results=canvar2_fore)
*Introduction of shocks to simulate interest rate decisions from central banks
Code: Select all
do t = 2024:7, 2026:06
if t == 2024:10
compute shocks = ||0, 0, 0, -0.5, 0, 0|| ;
elseif t == 2024:12
compute shocks = ||0, 0, 0, -0.25, 0, 0|| ;
else
compute shocks = ||0, 0, 0, 0, 0, 0|| ;
endif
forecast(model=canvar2, from=t, to=t, result=canvar2shocktest, shock=shocks)
end do t