| 1 |
|
| 2 |
//Model with up to 10 lags and leads up to 9 - but not all, with some missing |
| 3 |
|
| 4 |
var m P c e W R k d n l gy_obs gp_obs y dA; |
| 5 |
varexo e_a e_m; |
| 6 |
|
| 7 |
parameters alp bet gam mst rho psi del; |
| 8 |
|
| 9 |
alp = 0.33; |
| 10 |
bet = 0.99; |
| 11 |
gam = 0.003; |
| 12 |
mst = 1.011; |
| 13 |
rho = 0.7; |
| 14 |
psi = 0.787; |
| 15 |
del = 0.02; |
| 16 |
|
| 17 |
model; |
| 18 |
dA = exp(gam+e_a); % missing 0.06*m(-4) and +0.25*m(-2) |
| 19 |
log(m) = (1-rho)*log(mst) + rho*log(0.75*m(-1)+0.13*m(-3)+0.09*m(-5)+0.015*m(-6)+0.007*m(-7)+0.004*m(-8)+0.003*m(-9)+0.001*m(-10))+e_m; |
| 20 |
-P/(((1.3*c(+1)+c(+5)+0.7*c(+9))*(1.3*P(+1)+P(+5)+0.7*P(+9)))*m/9)+bet*((1.3*P(+1)+P(+5)+0.7*P(+9))/3)*(alp*exp(-alp*(gam+log((1.3*e(+1)+e(+5)+0.7*e(+9))/3)))*k^(alp-1)*n(+1)^(1-alp)+(1-del)*exp(-(gam+log(e(+1)))))/(c(+2)*P(+2)*m(+1))=0; |
| 21 |
W = l/n; |
| 22 |
-(psi/(1-psi))*(c*P/(1-n))+l/n = 0; |
| 23 |
R = P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(-alp)/W; |
| 24 |
1/(c*P)-bet*P*(1-alp)*exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)/(m*l* (1.3*c(+1)+c(+5)+0.7*c(+9))*(1.3*P(+1)+P(+5)+0.7*P(+9))/9) = 0; |
| 25 |
c+k = exp(-alp*(gam+e_a))*k(-1)^alp*n^(1-alp)+(1-del)*exp(-(gam+e_a)*4)*k(-4); |
| 26 |
P*c = m; |
| 27 |
m-1+d = l; |
| 28 |
e = exp(e_a); |
| 29 |
y = k(-1)^alp*n^(1-alp)*exp(-alp*(gam+e_a)); |
| 30 |
gy_obs = dA*y/y(-1); |
| 31 |
gp_obs = (P/P(-1))*m(-1)/dA; |
| 32 |
end; |
| 33 |
|
| 34 |
initval; |
| 35 |
k = 6; |
| 36 |
m = mst; |
| 37 |
P = 2.25; |
| 38 |
c = 0.45; |
| 39 |
e = 1; |
| 40 |
W = 4; |
| 41 |
R = 1.02; |
| 42 |
d = 0.85; |
| 43 |
n = 0.19; |
| 44 |
l = 0.86; |
| 45 |
y = 0.6; |
| 46 |
gy_obs = exp(gam); |
| 47 |
gp_obs = exp(-gam); |
| 48 |
dA = exp(gam); |
| 49 |
end; |
| 50 |
|
| 51 |
shocks; |
| 52 |
var e_a; stderr 0.014; |
| 53 |
var e_m; stderr 0.005; |
| 54 |
end; |
| 55 |
|
| 56 |
steady; |
| 57 |
|
| 58 |
stoch_simul(dr=aim, order=1,irf=0); |
| 59 |
|
| 60 |
benchmark = load(['fs2000x10_L9_L' filesep 'Output' filesep 'fs2000x10_L9_L_results']); |
| 61 |
threshold = 1e-8; |
| 62 |
|
| 63 |
if max(max(abs(benchmark.oo_.dr.ghx-oo_.dr.ghx))) > threshold |
| 64 |
error('error in ghx'); |
| 65 |
elseif max(max(abs(benchmark.oo_.dr.ghu-oo_.dr.ghu))) > threshold |
| 66 |
error('error in ghu'); |
| 67 |
end |