Stochastic simulations using OccBin toolkit

Dear all,

I want to run stochastic simulations for a model displaying an occasionally binding borrowing constraint. I have successfully used the runsim_cgg template in the most updated version of the OccBin toolkit for the cgg/cgg_zlb model. However, my simulations look strange.

First, in some periods, total debt is above the borrowing constraint even after dropping the first several Monte Carlo simulations. (To give a context on this issue, the Lagrange multiplier is negative in the first few simulations but becomes positive after a sufficiently high number of random draws.)

Second, the variance of consumption and hours worked is lower in the economy displaying the borrowing constraint compared to the frictionless economy. On a related note, the average of several endogenous variables differs across the constrained and unconstrained economies, even though the steady state is the same in both, as the borrowing constraint does not bind in the steady state.

Third, as a consequence, welfare is higher in the constrained economy than in the unconstrained one, which is an obviously incorrect result.

The IRFs produced by the built-in OccBin package in Dynare look correct, though. But it seems I do need to use the toolkit to run Monte Carlo simulations.

Any help is greatly appreciated!

Regards,

But why do you need the toolkit do run Monte Carlo simulations?

Hi Professor Pfeifer,

Thank you for the reply. I want to perform Monte Carlo simulations in the constrained and unconstrained models to make welfare comparisons. I checked that welfare is indeed lower in the constrained economy if I compute it using the IRFs to an MIT shock produced by the built-in OccBin package in Dynare. But I wanted to simulate an “actual” economy by drawing random shocks using Monte Carlo simulations, as we can do with the stoch_simul command.

Basically, I’m following the outline laid out in this thread, as I’m facing a similar issue:
Stochastic simulations with OccBin - Occbin - Dynare Forum.

At first, I was using the OccBin built-in package in Dynare, but I realized that stochastic simulations are performed for the unconstrained model only.

Best,

But you can do stochastic simulations with OccBin in Dynare, just not using stoch_simul. tests/occbin/model_irrcap_twoconstraints/dynrbc_common.inc · master · Dynare / dynare · GitLab shows an example. The core part is

   nperiods = 40;
   randn('seed',1);
   shockssequence = 1*randn(nperiods,1)*0.02 ;

   shocks(surprise,overwrite);
   var erra;
   periods 1:40;
   values (shockssequence);
   end;

which you would also have in the toolkit.

Professor Pfeifer,

Thank you for the reference. The simulations seem to work fine. A last question: It seems I can’t shock the economy with all the exogenous shocks at once, but I can just shock the economy with one exogenous shock in each simulation. Is that right?

Isn’t it possible to recover an output similar to oo_.endo_simul in which all the exogenous shocks hit the economy simultaneously?

Best,

No, you can fully specify shock sequences for all exogenous variables in the shocks(surprise)-block. The results will be in oo_.occbin.simul.piecewise. See the manual.

Perfect. I found how to include multiple shocks in the perfect foresight setup:

shocks;
var e;
periods 1;
values 0.5;
var u;
periods 4:5;
values 0;
var v;
periods 4:5 6 7:9;
values 1 1.1 0.9;
var w;
periods 1 2;
values (1+p) (exp(z));
end;

Thanks!

1 Like