Commit 0f1dd850 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Added one variable (LM) and one equation to ensure that the Lagrange multiplier is positive.

It appeared that the Lagrange  multiplier simulated by EP is positive,
but the series simulated by SEP are most of the time negative.
parent 5e87dfcd
@#define extended_path_version = 1
@#define extended_path_version = 0
var Capital, Output, Labour, Consumption, Efficiency, efficiency, ExpectedTerm, LagrangeMultiplier;
var Capital, Output, Labour, Consumption, Efficiency, efficiency, ExpectedTerm, LM, LagrangeMultiplier;
varexo EfficiencyInnovation;
......@@ -50,8 +50,11 @@ model(block,bytecode,cutoff=0);
// Eq. n°7:
(Capital==(1-delta)*Capital(-1))*(Output-Consumption) + (1-(Capital==(1-delta)*Capital(-1)))*LagrangeMultiplier = 0;
// Eq. n°8:
(LM<0)*(LM+LagrangeMultiplier) + (1-(LM<0))*(LM-LagrangeMultiplier) = 0;
// 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);
end;
......
......@@ -38,12 +38,11 @@ SteadyStateCapital=SteadyStateLabour/Labour_per_unit_of_Capital;
SteadyStateOutput=Output_per_unit_of_Capital*SteadyStateCapital;
% Fill returned argument ys with steady state values.
ys(2)=SteadyStateOutput;
ys(4)=SteadyStateConsumption;
ys = zeros(9,1);
ys(1)=SteadyStateCapital;
ys(2)=SteadyStateOutput;
ys(3)=SteadyStateLabour;
ys(4)=SteadyStateConsumption;
ys(5)=M_.params(8);
ys(6)=0;
ys(7)=M_.params(1)*((((SteadyStateConsumption^M_.params(2))*((1-SteadyStateLabour)^(1-M_.params(2))))^(1-M_.params(3)))/SteadyStateConsumption)* ...
(M_.params(4)*((SteadyStateOutput/SteadyStateCapital)^(1-M_.params(5)))+1-M_.params(6));
ys(8)=0;
\ No newline at end of file
(M_.params(4)*((SteadyStateOutput/SteadyStateCapital)^(1-M_.params(5)))+1-M_.params(6));
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment