| 1 |
var y; |
| 2 |
|
| 3 |
varexo eps; |
| 4 |
|
| 5 |
parameters rho; |
| 6 |
|
| 7 |
rho = 0.9; |
| 8 |
|
| 9 |
model; |
| 10 |
y = y(-1)^rho*exp(eps); |
| 11 |
end; |
| 12 |
|
| 13 |
initval; |
| 14 |
y = 1; |
| 15 |
eps = 0; |
| 16 |
end; |
| 17 |
|
| 18 |
steady; |
| 19 |
|
| 20 |
check; |
| 21 |
|
| 22 |
shocks; |
| 23 |
var eps; |
| 24 |
periods 1; |
| 25 |
values 1; |
| 26 |
end; |
| 27 |
|
| 28 |
perfect_foresight_setup(periods=10); |
| 29 |
perfect_foresight_solver; |
| 30 |
|
| 31 |
if ~oo_.deterministic_simulation.status |
| 32 |
error('Perfect foresight simulation failed') |
| 33 |
end |
| 34 |
send_endogenous_variables_to_workspace; |
| 35 |
|
| 36 |
if max(abs(y-[1; exp(cumprod([1; rho*ones(9, 1)]))]))>options_.dynatol.x |
| 37 |
error('Wrong solution!') |
| 38 |
end |