Debian Codegraph @

tests/dsge-var/dsgevar_forward_calibrated_lambda.mod

raw
1 // Declaration of the endogenous variables of the DSGE model.
2 var a g mc mrs n winf pie r rw y;
3
4 // Declaration of the exogenous variables of the DSGE model.
5 varexo e_a e_g e_lam e_ms;
6
7 // Declaration of the deep parameters
8 parameters invsig delta gam rho gampie gamy rhoa rhog bet
9 thetabig omega eps ;
10
11 eps=6;
12 thetabig=2;
13 bet=0.99;
14 invsig=2.5;
15 gampie=1.5;
16 gamy=0.125;
17 gam=1;
18 delta=0.36;
19 omega=0.54;
20 rhoa=0.5;
21 rhog=0.5;
22 rho=0.5;
23
24
25 model(linear);
26
27 y=y(+1)-(1/invsig)*(r-pie(+1)+g(+1)-g);
28 y=a+(1-delta)*n;
29 mc=rw+n-y;
30 mrs=invsig*y+gam*n-g;
31 r=rho*r(-1)+(1-rho)*(gampie*pie+gamy*y)+e_ms;
32 rw=rw(-1)+winf-pie;
33 a=rhoa*a(-1)+e_a;
34 g=rhog*g(-1)+e_g;
35 rw=mrs;
36
37 // HYBRID PHILLIPS CURVED USED FOR THE SUMULATIONS:
38 // pie = (omega/(1+omega*bet))*pie(-1)+(bet/(1+omega*bet))*pie(1)+(1-delta)*
39 // (1-(1-1/thetabig)*bet)*(1-(1-1/thetabig))/((1-1/thetabig)*(1+delta*(eps-1)))/(1+omega*bet)*(mc+e_lam);
40
41 // FORWARD LOOKING PHILLIPS CURVE:
42 pie=bet*pie(+1)+(1-delta)*(1-(1-1/thetabig)*bet)*(1-(1-1/thetabig))/((1-1/thetabig)*(1+delta*(eps-1)))*(mc+e_lam);
43 end;
44
45
46
47 // Declaration of the prior beliefs about the deep parameters.
48 estimated_params;
49 stderr e_a, uniform_pdf,,,0,2;
50 stderr e_g, uniform_pdf,,,0,2;
51 stderr e_ms, uniform_pdf,,,0,2;
52 stderr e_lam, uniform_pdf,,,0,2;
53
54 invsig, gamma_pdf, 2.5, 1.76;
55 gam, normal_pdf, 1, 0.5;
56 rho, uniform_pdf,,,0,1;
57 gampie, normal_pdf, 1.5, 0.25;
58 gamy, gamma_pdf, 0.125, 0.075;
59 rhoa, uniform_pdf,,,0,1;
60 rhog, uniform_pdf,,,0,1;
61 thetabig, gamma_pdf, 3, 1.42, 1, ;
62
63 // Parameter for the hybrid Phillips curve
64 // omega, uniform_pdf,,,0,1;
65
66 end;
67
68
69 /*
70 ** Declaration of the observed endogenous variables. Note that they are the variables of the VAR (4 by default) and that we must
71 ** have as many observed variables as exogenous variables.
72 */
73 varobs pie r rw y;
74
75 /* REMARK 1.
76 ** The option dsge_var=.8 triggers the estimation of a DSGE-VAR model, with a calibrated dsge prior weight equal to .8.
77 **
78 ** REMARK 2.
79 ** The option bayesian_irf triggers the computation of the DSGE-VAR and DSGE posterior distribution of the IRFs.
80 ** The Dashed lines are the first, fifth (ie the median) and ninth posterior deciles of the DSGE-VAR's IRFs, the bold dark curve is the
81 ** posterior median of the DSGE's IRfs and the shaded surface covers the space between the first and ninth posterior deciles of the DSGE's IRFs.
82 */
83 estimation(datafile=datarabanal_hybrid,silent_optimizer,first_obs=50,mh_nblocks = 1,nobs=90,dsge_var=.8,optim=('NumgradAlgorithm',3),mode_compute=4,mh_replic=2000,bayesian_irf);