PolicyEngine / policyengine-core

Core microsimulation engine for PolicyEngine models. Forked from OpenFisca-Core.
https://policyengine.github.io/policyengine-core
GNU Affero General Public License v3.0
14 stars 19 forks source link

Ensure that parameter rounding isn't permitted except as a step within uprating #216

Open anth-volk opened 3 months ago

anth-volk commented 3 months ago

At the moment, rounding within parameter calculation is permitted both alongside uprating (see Vermont, https://github.com/PolicyEngine/policyengine-us/blob/8655d2b86d0bb835b6fa8a26d1a6ae87832fdeeb/policyengine_us/parameters/gov/states/vt/tax/income/rates/joint.yaml#L28) and within uprating (see Rhode Island, https://github.com/PolicyEngine/policyengine-us/blob/8655d2b86d0bb835b6fa8a26d1a6ae87832fdeeb/policyengine_us/parameters/gov/states/ri/tax/income/exemption/amount.yaml#L14). As a result, Vermont's parameter here is not successfully uprated. We should add error handling to ensure that parameter rounding only occurs within the context of uprating, as well as fix those variables which fail this check within the relevant country packages.