Skip to content
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

Parameterize IRS rounding rules for indexed parameter values #2654

Open
jdebacker opened this issue Mar 31, 2022 · 4 comments
Open

Parameterize IRS rounding rules for indexed parameter values #2654

jdebacker opened this issue Mar 31, 2022 · 4 comments

Comments

@jdebacker
Copy link
Member

Tax-Calculator should parameterize the rounding rules of indexed parameters in policy_current_law.json. There will probably need to be an update to the ParamTools package to handle rounding in the extrapolation of parameters.

The need for rounding has been highlighted in PR #2652, where a new JSON file was created to help with the round-trip-reform test. With out that, all JSON files of past legislative reforms need to be updated to reflect rounding rules in years beyond those affected by the legislative change.

Advantages of building in rounding rules:

  1. Reduce time and errors in maintenance currently required to update rounded parameter values each year
  2. Reduces the size of policy_current_law.json -- it would no longer need to include all values from the first to last known values (currently 2013-2022), but rather just values for any legislative changes
  3. Allows for JSON files representing enacted laws to keep their integrity (no additional year values need to be added for rounded values going beyond the years affected by the legislation -- JSON files represent only the legislative changes)
  4. Improves accuracy of calculations in years beyond the last known year

cc @MattHJensen @hdoupe

@hdoupe
Copy link
Collaborator

hdoupe commented Apr 6, 2022

Hey @jdebacker , this sounds like a nice enhancement. I think you may be able to implement the new rounding rules on the taxcalc.Parameters class by overriding the extend_func method: https://github.com/PSLmodels/ParamTools/blob/0107eceb4a732e3c0eea32dd83b56ae253d009cb/paramtools/parameters.py#L973-L1020

By default, it rounds to 2 places. But, this method has access to the parameter's name, so you could round it however you'd like.

There's a simpler example in the tests that might make it a little easier to see how the method works: https://github.com/PSLmodels/ParamTools/blob/0107eceb4a732e3c0eea32dd83b56ae253d009cb/paramtools/tests/test_parameters.py#L2229-L2283

@jdebacker
Copy link
Member Author

Cool - thanks for the pointers @hdoupe!

@jdebacker
Copy link
Member Author

Relevant issue over in the ParamTools repo: PSLmodels/ParamTools#130

@jdebacker
Copy link
Member Author

jdebacker commented Jun 24, 2022

Note - will need to record the base year for indexing for each parameter. This can probably be recorded in the parameter metadata in policy_current_law.json

@Peter-Metz do you recall doing any research on the base years for each parameter that can be used for indexing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants