Python library for calculating amortizations and generating amortization schedules
License | Version | ||
Travis CI | AppVeyor | ||
Coverage | Wheel | ||
Status | Downloads | ||
Supported versions | Implementation |
pip install amortization
from amortization.amount import calculate_amortization_amount
amount = calculate_amortization_amount(150000, 0.1, 36)
from amortization.schedule import amortization_schedule
for number, amount, interest, principal, balance in amortization_schedule(150000, 0.1, 36):
print(number, amount, interest, principal, balance)
from amortization.schedule import amortization_schedule
from tabulate import tabulate
table = (x for x in amortization_schedule(150000, 0.1, 36))
print(
tabulate(
table,
headers=["Number", "Amount", "Interest", "Principal", "Balance"],
floatfmt=",.2f",
numalign="right"
)
)
amortize -h
usage: amortize [-h] -P PRINCIPAL -n PERIOD -r INTEREST_RATE [-s]
Python library for calculating amortizations and generating amortization
schedules
optional arguments:
-h, --help show this help message and exit
-s, --schedule Generate amortization schedule
required arguments:
-P PRINCIPAL, --principal PRINCIPAL
Principal amount
-n PERIOD, --period PERIOD
Total number of periods
-r INTEREST_RATE, --interest-rate INTEREST_RATE
Interest rate per period
amortize -P 150000 -n 36 -r 0.1 -s