Cao and Nie (2017): Amplification and Asymmetry without Collateral Constraint

Cao and Nie (2017) studies a two-agent model with a borrowing constraint tied to the price of an asset with fixed supply. It is well known that the existence of a collateral constraint amplifies aggregate productivity shocks when the shock pushes the constraint to bind. They show that the incomplete-markets structure of the model by itself can deliver amplified and asymmetric responses of the model to symmetric productivity shocks, even without a collateral constraint.

The model is an example to show that getting the initial starting point for policy iterations and the solution to the boundary of the state space right is crucial in solving the model. These features can be implemented very conveniently with the toolbox.

Please see the paper for the details of the model.

The gmod File

CaoNie2017.gmod

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
% Parameters
parameters H beta2 beta1 sigma1 sigma2 sigmah eta m phi nu ABad AGood;
H = 1;
beta1 = 0.98;
beta2 = 0.99;
sigma1 = 1;
sigma2 = 1;
sigmah = 1;
eta = 1;
m = 0.89;
phi = 0.057143;
nu = 0.041224;

PrintFreq = 100;
SaveFreq = 100;

% States
var_state X;
XPts = 701;
XMin=0.0;
XMax=1;
X=linspace(XMin,XMax,XPts);

% Shocks
shock_num=3;

var_shock A;
ABad = 0.97;
AGood = 1.03;
A = [ABad 1 AGood];

% From Equation (17)
shock_trans = [
  0.7204 1-0.7204 0.0
  (1-0.872)/2 0.872 (1-0.872)/2
  0.0 1-0.7204 0.7204
  ];

% Tensor variables
var_tensor;

% Variable for the last period
var_policy_init h L;
inbound_init h 1e-20 H;
inbound_init L 1e-20 2;

var_aux_init c cp q;
model_init;
  Y = A*h^nu * L^(1-nu);
  q = nu*A*h^(nu-1)*L^(1-nu);
  w = (1-nu)*A*h^nu*L^(-nu);
  
  c = q*H*X;
  cp = Y-q*H*X;
  hp = H-h;
  
  foc_hp = -1 + phi*hp^(-sigmah)/(q*cp^(-sigma2));
  foc_L = -1 + w*cp^(-sigma2)/(L^(eta-1));
  
  equations;
    foc_hp;
    foc_L;
  end;
end;

% Endogenous variables, bounds, and initial values
var_policy p q c h a cp L mu Xp[3];
inbound p 0 2 adaptive(1.5);
inbound q 0 2 adaptive(1.5);
inbound c 0.0 2 adaptive(1.5);
inbound h 1e-20 1;
inbound a 1e-20 2 adaptive(1.5);
inbound L 1e-20 2 adaptive(1.5);
inbound mu 0.0 1;
inbound cp 0.0 2 adaptive(1.5);
inbound Xp 0.0 1.2;

var_aux Y YTilde b bp hp;

var_interp cFuture cpFuture qFuture;
cFuture = c;
cpFuture = cp;
qFuture = q;
% Initialize using model_init
initial cFuture c;
initial cpFuture cp;
initial qFuture q;

%
var_output Xp Y YTilde p q;

model(X>0);
  Y = A*h^nu * L^(1-nu);
  % eq9
  w = (1-nu)*A * h^nu * L^(-nu);
  profit = (Y-w*L)/h;
  
  [cNext',cpNext',qp'] = GNDSGE_INTERP_VEC'(Xp');
  
  Eqp = GNDSGE_EXPECT{qp'};
  
  % Transform of variable
  b = a - m*Eqp*h;
  
  % Implied by market clear
  bp = -b;
  hp = H-h;
  
  % Implied by budget constraint
  budget1 = c-(q*X*H + Y-w*L - q*h - p*b);
  budget2 = cp-(q*(1-X)*H + w*L - q*hp - p*bp);
  
  YTilde = Y + phi*hp^(-sigmah)/(cp^(-sigma2)) * hp;

  % Equations in text
  eq10 = -1 + mu*m*Eqp*p/(q-profit) + beta1*GNDSGE_EXPECT{qp'*cNext'^(-sigma1)} / ((q-profit)*c^(-sigma1));
  eq11 = mu*a;
  eq12 = -1 + mu + beta1 * GNDSGE_EXPECT{ cNext'^(-sigma1) } / (p*c^(-sigma1));
  eq13 = -1 + phi*hp^(-sigmah) / (q*cp^(-sigma2)) + beta2*GNDSGE_EXPECT{ qp'*cpNext'^(-sigma2) } / (q*cp^(-sigma2));
  eq14 = -1 + beta2 * GNDSGE_EXPECT{ cpNext'^(-sigma2) } / (p*cp^(-sigma2));
  eq15 = -1 + L^(eta-1) / (w*cp^(-sigma2));
  
  % Consistency
  consis1 = (qp(1)*h+b) / (qp(1)*H) / Xp(1) - 1;
  consis2 = (qp(2)*h+b) / (qp(2)*H) / Xp(2) - 1;
  consis3 = (qp(3)*h+b) / (qp(3)*H) / Xp(3) - 1;
  
  equations;
    % budget
    budget1;
    budget2;
  
    % Optimality condition
    eq10;
    eq11;
    eq12;
    eq13;
    eq14;
    eq15;
    
    % Consistency
    if A==AGood
      Xp(1);
    else
      consis1;
    end
    
    consis2;
    
    if A==ABad
      Xp(3);
    else
      consis3;
    end
  end;
end;

model(X==0);
  Y = A*h^nu * L^(1-nu);
  w = (1-nu)*A * h^nu * L^(-nu);
  profit = (Y-w*L)/h;
  
  [cNext',cpNext',qp'] = GNDSGE_INTERP_VEC'(Xp');
  
  Eqp = GNDSGE_EXPECT{qp'};
  
  % Transform of variable
  b = a - m*Eqp*h;
  
  % Implied by market clear
  bp = -b;
  hp = H-h;
  
  % Implied by budget constraint
  budget2 = cp-(q*(1-X)*H + w*L - q*hp - p*bp);
  
  YTilde = Y + phi*hp^(-sigmah)/(cp^(-sigma2)) * hp;

  % Equations in Guangyu's new note
  eq7 = -1 + phi*hp^(-sigmah) / (q*cp^(-sigma2)) + beta2 * GNDSGE_EXPECT{ qp'*cpNext'^(-sigma2) } / (q*cp^(-sigma2));
  eq8 = -1 + beta2 * GNDSGE_EXPECT{ cpNext'^(-sigma2) } / (p*cp^(-sigma2));
  eq9 = -1 + L^(eta-1) / (w*cp^(-sigma2));
  eq11 = -1 + (q - profit)/(m*Eqp*p);
  
  % Consistency
  consis1 = (qp(1)*h+b) / (qp(1)*H) / Xp(1) - 1;
  consis2 = (qp(2)*h+b) / (qp(2)*H) / Xp(2) - 1;
  consis3 = (qp(3)*h+b) / (qp(3)*H) / Xp(3) - 1;
  
  equations;
    % budget constraint
    eq11; % This is equivalent to enterpreneur's budget when c and X = 0
    budget2;
  
    % Optimality condition
    c-0;
    mu-0; % I have set mu=0, though mu is not known ex-ante.
    a-0;
    eq7;
    eq8;
    eq9;
    
    % Consistency
    if A==AGood
      Xp(1);
    else
      consis1;
    end
    
    consis2;
    
    if A==ABad
      Xp(3);
    else
      consis3;
    end
  end;
end;

simulate;
  num_periods = 10000;
  num_samples = 100;
  initial X 0.5
  initial shock 1;
  var_simu Y YTilde;
  X' = Xp';
end;