%Model Description+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This is a monetary (CIA) model with endogenous labour.


%Model Information+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Name = Leisure MBC model;


%Parameters++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#Physical Capital Share
rho              = 0.36;
#Physical Capital depreciation
delta            = 0.025;
#Gross Steady State Real Interest Rate
R_bar            = 1.01;
# Gross Steady State Money Growth Rate;
Theta            = 1.0125;
# Gross Steady State Nominal Interest Rate
I_bar            = R_bar*Theta;
#Utility parameter
eta              = 1.5;
#Autocorrelation on productivity shock 
psi_z            = 0.95;
#Autocorrelation on money growth shock
psi_u            = 0.50;
# Cross Autocorrelation
psi_uz           = 0.0;
#Steady State of Productivity Shock
z_bar            = 1.0;
# Steady State if Money Growth Shock
u_bar            = 1.0;
# Standard Deviation Prod. Shock
sigma_eps_z      = 0.0612;
# Standard Deviation money growth Shock
sigma_eps_u      = 0.00412;
# Steady state labour
n_bar            = 1.0/3.0;



%Variable Vectors+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[1]  k(t):capital{endo}[log,hp]
[2]  y(t):output{con}[log,hp]
[2]  m(t):money{endo}[log,hp]
[3]  Inf(t):inflation{con}[log,hp]
[5]  n(t):labour{con}[log,hp]
[5]  lam(t):lambda{con}[log,hp]
[6]  mu(t):mu{con}[log,hp]
[7]  z(t):epsz(t):productivity{exo}[log,hp]
[8]  u(t):epsu(t):mgrowthshock{exo}[log,hp]
[9]  c(t):consumption{con}[log,hp]
[10] @inv(t):investment[log,hp]
[12] @R(t+1):rrate
[13] @w(t):wage[log,hp]
[14] @I(t):nrate


%Boundary Conditions++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
None


%Variable Substitution Non-Linear System++++++++++++++++++++++++++++++++++++++++++++++++
[1]  @U(t)          = c(t)**(1-eta)*(1-n(t))**(A*(1-eta))/(1-eta);
[1]  @U_bar         = SS{@U(t)};
[2]  @MUc(t)        = DIFF{@U(t),c(t)};
[3]  @MUc_bar       = SS{@MUc(t)};
[2]  @MUn(t)        = DIFF{@U(t),n(t)};
[3]  @MUn_bar       = SS{@MUn(t)};
[1]  @c(t)          = m(t);
[2]  @inv(t)        = k(t)-(1-delta)*k(t-1);
[2]  @inv_bar       = SS{@inv(t)};
[3]  @F(t)          = z(t)*k(t-1)**(rho)*n(t)**(1-rho);
[4]  @F_bar         = SS{@F(t)};
[4]  @Fk(t)         = DIFF{@F(t),k(t-1)};
[5]  @Fk_bar        = SS{@Fk(t)};
[5]  @Fn(t)         = DIFF{@F(t),n(t)};
[6]  @Fn_bar        = SS{@Fn(t)};
[4]  @R(t)          = 1+@Fk(t)-delta;
[5]  @R(t+1)        = FF_1{@R(t)};
[4]  @w(t)          = @Fn(t);
[5]  @I(t)          = 1+(E(t)|mu(t+1)/E(t)|lam(t+1));


%Non-Linear First-Order Conditions++++++++++++++++++++++++++++++++++++++++++++++++++++++

# Insert here the non-linear FOCs in format g(x)=0

# from market equilibrium
[1]   @F(t)-@inv(t)-c(t) = 0;
# CIA constraint
[2]   c(t)-m(t) = 0;
# Definition of output
[3]   y(t)-@F(t) = 0;
# From FOC labour
[6]   @MUn(t)-lam(t)*@w(t) = 0;
# From FOC consumption
[7]   @MUc(t)-lam(t)-mu(t) = 0;
# Fisher
[6]   @R(t+1)-@I(t)/E(t)|Inf(t+1) = 0;
# Euler
[3]   betta*E(t)|lam(t+1)/lam(t)*@R(t+1)-1 = 0;
# money evolution
[4]   m(t)-(Theta+u(t)-1)*m(t-1)/Inf(t) = 0;
# prod. shock
[5]   LOG(E(t)|z(t+1))-psi_z*LOG(z(t))-epsz(t) = 0;
# money shock
[6]   LOG(E(t)|u(t+1))-psi_u*LOG(u(t))-psi_uz*LOG(z(t))-epsu(t) = 0;


%Steady States [Closed Form]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
None

%Steady State Non-Linear System [Manual]+++++++++++++++++++++++++++++++++++++++++++++++++
# from market equilibrium
[1]   @F_bar-@inv_bar-c_bar = 0;
# From definition real interest rate
[2]   (1+@Fk_bar-delta)-R_bar = 0;
# From Euler equation
[3]   betta*R_bar-1 = 0;
# From definition of wage rate
[4]   @Fn_bar-w_bar = 0;
# From definition of output
[5]   @F_bar-y_bar = 0;
# From FOC labour
[6]   @MUn_bar-lam_bar*w_bar = 0;
# From FOC consumption
[7]   @MUc_bar-lam_bar-mu_bar = 0;
# From definition of Gross Nominal interest
[8]   (1+(mu_bar/lam_bar))-I_bar = 0;
# From Fisher equation
[9]   R_bar*Inf_bar-I_bar = 0;
# From money equation
[10]  Theta-Inf_bar = 0;
# From CIA constraint
[11]  c_bar-m_bar = 0;
# For investment
[12]  inv_bar-delta*k_bar = 0;


[1]  c_bar       = 1.0;
[2]  inv_bar     = 1.0;
[3]  k_bar       = 1.0;
[4]  y_bar       = 1.0;
[5]  w_bar       = 1.0;
[6]  lam_bar     = 1.0;
[7]  mu_bar      = 1.0;
[8]  Inf_bar     = 1.0;
[9]  I_bar       = 1.0;
[10] m_bar       = 1.0;
[11] A           = 1.0;
[12] betta       = 1.0;


%Log-Linearized Model Equations++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
None


%Variance-Covariance Matrix++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Sigma = [sigma_eps_z**2  0;
         0  sigma_eps_u**2];


%End Of Model File+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
