Skip to main content

Framework for actuarial cash flow models

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cashflower-0.7.0.tar.gz (80.0 kB view hashes)

Uploaded Source

Built Distributions

cashflower-0.7.0-cp312-cp312-win_amd64.whl (108.0 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

cashflower-0.7.0-cp312-cp312-win32.whl (105.7 kB view hashes)

Uploaded CPython 3.12 Windows x86

cashflower-0.7.0-cp312-cp312-musllinux_1_1_x86_64.whl (201.8 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

cashflower-0.7.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (200.5 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

cashflower-0.7.0-cp312-cp312-macosx_10_9_x86_64.whl (105.5 kB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

cashflower-0.7.0-cp311-cp311-win_amd64.whl (107.9 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

cashflower-0.7.0-cp311-cp311-win32.whl (105.5 kB view hashes)

Uploaded CPython 3.11 Windows x86

cashflower-0.7.0-cp311-cp311-musllinux_1_1_x86_64.whl (196.9 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

cashflower-0.7.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (195.1 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

cashflower-0.7.0-cp311-cp311-macosx_10_9_x86_64.whl (105.1 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

cashflower-0.7.0-cp310-cp310-win_amd64.whl (108.0 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

cashflower-0.7.0-cp310-cp310-win32.whl (105.5 kB view hashes)

Uploaded CPython 3.10 Windows x86

cashflower-0.7.0-cp310-cp310-musllinux_1_1_x86_64.whl (191.8 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

cashflower-0.7.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (188.8 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

cashflower-0.7.0-cp310-cp310-macosx_10_9_x86_64.whl (105.2 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

cashflower-0.7.0-cp39-cp39-win_amd64.whl (107.2 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

cashflower-0.7.0-cp39-cp39-win32.whl (104.8 kB view hashes)

Uploaded CPython 3.9 Windows x86

cashflower-0.7.0-cp39-cp39-musllinux_1_1_x86_64.whl (190.5 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

cashflower-0.7.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (187.5 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

cashflower-0.7.0-cp39-cp39-macosx_10_9_x86_64.whl (104.5 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page