-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update r_gov_scale and r_gov_shift variables in macro_params.py #24
Conversation
New calculation for r_gov_shift and r_gov_scale
We can also hard-code the results instead of running the same OLS with the fixed results: Note: the estimated values exceed the hard coded limits: paramtools.exceptions.ValidationError: { @rickecon : Can we consider changing the limits? These look to be hard-coded into the OG-Core default parameters. |
@SeaCelo @rickecon Hi Marcelo - I reviewed the code and it looks good to me in terms of achieving what you set out to do, which I thought is a good way to reverse-engineer the constant and the coefficient on corporate bond yield. But a question I have for Rick is about how |
scale and shift must be switched around. I'll look to make sure everything is estimated correctly and assigned to the correct variable. From existing calibration in
The formula seems to be the opposite (which is what Rick found weird at our last conversation): |
FYI, the documentation in OG-CORE uses a slightly different application of the scale parameter. Equation 79: |
Fix the assignation of the shift and scale parameters
@SeaCelo. Will you please update this branch with the most recent PR's so I can test it properly? To do so, do the following steps:
|
@rickecon I think the branch is updated now |
@SeaCelo. This doesn't work. The value for
@jdebacker and I had this discussion/debate in OG-Core Issue #841 about what the bounds of
|
And here is the full code to estimate the coefficients
|
Changed sign of the coefficient to match the specification
@SeaCelo. Three questions.
|
@rickecon Remember that we don't actually have data. We have the estimated model from the paper referenced in this post. We are taking a fitted quadratic model and then estimating a linear model to fit the specification in OG-CORE. This line creates the fitted data since we only have the coefficients from the paper: |
@SeaCelo. I see. This makes the transformation more difficult. Here are the steps I would do.
|
@SeaCelo. Maybe it is easier to do steps (1) and (2) above, skip step (3), do step (4) and estimate the linear model. Then just divide its constant coefficient by 100 in the end. |
Fix unit and sign of the constant
@rickecon I think we agree on the procedure. The units needed to be fixed as you pointed out, but that just requires dividing the constant by 100. Regardless, I retraced the steps:
With the corrected units we should be fine now.
I updated the PR with this change. |
@SeaCelo. That is correct. I'll try and get this merged in the next hour. |
@SeaCelo. If this is ready for my review, which I think it is, will you please click the "Ready for review" button right under "All checks have passed". This will remove the "Draft" status and allow me to merge it once I finish my review. |
Hardcoding the estimated parameters for r_gov_shift and r_gov_scale
I changed the code a bit to hard code the estimates but keep the model under comment as a reference. |
@SeaCelo. The new update in OG-Core that allows for a negative |
@SeaCelo. Thanks for this PR. This is ready to merge as soon as you merge the small PR I submitted to your branch. With the publishing of OG-Core version 0.10.2, the new minimum value of Baseline steady state equilibrium computation output
Baseline transition path equilibrium computation output (21 min, 0 sec)
Reform steady state equilibrium computation output
Reform transition path equilibrium computation output (22 min, 43 sec)
|
Updated three initial guesses in ogzaf_default_parameters.json
@SeaCelo. Great. I just made sure that the steady-state solved with its first initial guess with the new parameters in |
New calculation for r_gov_shift and r_gov_scale
Closes #22