Skip to content

TimoKats/pylan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pylan-logo

About

Unit tests GitHub tag License: BSD stars - pylan forks - pylan

Pylan is a library that calulates/analyzes the combined impact of recurring events. For example, it can be used to analyze the impact of financial projections, like investment gains, savings, and inflation.

Getting started

To get started, you can install the Python library using PyPi with the following command:

pip install pylan-lib

This code snippet shows some functionalities available when doing simulations. For more information, please see the documentation on pypi. Also, I've added some useful examples of pylan in this slidedeck

import matplotlib.pyplot as plt

from pylan import Item, Subtract, Add, Multiply

savings = Item(start_value=100)
salary_payments = Add("1m", 2500, offset="24d") # Salary paid every month at the 24th
salary_increase = Multiply("1y", 1.2) # Salary grows each year 20%
mortgage = Subtract("0 0 2 * *", 1500)  # cron support

salary_payments.add_projection(salary_increase) # Add increase to salary projection
savings.add_projections([salary_payments, mortgage])
result = savings.run("2024-1-1", "2028-1-1")

x, y = result.plot_axes()

plt.plot(x, y)
plt.show()
pylan-logo