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

Hi All
I am a new user in Dynare and can only run a simple model. Is there a simple mod file or user guide that I can use to learn how to use the Occbin in dynare?

The easiest example is tests/occbin/model_borrcon · master · Dynare / dynare · GitLab

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/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