%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		        = 2.0;
#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;
# Utility parameter leisure
l_bar            = 1.0/3.0; 



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


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


%Variable Substitution Non-Linear System++++++++++++++++++++++++++++++++++++++++++++++++
[1]  @c(t) = m(t);
[2]  @inv(t) = k(t)-(1-delta)*k(t-1);
[3]  @y(t) = z(t)*k(t-1)**(rho)*l(t)**(1-rho);
[4]  @E(t)|R(t+1) = rho*z(t)**(psi_z)*k(t)**(rho-1)*E(t)|l(t+1)**(1-rho)+(1-delta);
[4]  @R(t) = rho*z(t)*k(t-1)**(rho-1)*l(t)**(1-rho)+(1-delta);
[4]  @w(t) = (1-rho)*z(t)*k(t-1)**(rho)*l(t)**(-rho);
[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]   @y(t)-@inv(t)-@c(t) = 0;
# From FOC labour
[6]   A*@c(t)**(1-eta)*(1-l(t))**(A*(1-eta)-1)-lam(t)*@w(t) = 0;
# From FOC consumption
[7]   @c(t)**(-eta)*(1-l(t))**(A*(1-eta))-lam(t)-mu(t) = 0;
# Fisher
[6]   @E(t)|R(t+1)-(1+(E(t)|mu(t+1)/E(t)|lam(t+1)))/E(t)|Inf(t+1) = 0;
# Euler
[3]   betta*E(t)|lam(t+1)*@E(t)|R(t+1)-lam(t) = 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]   z_bar*k_bar**(rho)*l_bar**(1-rho)-delta*k_bar-c_bar = 0;
# From definition real interest rate
[2]   rho*z_bar*k_bar**(rho-1)*l_bar**(1-rho)+(1-delta)-R_bar = 0;
# From Euler equation
[3]   betta*R_bar-1 = 0;
# From definition of wage rate
[4]   (1-rho)*z_bar*k_bar**(rho)*l_bar**(-rho)-w_bar = 0;
# From definition of output
[5]   z_bar*k_bar**(rho)*l_bar**(1-rho)-y_bar = 0;
# From FOC labour
[6]   lam_bar*w_bar-A*c_bar**(1-eta)*(1-l_bar)**(A*(1-eta)-1) = 0;
# From FOC consumption
[7]   c_bar**(-eta)*(1-l_bar)**(A*(1-eta))-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+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
