Cashflower is an open-source Python framework for actuarial cash flow models.
Python version >=3.9
terminal
pip install cashflower
python console
from cashflower import create_model
create_model("my_model")
Creates:
my_model/
input.py
model.py
run.py
settings.py
my_model/input.py
runplan = Runplan(data=pd.DataFrame({"version": [1]}))
main = ModelPointSet(data=pd.DataFrame({"id": [1]}))
my_model/model.py
@variable()
def projection_year(t):
if t == 0:
return 0
elif t % 12 == 1:
return projection_year(t - 1) + 1
else:
return projection_year(t - 1)
terminal
python run.py
The cashflower package is open-source. Everyone can use it and contribute to its development.
GitHub repository:
https://github.com/acturtle/cashflower
Documentation: