mincong-h / finance-toolkit

Finance Toolkit
3 stars 1 forks source link

Remove "-1 day" hack in pipelines #72

Open mincong-h opened 2 years ago

mincong-h commented 2 years ago

In Boursorama pipeline, we manually perform a "-1 day" operation:

https://github.com/mincong-h/finance-toolkit/blob/1987deef3686e6ee9c601b7b2f248061c44f7aa3/finance_toolkit/boursorama.py#L74-L76

This is because BNP bank cannot find the account balance of the current date, but the latest business day. For example, today is Saturday 11 June 2022, when downloading BNP's data, we can only retrieve account balance of Friday 10 June 2022. If today is Sunday 12 June 2022, we will still get the balance of Friday 10 June 2022 as it's the last business day. To align with BNP, we did the hack for Boursorama and only download data on Friday or Saturday. This can be fixed using a "fill N/A" function in the final balance CSV (which contains all the accounts) or something similar.