A simple python package to provide mortgage repayment calculations using the French method of amortization
Project description
Parameterized Mortgage
A package to provide an easily vizualizable mortgage class, built on the Holoviz Param and Panel packages.
Installation
Import the Mortgage class:
from parameterized_mortgage import Mortgage
Demo
The package includes a demo dashboard application to show how the Mortgage class can be embedded in visualizations using holoviz panel. See the code in parameterized_mortgage.dashboard to see how this is achieved.
To run the demo, install the package
Usage
Mortgage class constructor and user-set parameters
The Mortgage constructor takes 3 named parameters:
- principal (float): amount initially borrowed
- rate (float): annual interest rate expressed as a %
- term (int): mortgage term in years
e.g.:
mortgage = Mortgage(principal=300000, rate=4.5, term=20)
These three parameters can be re-set at any time and all other members will be recalculated automatically as a result.
e.g.:
mortgage.rate = 3.8
Other class members
Mortgage.monthly_payment: A float representing the value of monthly repayments without rounding
Mortgage.get_monthly_payment(): Returns the monthly repayment as a string, formatted to 2 decimal places
Mortgage.repayment_schedule(): Returns a pandas DataFrame containing the full repayment schedule or amortization table
Mortgage.annual_summary(): Returns a pandas DataFrame containing the repayment schedule summarized by year
Mortgage.lifetime_summary(): Returns a pandas DataFrame containing the repayment schedule summarized over the whole lifetime of the mortgage
Mortgage.custom_widgets(): Returns dictionary detailing customised widgets for a panel.Param object that will allow the user-set parameters to be incorporated easily in a dashboard
Mortgage.amortization_chart(): Returns a plot of the outstanding loan over time
Mortgage.chart_interest_vs_capital(): Returns a plot of the interest and capital components of monthly payments over time
Contributing
Contributions are welcome!
License
This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.
Disclaimer
This software makes calculations that could be relevant to investment decisions, but it is provided without warranty. Users' attention is drawn to the relevant paragraphs of the licence.
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
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 parameterized_mortgage-0.1.1.tar.gz.
File metadata
- Download URL: parameterized_mortgage-0.1.1.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72575b6cec752b904cc5f2fcfc447adf1a104805f7e0e7f02c7e758234db5884
|
|
| MD5 |
86086ff8df7b168fcbc3e60c817dba75
|
|
| BLAKE2b-256 |
c9f1574918d9b0c91757d385e5c24aa07521b9d9b65e201422fa5054f26deace
|
File details
Details for the file parameterized_mortgage-0.1.1-py3-none-any.whl.
File metadata
- Download URL: parameterized_mortgage-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c495303bffc3facd6414f278dba18c8042087b9bdd525423577813c881ea038
|
|
| MD5 |
f8e899316a6d650a2dcf5fb9e4373e71
|
|
| BLAKE2b-256 |
97b064b1b6ce83c9378a1ebdca6c37b24094df282b179775585da6a74020fddd
|