Occbin for a novice user.Is there a simple mod file?

Thank you @jpfeifer for this reference!

Is there a model description for borrowing constraint example? I see that the constraint is \lambda\geq0, but I am trying to understand in terms of b. I thought it was b\leq My, but it does not sound correct that in the relax regime b=My.

@mk1564 You are right. The Appendix available at https://www.federalreserve.gov/pubs/feds/2014/201447/201447pap.pdf indicates the constraint is slack for
B_t<mY_t \: (A.17)
But you can verify at
occbin/occbin_20130531/model_borrcon/runsim_borrcon.m at master · lucaguerrieri/occbin · GitHub
that the original files specify

constraint_relax =‘b>M*y’;

which is strange. @rattoma @Max1 what do you think?

Thanks @jpfeifer! I guess in terms of writing the code the constraint is \lambda\geq0, and hence,

  • bind regime is \lambda=0 and b<My
  • relax regime is \lambda>0 and b=My

Maybe this is written like this because the borrowing constraint b\leq My binds in the reference regime under the given calibration, as they said

Under this calibration, the borrowing constraint, which binds in the reference regime, is slack about 30 percent of the time using the full nonlinear solution

I wonder if I can rewrite the code by using b\leq My itself so that I have bind and relax regimes in a more straightforward way (perhaps, with different parameters?)

The readme.pdf of the OccBin Toolkit states the following:

I think the confusion stems from the fact that the authors linearize around the steady state where the constraint is binding. Therefore, in the reference regime B_t = mY_t and \lambda_t>0. If this constraint becomes slack, we have B_t < mY_t and \lambda_t=0 in the alternative regime.
In order to return to the reference regime, B_t > mY_t must be true.

It is a bit confusing in terms of terminology (constraint and constraint_relax).
Typically, we linearize around a steady state where the constraint is non-binding. Therefore constraint indicates a condition once a constraint binds (e.g. r_t < 0 or \tilde{r}_t < 1-\Pi/\beta).
Additionally, constraint_relax defines a condition once a constraint relaxes again and we return back to the reference regime (where the constraint is non-binding). But things become different once you change the location of the reference regime (e.g. define the reference regime where the constraint binds).

Here constraint indicates a condition once a constraint is slack, because the constraint is already binding in the reference/baseline regime. Therefore, constraint_relax indicates a condition once the constraint is binding again (and not a condition once the constraint relaxes as the terminology, constraint_relax, might suggest).

More generally, we should think of constraint as a condition for switching from the reference regime to the alternative regime and constraint_relax as a condition for switching back to the reference regime.

Thank you @Max1 for your kind clarifications!

@michaelm Here is another simple example of ZLB in NK model from the Occbin paper. I rewrote it here to implement it with Dynare 4.7’s Occbin. Hope this helps!

cgg_occbin_MK.mod (1.0 KB)

Continuing the discussion from Occbin for a novice user.Is there a simple mod file?:

@michaelm Here is another simple example of ZLB in NK model from the Occbin paper. I rewrote it here to implement it with Dynare 4.7’s Occbin. Hope this helps!

cgg_occbin_MK.mod (1.0 KB)

@mk1564 Note that there is a mistake. See cgg.mod: fix sign error in real interest rate by JohannesPfeifer · Pull Request #1 · lucaguerrieri/occbin · GitHub

2 Likes

Oh, thanks @jpfeifer! I should also correct that.

Ok, the language is a bit confusing. The counterintuitive fact for me is that I’ve started from a steady state where the collateral constraint binds. So if I were to implement OCCBIN tool, I would have to start from a parametrisation of the model with a non binding collateral constraint, right?

Meaning the Lagrange multiplier of the constraint = 0

No, if you analyze a situation where the constraint binds in steady state, then this will apply:

1 Like

Hi Prof. Pfeifer,

As the title says, I am a novice user of Occbin. I am implementing the following paper in Occbin. https://www.frbsf.org/economic-research/wp-content/uploads/sites/4/wp2020-10.pdf

I assumed that the constraint is binding in the reference regime following the file “borrcon.mod”. While running the file I encountered the following error: “The steadystate file did not compute the steady state”. I could not figure out where I am going wrong. Any lead would be much appreciated. You will find the mod file attached here.
msdsge_nb.mod (5.1 KB)

Best
Saidul

As the message states, your steady state computations do not solve the model.

Hi Prof. Pfeifer,

Now I am working on another model featuring a collateral constraint. I could solve the no constraint version of the model. However, when I implemented the collateral constrained version of the model with Occbin the piecewise solution of the variables turned NaN and also I got the some error messages like–
“Warning: Matrix is singular, close to singular or
badly scaled. Results may be inaccurate. RCOND = NaN”

Any clue to get around this problem would be a great help. I am stuck here for weeks.

Best,
Saidul

You should try to proceed step by step. Does the model work for one time shocks that trigger the constraint?

Thanks for your reply. I tried with one time shocks, which never trigger the constraint and results in only linear solution. I have sent you the files.

But my question referred explicitly to a shock triggering the constraint. Does that work at all?

In this model, the market value of physical capital serves as a collateral. Thus, the constraint is intended to impose a ceiling on the leverage ratio, which, in turn, depends on a parameter (\kappa in this case). A high leverage ratio makes the constraint binding. No shocks is responsible for triggering the constraint. It is only after when the constraint binds, exogenous shocks (to TFP, foreign interest rate and imported input price) produce “Sudden Stops”.

But there must be a shock that sufficiently drives the leverage ratio.

The author argues that a sequence of realization of exogenous shocks can take the economy to a high leverage ratio state at which the constraint becomes binding.