Dear Professor Pfeifer,
I have a model that works perfectly. in line 76, I have a min function which controls the leverage ratio. when it 2.6 the code works (because the simulation of phi is always below 2.6), but when I reduce that to a lower value such as 2.5 the simulation doesn’t work. I was wondering if there is way to deal with this problem.
Thank you for your time. here is the modelmodel.zip (5.3 KB)
Kind regards,
Leo
This one is tricky. Occasionally binding constraints are hard to solve with standard approaches. Can you set it up as a MCP problem?
Dear professor Pfeiffer,
I was wondering if you have any advice on this issue?
Kind regards,
Leo
Unfortunately, not really. This is a hard problem. You could try starting from the solution without the constraint.
Thank you for you reply. Actually the code works well without the constraint. The problem appears when the constraint is added.
What I am saying is: solve the model without the constraint and then use that solution as the starting values for the mcp-problem. See e.g.
/*
* This file implements a simple Susceptible-Infected-Recovered (SIR) model as in
* James H. Stock (2020): "Data Gaps and the Policy Response to the Novel Coronavirus".
*
* Notes:
* - The model frequency is weekly and simulations are for a year.
* - The model itself is purely backward-looking and can efficiently be solved using
* Dynare's perfect foresight solver
* - The present model enforces the complementary slackness constraints that the number of
* infected cannot be negative and that the number of infected and recovered cannot exceed
* the population. This prevents an overshooting in some extreme calibrations.
* - The original paper does not clearly specify the process for the infection rate beta; the
* scenarios in this file replicate them qualitatively, but not exactly in terms of quantitative
* results
* - A current limitation of Dynare 4.6.1 is that it does not allow for using the LMMCP solver for
* purely backward-looking models. The present mod-file gets around this by specifying a dummy
* forward-looking equation.
* - As a consequence, the last period of the plots needs to be ignored.
* - The mod-file starts from a low number of 50 infected. In terms of population percentage, this is
* very low and requires the default tolerance to be decreased. Otherwise, 0 infected will be a solution.
This file has been truncated. show original