Cashflower is an open-source Python framework for actuarial cash flow models.
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/model.py
from cashflower import variable
@variable()
def survival_probability(t):
mortality_rate = 0.01
if t == 0:
return 1
return survival_probability(t - 1) * (1 - mortality_rate)
terminal
python run.py
GitHub repository:
https://github.com/acturtle/cashflower
Documentation: