Simple package for generating loan amortization table and summary
Project description
Amortizer - Simple loan amortization calculator
Amortizer is a simple amortization table generator which supports two common approaches: annuity payments and straight amortization.
Overview
Amortizer is basically a single python class which instantiates an object with several useful methods.
Method | Description |
---|---|
.get_summary(method="annuity") | Calculates amortization dataframe (methods: 'straight' or 'annuity') and returns a dictionary with summary statistics. |
.straight_amortization() | Calculates amortization table with straight amortization and returns a dataframe. |
.annuity_amortization() | Calculates amortization table with annuity payments and returns a dataframe. |
.to_html(method="annuity") | Calculates amortization dataframe (methods: 'straight' or 'annuity') and returns results to a string with html markup. |
.to_json(method="annuity") | Calculates amortization dataframe (methods: 'straight' or 'annuity') and returns results to a string with JSON object. |
.to_csv(path: str, method="annuity") | Calculates amortization dataframe (methods: 'straight' or 'annuity') and exports results to the .csv file. |
Learn more about the methods above in the Documentation
Installation
Amortizer
supports python3.7 + environments.
$ pip install --upgrade amortize
or use pipenv
$ pipenv install --upgrade amortize
Getting Started
Minimal Example
from amortizer.generator import Amortizer
# Instantiate new object with any suitable name and pass itinial parameters of the loan / mortgage
amortizer = Amortizer(amount=100000, period=18, interest_rate=6)
# Get summary statistics with annuity payments
amortizer.get_summary(method="annuity")
# >>> {'total_cost': 104817.06, 'average_interest_exp': 267.62, 'average_monthly_pmt': 5823.17, 'total_interest_exp': 4817.12}
# Export amortization payments table to csv file
amortizer.to_csv(path="/tmp/", method="straight")
#>>> Data was recorded to straight_amortization.csv at the following location: /tmp/
Resources
Contributing
Feel free to send merge requests.
If you've got questions
License
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
amortizer-0.0.4.tar.gz
(5.5 kB
view details)
Built Distribution
File details
Details for the file amortizer-0.0.4.tar.gz
.
File metadata
- Download URL: amortizer-0.0.4.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a64cd1eb2c42bb7ade132473a7418585634d953a86501e62538ff8ccead45b |
|
MD5 | a8084eb1c63d447276cbd35cc34fcbea |
|
BLAKE2b-256 | a450035fbefa6ccd3554528024163253ef8676f5f99f2512b7372f7736abad71 |
File details
Details for the file amortizer-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: amortizer-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c60bf45d6eb09276eafb8c288296bc4106369af19cac2d8dca82347811868cee |
|
MD5 | 680ae91e3e1f4739bf3b2f72271414a3 |
|
BLAKE2b-256 | f070332fd5053139ac1e26bd72b45f0697b11ce1119fdce76914734e90df0fdd |