Author: cs224
Last updated: 2025-12-15
Python implementation: CPython
Python version : 3.12.9
IPython version : 9.8.0
numpy : 2.3.5
pandas : 2.3.3
scipy : 1.16.3
nbdev : 2.4.6
matplotlib: 3.10.8
IO
Inputs contract
file format contract and cleaning rules:
- required columns: date, cashflow, valuation (case-insensitive)
- dates aggregated (sum flows, last non-null valuation)
load_cashflows
load_cashflows (path:str|pathlib.Path)
LoadResult
LoadResult (df:pandas.core.frame.DataFrame)
lr = load_cashflows("../tests/fixtures/golden_fixture.csv")
lr.df| date | cashflow | valuation | |
|---|---|---|---|
| 0 | 2025-01-01 | 0 | 100000 |
| 1 | 2025-03-31 | -20000 | 125000 |
| 2 | 2025-06-30 | 0 | 130000 |
| 3 | 2025-09-30 | 15000 | 120000 |
| 4 | 2025-12-31 | 0 | 140000 |