Open jdebacker opened 7 years ago
Sounds good. We might need to put limits on the world interest rate so that it solves.
@salimfurth Good point. We might do some testing to see this range. Does 1%-10% seem ok?
Yeah, that's plenty wide enough. I haven't stress-tested - I imagine some extreme values in that range will give negative G or other nonsense results even if they solve.
@jdebacker I'm a bit unclear on the econ terms used here - is open economy version
currently part of the webapp-public (i.e. is webapp-public hardcoded to closed economy version
now) or does open vs closed refer to the Partial Equilibrium vs Macro Elasticities choice? I don't have a clear picture of where the checkbox and exogenous interest rate UI inputs need to go.
@PeterDSteinberg let me see if I can clarify. OG-USA now (since PR #249), allows one to consider two versions of the overlapping generations model. One is where the economy is assumed to be "closed" - so that there is not trade or financial interactions with outside countries. And the other is where the economy is assumed to be "open", so goods or capital and flow into the U.S. economy we are modeling.
We want to make it an option for the user to switch between these on Tax Brain. Currently, one can do this in the source code by changing the keyword argument 'small_open':False
that is passed to ogusa.execute.runner()
@PeterDSteinberg . As @jdebacker mentioned in the previous comment, the small open economy option in OG-USA
is a boolean ('small_open': True
or 'small_open': False
) that can be passed into the ogusa.scripts.execute.runner()
function.
'small_open': False
, the closed economy version of the model runs, and no other options are required for running the model with regard to the close versus small open option.'small_open': True
, the small open economy version of the model runs. We currently have a default world interest rate of 0.04 that is assumed when the small open economy option is selected. But we want the user to be able to input this assumption if they want. A user could input the world interest rate by supplying a value 'world_int_rate': 0.035
in the user_params
dictionary in the run_ogusa_serial.py
script. This dictionary would be passed to ogusa.scripts.execute.runner()
. We would need to update the script runner()
to acommodate my suggested 'world_int_rate'
key, but we just have to pass that value to parameters.py
and set ss_firm_r_annual
in line 327 and ss_hh_r_annual
in line 328 to either the default for world_int_rate
or to its user-supplied value.For PolicyBrain
implementation of these options, we should:
'small_open': False
in the kwargs
passed into OG-USA
in the script that runs the model (e.g., run_ogusa_serial.py
). The help box text for this check box should be: "If this box is left blank, the OG-USA model is assumed to be a closed economy. If the box is checked, the OG-USA model is assumed to be a small open economy with a fixed world interest rate. The user can either choose to supply a world interest rate below. Otherwise, the model will use the default world interest rate."'small_open': False
in the kwargs
passed into OG-USA
in the script that runs the model (e.g., run_ogusa_serial.py
), and another field becomes available for the fixed world interest rate. If the user supplies no value for the world interest rate, the default (0.04 is used. If they supply a value (bounded between 0.02 and 0.06), then that value is passed to parameters.py
as described in point (2) above. The help box text for the world interest rate field should be: "In the small open economy case, the user can either supply a world interest rate (between 0.02 and 0.06) or the default (0.04) can be used."Hi @rickecon Those notes on open economy options are helpful. I have made some tentative local changes in OG-USA / webapp-public I need to try out further and will push something up tomorrow.
Thanks @PeterDSteinberg . I will submit a PR on this that updates the code in execute.py
to change the internal interest rates in parameters.py
.
@rickecon @jdebacker See the OG-USA PR above (I think that makes the necessary changes in OG-USA), but I am still having trouble locally with this PolicyBrain builder PR.
We should add a check box/radio button to toggle between the closed economy version of OG-USA (the default) and the open economy version.
Shall we also let the user input the exogenous interest rate?
cc @rickecon @salimfurth