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

Improve documentation for test of itemized deduction components #2406

Open
Peter-Metz opened this issue Mar 18, 2020 · 1 comment
Open

Improve documentation for test of itemized deduction components #2406

Peter-Metz opened this issue Mar 18, 2020 · 1 comment

Comments

@Peter-Metz
Copy link
Contributor

In preparing #2404, @MattHJensen and I found that test_itemded_component_amounts() in test_calculator.py could use some improved documentation. This test compares the calculated amount for a component of itemized deductions (for example c17000) with the amount that results from implementing a haircut for the corresponding component (for example ID_Medical_hc). In theory these values should be the same, but in practice there are small discrepancies in some cases:

    if year == 2017 and cvname == 'c19700':
        atol = 0.016
    elif year == 2017 and cvname == 'c19200':
        atol = 0.010
    elif year == 2017 and cvname == 'c18300':
        atol = 0.009
    else:
        atol = 0.00001

where atol is the discrepancy in millions USD. Moving forward, it would be helpful to document why these margin of errors are necessary and why they might change after data updates.

@jdebacker
Copy link
Member

@MattHJensen @Peter-Metz I'm happy to add some inline comments to document this, but I don't know why there tolerances vary for certain variables in certain years. Do you?

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

2 participants