Mortgage
Mortgage is a simple calculator intended to aid comprehension of the true cost of a mortgage.
Installation
To install mortgage, simply:
pip install mortgage
Documentation
Documentation is available at https://mortgage.readthedocs.io
How To Use
This package is intended to help understand the true cost of a mortgage. It also can help you easily compare between different mortgages.
Begin by importing the loan class
from mortgage import Loan
Create a simple mortgage
from mortgage import Loan
loan = Loan(principal=200000, interest=.06, term=30)
View a summary of pertinent mortgage information by calling the summarize property.
from mortgage import Loan
loan = Loan(principal=200000, interest=.06, term=30)
loan.summarize
>>> Original Balance: $ 200,000
>>> Interest Rate: 0.06 %
>>> APY: 6.17 %
>>> APR: 6.00 %
>>> Term: 30 years
>>> Monthly Payment: $ 1199.10
>>> Total principal payments: $ 200,000.00
>>> Total interest payments: $ 231,676.38
>>> Total payments: $ 431,676.38
>>> Interest to principal: 115.8 %
>>> Years to pay: 30.0
Particularly telling is the Interest to Principal ratio. With the mortgage terms above, you will pay 115% of the original balance in interest! Compare that to the same loan with a 15 year term below
from mortgage import Loan
loan = Loan(principal=200000, interest=.06, term=15)
loan.summarize
>>> Original Balance: $ 200,000
>>> Interest Rate: 0.06 %
>>> APY: 6.17 %
>>> APR: 6.00 %
>>> Term: 15 years
>>> Monthly Payment: $ 1687.71
>>> Total principal payments: $ 200,000.00
>>> Total interest payments: $ 103,788.46
>>> Total payments: $ 303,788.46
>>> Interest to principal: 51.9 %
>>> Years to pay: 15.0
In this case, you only pay 52% of the original loan balance in interest. Obviously, the shorter the term with all else equal, the less interest you'll pay. But it helps to know exactly how much more/less you'll pay.
Run The Test Cases
From the top level directory, run the following command:
pytest
Thank You
Thanks for checking out the package! I hope you find it useful.
Feel free to open an issue with suggestions, imporovements, ideas, etc.
Release files for mortgage 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mortgage-1.0.5.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mortgage-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.4 kB
Release files / mortgage-1.0.5.tar.gz
| Download URL | mortgage-1.0.5.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18fcb356c631e9cc27fa7019f6ff6021707e34b9ce3a3b7dc815661288709921
|
|
BLAKE2b-256 checksum How to use checksums |
9efae87a74a20ee6631b44507f8f757fa4c723f8f4dd467e39d947bc840b669b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
|
Release files / mortgage-1.0.5-py3-none-any.whl
| Download URL | mortgage-1.0.5-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1af39b28d722b06e98087535ef466d9f3422726b268a477f7b4b80d349035e6
|
|
BLAKE2b-256 checksum How to use checksums |
51b9e110eb77f30bf2b85639b726c299e5d1950ec6c4d8872c2f958636884f88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
|