acturtle / cashflower

An open-source Python framework for actuarial cash flow models

Home Page:https://cashflower.acturtle.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyPI Latest Release pytest Documentation Status

Info

Cashflower is an open-source Python framework for actuarial cash flow models.

Prerequisites

Python version >=3.9

Usage

Installation

terminal

pip install cashflower

Create model

python console

from cashflower import create_model

create_model("my_model")

Creates:

my_model/
    input.py
    model.py
    run.py
    settings.py

Input

my_model/input.py

runplan = Runplan(data=pd.DataFrame({"version": [1]}))

main = ModelPointSet(data=pd.DataFrame({"id": [1]}))

Model

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)

Calculate

terminal

python run.py

Contribution

The cashflower package is open-source. Everyone can use it and contribute to its development.

GitHub repository:

https://github.com/acturtle/cashflower

Documentation:

https://cashflower.acturtle.com

About

An open-source Python framework for actuarial cash flow models

https://cashflower.acturtle.com

License:MIT License


Languages

Language:Python 99.5%Language:Cython 0.5%