%Model Description+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This is a standard RBC model with and endogenous leisure choice.



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



%Parameters++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Physical Capital Share
rho	= 0.36;
#Physical Capital depreciation
delta	= 0.025;
#Gross Real Interest Rate
R_bar	= 1.01;
#Utility parameter
eta	= 2.0;
#Autocorrelation shock 
psi	= 0.95;
#Steady State of Shock
z_bar	= 1.0;
# Standard Deviation Shock
sigma_eps = 0.0712;
# Utility parameter leisure
l_bar	= 1.0/3.0; 


%Variable Vectors+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[1]  k(t):capital{endo}[log,hp]
[2]  c(t):consumption{con}[log,hp]
[4]  l(t):labour{con}[log,hp]
[5]  lam(t):lambda{con}[log,hp]
[5]  z(t):eps(t):productivity{exo}[log,hp]
[6]  @inv(t):investment[log,hp]
[7]  @w(t):wage[log,hp]
[8]  @R(t):interest[log,hp]
[9]  @y(t):output[log,hp]


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


%Variable Substitution Non-Linear System++++++++++++++++++++++++++++++++++++++++++++++++
# Investment
[1]   @inv(t) = k(t)-(1-delta)*k(t-1);
[2]   @inv_bar = SS{@inv(t)};
# Production Function
[2]   @F(t) = z(t)*k(t-1)**(rho)*l(t)**(1-rho);
[2]   @F_bar = SS{@F(t)};
# Utility Function
[3]   @U(t) = c(t)**(1-eta)*(1-l(t))**(A*(1-eta))/(1-eta);
[3]   @U_bar = SS{@U(t)};
# Marginal Utility wrt consumption
[4]   @MUc(t) = DIFF{@U(t),c(t)};
[4]   @MUc_bar = SS{@MUc(t)};
# Marginal Utility wrt labour
[5]   @MUl(t) = DIFF{@U(t),l(t)};
[5]   @MUl_bar = SS{@MUl(t)};
# Wage Rate
[6]   @w(t) = DIFF{@F(t),l(t)};
[6]   @w_bar = SS{@w(t)};
# Real Interest Rate
[7]   @r_bar = DIFF{@F_bar,k_bar};
[7]   @R(t) = 1+DIFF{@F(t),k(t-1)}-delta;
# Previous variable, forwarded one period
[8]   @R(t+1) = FF_1{@R(t)};
# Output
[9]   @y(t)  = @F(t);


%Non-Linear First-Order Conditions++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Insert here the non-linear FOCs in format g(x)=0

# Market equilibrium
[1]   @y(t)-@inv(t)-c(t) = 0;
# FOC for consumption
[2]   @MUc(t)-lam(t) = 0;
# FOC for labour
[3]   @MUl(t)-lam(t)*@w(t) = 0;
# Consumption Euler
[4]   betta*E(t)|lam(t+1)*@R(t+1)-lam(t) = 0;
# Shock Process
[5]   LOG(E(t)|z(t+1))-psi*z(t) = 0;


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

[1]  inv_bar = @inv_bar;
[2]  y_bar   = @F_bar;


%Steady State Non-Linear System [Manual]+++++++++++++++++++++++++++++++++++++++++++++++++
[1]   @F_bar-delta*k_bar-c_bar = 0;
[2]   @r_bar+(1-delta)-R_bar = 0;
[3]   betta*R_bar-1 = 0;
[4]   @w_bar-w_bar = 0;
[5]   @MUc_bar-lam_bar = 0;
[6]   @MUl_bar-lam_bar*w_bar = 0;

[1]  c_bar   = 1.0;
[2]  k_bar   = 1.0;
[3]  w_bar   = 1.0;
[4]  A       = 1.0;
[5]  lam_bar = 1.0;
[6]  betta   = 0.99;

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


%Variance-Covariance Matrix++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Sigma = [sigma_eps**2];


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