A lightweight, dependency-free finance calculations library
Project description
pyfinancecalc
A lightweight, dependency-free finance calculations library for Python.
Features
- Investment: SIP future value, lump sum future value, CAGR, XIRR (no dependencies).
- Loans: EMI, interest/principal split, amortization schedules.
- Planning: Required SIP or lump sum to hit a goal.
- Core: NPV, IRR, rate conversions.
Quick Start
pip install pyfinancecalc
from pyfinancecalc import sip_future_value, emi, cagr
print(sip_future_value(1000, 0.12, 24)) # SIP FV
print(emi(500000, 0.09, 240)) # EMI
print(cagr(100000, 150000, 2)) # CAGR
XIRR Example
from pyfinancecalc import xirr
cashflows = [-10000, 3000, 3000, 3000, 6000]
dates = [0, 120, 240, 360, 480] # days from t0
print(xirr(cashflows, dates))
Testing
pip install pytest
pytest
#\x00 \x00p\x00y\x00f\x00i\x00n\x00a\x00n\x00c\x00e\x00c\x00a\x00l\x00c\x00 \x00 \x00
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyfinancecalc-0.1.0.tar.gz
(5.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfinancecalc-0.1.0.tar.gz.
File metadata
- Download URL: pyfinancecalc-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bee8e86c82749d95377f61996be10cde1c6a17c2109f01eb4d738f9732c8749a
|
|
| MD5 |
ebb61dc75e8e83b876881bc6210e81a6
|
|
| BLAKE2b-256 |
0444c3b333beb4162c42930bf8243106e8babb07221a0c43930609d0269b6012
|
File details
Details for the file pyfinancecalc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyfinancecalc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10d7d1110b6718fd0a23b5cef1d8677d20e03bc2abc4b9a7d98a19d15c617e73
|
|
| MD5 |
789ed8a5c5b3ad9b23dceb247d342484
|
|
| BLAKE2b-256 |
03fd51788ddb934f2263a022a88601646f8e6c3494ca424d6118b258965f195d
|