CS1 Consumption/saving model with borrowing constraint

This is an implementation of the model in Deaton (1991).

Model's structure

Response variable Consumption ($C$).

State variable Cash on hand ($X$).

Shock Labor income ($Y$).

Parameters Interest rate ($r$), Rate of time preference ($\delta$), and Elasticity of intertemporal substitution ($\rho$).

Equilibrium equation

$$C_{t}: C_{t}\le X_{t} \quad \perp \quad \frac{1+r}{1+\delta}\mathrm{E}_{t}\left(C_{t+1}^{-\rho}\right)-C_{t}^{-\rho}\le 0.$$

Transition equation

$$X_{t}: X_{t}=\left(1+r\right)\left(X_{t-1}-C_{t-1}\right)+Y_{t}.$$

Writing the model

The model is defined in a Yaml file: cs1.yaml.

Create the model object

Mean and standard deviation of the shocks

Mu                = 100;
sigma             = 10;

You generate the MATLAB model file and pack the model object with the following command

model = recsmodel('cs1.yaml',...
                  struct('Mu',Mu,'Sigma',sigma^2,'order',5));
Deterministic steady state (equal to first guess)
 State variables:
		100	

 Response variables:
		100	

 Expectations variables:
		0.0001	

This command creates a MATLAB file, cs1model.m, containing the definition the model and all its Jacobians from the human readable file cs1.yaml.

Define approximation space

[interp,s] = recsinterpinit(20,model.sss/2,model.sss*2);

First-guess: Consumption equal to cash on hand

x         = s;

To force the solver to compute the approximation of the expectations function, it is necessary to add at least an empty value for interp.ch

interp.ch = [];

Solve for rational expectations

[interp,x] = recsSolveREE(interp,model,s,x);
Successive approximation
  Major	 Minor	Residual
      0	     0	1.08E+02 (Input point)
      1	     1	3.35E+01
      2	     1	1.50E+01
      3	     1	7.82E+00
      4	     1	4.37E+00
      5	     1	2.53E+00
      6	     1	1.49E+00
      7	     1	8.74E-01
      8	     1	5.12E-01
      9	     1	2.98E-01
     10	     1	1.72E-01
     11	     1	0.00E+00
Solution found - Residual lower than absolute tolerance

Plot the decision rule

figure
plot(s,[x s])
legend('Policy rule','45 degree line')
legend('Location','NorthWest')
legend('boxoff')
xlabel('Cash on hand')
ylabel('Consumption')

Simulate the model

[~,~,~,stat] = recsSimul(model,interp,model.sss(ones(1000,1),:),200);
subplot(1,2,1)
xlabel('Cash on hand')
ylabel('Frequency')
subplot(1,2,2)
xlabel('Consumption')
ylabel('Frequency')
Statistics from simulated variables (excluding the first 20 observations):
 Moments
    Mean      Std. Dev. Skewness  Kurtosis  Min       Max       %LB       %UB
  106.4639   11.9930    0.2140    3.1685   60.9058  170.8128

  Columns 1 through 7

  100.3004    6.3358   -1.2064    4.8722   60.9045  117.2116         0

  Column 8

   12.0011

 Correlation
    1.0000    0.9469
    0.9469    1.0000

 Autocorrelation
    1         2         3         4         5
    0.5052    0.2695    0.1466    0.0739    0.0350

    0.3874    0.1910    0.1030    0.0499    0.0222

References

Deaton, A. (1991). Saving and liquidity constraints. Econometrica, 59(5), 1221-1248.