hoostus / portfolio-returns

Beancount portfolio returns generator
Other
38 stars 6 forks source link

Factor out get_cashflows() and add test_cashflows #6

Closed ankurdave closed 2 years ago

ankurdave commented 2 years ago

This PR factors out a function called get_cashflows() and adds a simple test that already passes. This will allow a future PR to address https://github.com/hoostus/portfolio-returns/issues/3.

For ease of debugging and extensibility, get_cashflows() returns a list of Cashflow objects rather than (date, amount) tuples. This requires a small change at the callsite in irr.py.

hoostus commented 2 years ago

Thanks!