Attachment 'bvar_forward.mod'
Download 1 //$ stephane [DOT] adjemian [AT] ens [DOT] fr
2 //$ 07-31-2008
3
4 //$ Declaration of the endogenous variables of the DSGE model.
5 var a g mc mrs n winf pie r rw y;
6
7 //$ Declaration of the exogenous variables of the DSGE model.
8 varexo e_a e_g e_lam e_ms;
9
10 //$ Declaration of the deep parameters and of dsge_prior_weight
11 parameters invsig delta gam rho gampie gamy rhoa rhog bet
12 thetabig omega eps
13 dsge_prior_weight;
14
15 eps=6;
16 thetabig=2;
17 bet=0.99;
18 invsig=2.5;
19 gampie=1.5;
20 gamy=0.125;
21 gam=1;
22 delta=0.36;
23 omega=0.54;
24 rhoa=0.5;
25 rhog=0.5;
26 rho=0.5;
27
28 //$ Calibration of dsge_prior_weight.
29
30 dsge_prior_weight = .8;
31
32
33
34 //$ Specification of the DSGE model used as a prior of the VAR model.
35 model(linear);
36
37 y=y(+1)-(1/invsig)*(r-pie(+1)+g(+1)-g);
38 y=a+(1-delta)*n;
39 mc=rw+n-y;
40 mrs=invsig*y+gam*n-g;
41 r=rho*r(-1)+(1-rho)*(gampie*pie+gamy*y)+e_ms;
42 rw=rw(-1)+winf-pie;
43 a=rhoa*a(-1)+e_a;
44 g=rhog*g(-1)+e_g;
45 rw=mrs;
46
47 //$ HYBRID PHILLIPS CURVED USED FOR THE SUMULATIONS:
48 // pie = (omega/(1+omega*bet))*pie(-1)+(bet/(1+omega*bet))*pie(1)+(1-delta)*
49 // (1-(1-1/thetabig)*bet)*(1-(1-1/thetabig))/((1-1/thetabig)*(1+delta*(eps-1)))/(1+omega*bet)*(mc+e_lam);
50
51 //$ FORWARD LOOKING PHILLIPS CURVE:
52 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);
53 end;
54
55
56
57 //$ Declaration of the prior beliefs about the deep parameters and (if needed) the weight of the DSGE prior.
58 estimated_params;
59 stderr e_a, uniform_pdf,,,0,2;
60 stderr e_g, uniform_pdf,,,0,2;
61 stderr e_ms, uniform_pdf,,,0,2;
62 stderr e_lam, uniform_pdf,,,0,2;
63
64 invsig, gamma_pdf, 2.5, 1.76;
65 gam, normal_pdf, 1, 0.5;
66 rho, uniform_pdf,,,0,1;
67 gampie, normal_pdf, 1.5, 0.25;
68 gamy, gamma_pdf, 0.125, 0.075;
69 rhoa, uniform_pdf,,,0,1;
70 rhog, uniform_pdf,,,0,1;
71 thetabig, gamma_pdf, 3, 1.42, 1, ;
72
73 //$Parameter for the hybrid Phillips curve
74 //omega, uniform_pdf,,,0,1;
75
76 //$ If the weight of the dsge prior is to be estimated
77 //$ uncomment the following line.
78 //dsge_prior_weight, uniform_pdf,,,0,2;
79 end;
80
81
82 //$ Declaration of the observed endogenous variables. Note that they are the variables of the VAR (4 by default) and that we must
83 //$ have as many observed variables as exogenous variables.
84 varobs pie r rw y;
85
86 options_.gradient_method = 3;
87
88 //$ The option bayesian_irf triggers the computation of the DSGE-VAR and DSGE posterior distribution of the IRFs.
89 //$ 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
90 //$ 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.
91 estimation(datafile=datarabanal_hybrid,first_obs=50,mh_nblocks = 1,nobs=90,mode_compute=4,mh_replic=20000,bayesian_irf);
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.