*
* (First run at) Replication file for Hulsewig, Mayer &
* Wollmershauser(2006), "Bank loan supply and monetary policy
* transmission in Germany: An assessment based on matching impulse
* responses," Journal of Banking & Finance, vol. 30, no 10, 2893-2910.
*
declare real b1 b2 nai delta1 delta2 gamma1 gamma2 gamma3
declare series y l rl rm eta
*
* Set up the DSGE. This uses the original optimization equation from the
* appendix rather than the partially substituted one in the main text.
*
frml(identity) eqna6 = beta*l{-1}-(1+beta)*l+l{1}+nai*(rl-rm)
frml(identity) eqn14 = b2*rl - (b1*y - l)
frml(identity) eqn15 = y - (gamma1*y{1}+gamma2*rl{1}+gamma3*rl{2})
frml(identity) eqn16 = rm - (delta1*rm{1}+delta2*rm{2}+eta)
frml s1 = eta
*
compute nsteps=20
*
compute beta=.99
compute b1=2.1887,b2=.0142,nai=.0010,delta1=1.4665,delta2=-.5204
compute gamma1=.9985,gamma2=.0009,gamma3=-.0026
*
group loanmodel eqna6 eqn14 eqn15 eqn16 s1
*
dsge(a=a,f=f,model=loanmodel) y rm l rl eta
*
* They don't report the standard error of the shock, but it appears to
* be roughly .2.
*
@dlmirf(a=a,f=f*.2,steps=nsteps,varlabels=||"GDP","RM","LOAN","RL"||,page=byshock)
*
* You need the estimated IRF's from the VAR and their variances in order
* to do the optimization. This assumes that the estimated IRF's to the
* rate shock are in the series estimated(i,1) and the corresponding
* variances are in estvar(i,1).
*
nonlin(parmset=dsgeparms) b1 b2 nai delta1 delta2 gamma1 gamma2 gamma3
declare real ceemetric
find(parmset=dsgeparms) minimum ceemetric
*
* Solve the DSGE given the current values
*
dsge(a=a,f=f,model=loanmodel) y rm l rl eta
@dlmirf(a=a,f=f*.2,steps=nsteps,results=theoretical)
compute ceemetric=0.0
do h=1,nsteps
do i=1,4
compute ceemetric=ceemetric+(theoretical(i,1)(h)-estimated(i,1)(h))^2/estvar(i,1)(h)
end do i
end do h
end findchaveslima wrote:Dear Tom
If you tell me how to produce the estimated IRF's to the rate shock [estimated(i,1)] and its corresponding
corresponding variances [estvar(i,1)] in the VAR model, I could plug in the program you've sent me.
regards
Ricardo
Return to VARs (Vector Autoregression Models)
Users browsing this forum: Bing [Bot] and 1 guest