Debian Codegraph @

tests/dsge-var/dsgevar_forward_estimated_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 model(linear);
25
26 y=y(+1)-(1/invsig)*(r-pie(+1)+g(+1)-g);
27 y=a+(1-delta)*n;
28 mc=rw+n-y;
29 mrs=invsig*y+gam*n-g;
30 r=rho*r(-1)+(1-rho)*(gampie*pie+gamy*y)+e_ms;
31 rw=rw(-1)+winf-pie;
32 a=rhoa*a(-1)+e_a;
33 g=rhog*g(-1)+e_g;
34 rw=mrs;
35
36 // HYBRID PHILLIPS CURVED USED FOR THE SUMULATIONS:
37 // pie = (omega/(1+omega*bet))*pie(-1)+(bet/(1+omega*bet))*pie(1)+(1-delta)*
38 // (1-(1-1/thetabig)*bet)*(1-(1-1/thetabig))/((1-1/thetabig)*(1+delta*(eps-1)))/(1+omega*bet)*(mc+e_lam);
39
40 // FORWARD LOOKING PHILLIPS CURVE:
41 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);
42 end;
43
44
45
46 /*
47 ** Declaration of the prior beliefs about the deep parameters AND the weight of the DSGE prior.
48 ** Note that dsge_prior_weight is not declared as a parameter at the top of the mod file.
49 */
50 estimated_params;
51 stderr e_a, uniform_pdf,,,0,2;
52 stderr e_g, uniform_pdf,,,0,2;
53 stderr e_ms, uniform_pdf,,,0,2;
54 stderr e_lam, uniform_pdf,,,0,2;
55
56 invsig, gamma_pdf, 2.5, 1.76;
57 gam, normal_pdf, 1, 0.5;
58 rho, uniform_pdf,,,0,1;
59 gampie, normal_pdf, 1.5, 0.25;
60 gamy, gamma_pdf, 0.125, 0.075;
61 rhoa, uniform_pdf,,,0,1;
62 rhog, uniform_pdf,,,0,1;
63 thetabig, gamma_pdf, 3, 1.42, 1, ;
64
65 // Parameter for the hybrid Phillips curve
66 // omega, uniform_pdf,,,0,1;
67
68 dsge_prior_weight, uniform_pdf,,,0,1.9;
69 end;
70
71
72 /* Declaration of the observed endogenous variables. Note that they are the variables of the VAR (with 4 lags by default) and that we must
73 ** have as many observed variables as exogenous variables.
74 */
75
76 varobs pie r rw y;
77
78 /* REMARK 1.
79 ** The dsge_var option triggers the estimation of a DSGE-VAR model instead of the plain DSGE model. The weight of the DSGE prior, dsge_prior_weight,
80 ** is estimated. The prior of this parameter is defined in the estimated_params block.
81 **
82 ** REMARK 2.
83 ** The option bayesian_irf triggers the computation of the DSGE-VAR and DSGE posterior distribution of the IRFs.
84 ** 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
85 ** 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.
86 */
87
88 estimation(datafile=datarabanal_hybrid,silent_optimizer,first_obs=50,mh_nblocks = 1,nobs=90,dsge_var,mode_compute=4,optim=('NumgradAlgorithm',3),mh_replic=2000,bayesian_irf);