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

Trying to annualize records in the PAGE2k database - Error 'year 0 is out of range' #5

Closed
khider opened this issue Oct 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@khider
Copy link
Collaborator

khider commented Oct 11, 2022

Code to reproduce:

pdb.annualize()

Using the example from: https://fzhu2e.github.io/cfr/notebooks/proxy-ops.html

@khider khider added the bug Something isn't working label Oct 11, 2022
@fzhu2e
Copy link
Owner

fzhu2e commented Oct 12, 2022

There are long records beyond year 0. The function utilizes datetime that doesn't support year 0. So we need to preprocess the database and truncate the time period to be starting from year 1. This can be achieved by calling ProxyDatabase.slice([1, 2000]).

@fzhu2e fzhu2e closed this as completed Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants