Solving the transition path of bank runs

Hello everyone, I’m a graduate student still in the early stages of my studies. I’ve encountered some issues while attempting to reproduce Miao(2023)'s research code on bank runs. Currently, I’ve simplified the model to run deterministic simulations without bank runs, but I’m unsure how to proceed when calculating the recovery path after a bank run.

The original method assumes a run occurs in period J. It makes an initial guess for the predetermined variables in period J (setting the steady-state variable for banks to 0 in the first iteration), then calculates the recovery path for period J+1. This path value is fed into the algorithm for updates, repeating until the norm of the vector values in the last two iterations falls below a specific threshold, at which point the computation terminates.

Therefore, I set the initial guess values for the exogenous variables according to the original specification. Additionally, I added a condition NJ+1=Nnew to the original non-run equilibrium. Here, I referenced Gertler (2015) by introducing a shock. In the deterministic simulation, the shock value Nnew is applied to the net worth equation. However, the deterministic simulation consistently fails, and I am unsure where the problem lies. What should I do?

data.mat (2.2 KB)

miao.mod (6.3 KB)

Are you sure you properly initialized all state variables in initval?

Dear Professor, I set the predetermined variables according to the original setting. In the original text, the recovery path was calculated by substituting the steady-state value and 0 value. Then, the initial value of the predetermined variable was updated through the recovery path until the modulus of two consecutive iterations was less than the critical value. The path obtained from the last iteration of the predetermined variable value was taken as the final path.
Reference:《Long-Term Securities and Banking Crises》

Are you sure? We have

The following variables appear with a lag and are therefore states:
rn(-1)
rl(-1)
ql(-1)
qk(-1)
bb(-1)
sb(-1)
n(-1)
c(-1)
k(-1)
v(-1)
vm(-1)
vc(-1)
v_c(-2) (original expression v_c) 

and only some of them are set.

Dear professor, I have supplemented the steady-state values for other variables in the initval section, but I still cannot obtain results. It may be that I have misunderstood something. I added the actual value of the shock during the J period (derived from the J period in the no-run equilibrium), yet I am still unable to derive results. Could you please offer further suggestions?

bankrun.mod (5.2 KB)