Fixed typo related to the sign of the Lagrange multiplier. Deleted trailing whitespaces.
parent
b8e1ecbcec
commit
2f5ce2403d
|
@ -49,11 +49,11 @@ model(block,bytecode,cutoff=0);
|
||||||
(((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption - LagrangeMultiplier - ExpectedTerm(1);
|
(((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption - LagrangeMultiplier - ExpectedTerm(1);
|
||||||
|
|
||||||
// Eq. n°7:
|
// Eq. n°7:
|
||||||
(Capital==(1-delta)*Capital(-1))*(Output-Consumption) + (1-(Capital==(1-delta)*Capital(-1)))*LagrangeMultiplier = 0;
|
(Capital==(1-delta)*Capital(-1))*(Output-Consumption) + (1-(Capital==(1-delta)*Capital(-1)))*LM = 0;
|
||||||
|
|
||||||
// Eq. n°8:
|
// Eq. n°8:
|
||||||
(LM<0)*(LM+LagrangeMultiplier) + (1-(LM<0))*(LM-LagrangeMultiplier) = 0;
|
(LM<0)*(LM+LagrangeMultiplier) + (1-(LM<0))*(LM-LagrangeMultiplier) = 0;
|
||||||
|
|
||||||
// Eq. n°9:
|
// Eq. n°9:
|
||||||
ExpectedTerm = beta*(((((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption)*(alpha*((Output/Capital(-1))^(1-psi))+(1-delta))-(1-delta)*LagrangeMultiplier);
|
ExpectedTerm = beta*(((((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption)*(alpha*((Output/Capital(-1))^(1-psi))+(1-delta))-(1-delta)*LagrangeMultiplier);
|
||||||
|
|
||||||
|
@ -67,14 +67,14 @@ end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
steady;
|
steady;
|
||||||
|
|
||||||
options_.maxit_ = 100;
|
options_.maxit_ = 100;
|
||||||
options_.ep.verbosity = 0;
|
options_.ep.verbosity = 0;
|
||||||
options_.ep.stochastic.status = 0;
|
options_.ep.stochastic.status = 0;
|
||||||
options_.console_mode = 0;
|
options_.console_mode = 0;
|
||||||
|
|
||||||
ts = extended_path([],1000);
|
ts = extended_path([],1000);
|
||||||
|
|
||||||
options_.ep.stochastic.status = 1;
|
options_.ep.stochastic.status = 1;
|
||||||
sts = extended_path([],1000);
|
sts = extended_path([],1000);
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ end;
|
||||||
|
|
||||||
figure(3)
|
figure(3)
|
||||||
plot(sts(2,:)-ts(2,:))
|
plot(sts(2,:)-ts(2,:))
|
||||||
|
|
||||||
@#else
|
@#else
|
||||||
|
|
||||||
shocks;
|
shocks;
|
||||||
|
@ -96,10 +96,10 @@ end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
steady;
|
steady;
|
||||||
|
|
||||||
options_.maxit_ = 100;
|
options_.maxit_ = 100;
|
||||||
options_.stack_solve_algo = 4;
|
options_.stack_solve_algo = 4;
|
||||||
|
|
||||||
simul(periods=4000);
|
simul(periods=4000);
|
||||||
|
|
||||||
n = 100;
|
n = 100;
|
||||||
|
@ -109,5 +109,5 @@ end;
|
||||||
|
|
||||||
figure('Name','(rbcii) Lagrange multiplier associated to the positivity constraint on investment.');
|
figure('Name','(rbcii) Lagrange multiplier associated to the positivity constraint on investment.');
|
||||||
plot(LagrangeMultiplier(1:n),'-b','linewidth',2)
|
plot(LagrangeMultiplier(1:n),'-b','linewidth',2)
|
||||||
|
|
||||||
@#endif
|
@#endif
|
Loading…
Reference in New Issue