Skip to main content

Utilities for mortgage analysis and visualization

Project description

Downpyment

Just a tiny lib to help with mortgage analysis and visualization in Python.

Installation

You can install the package via pip:

pip install downpyment

Usage

The central class is the mortgage one

from downpyment.mortgage import Mortgage, Interest, YEARLY_INTEREST_SCALE, Investment
from downpyment.reporting import MortgageReport


mortgage = Mortgage(
    property_price=450_000,
    interest=Interest(rate=1.85, scale=YEARLY_INTEREST_SCALE, perc=True),
    n_steps=30,
    downpayment=0,
    tax_perc=8,
)
mortgage.simulate()

The main goal is to generate a report as follows:

ep_params = {
    "amount": 5_000,
    "pay_each": 12,
}
investment = Investment(
    initial_amount=120_000,
    step_contribution=ep_params["amount"] / ep_params["pay_each"],
    interest=Interest(rate=5.0, scale=YEARLY_INTEREST_SCALE, perc=True),
    tax_perc=20,
)


MortgageReport(mortgage).report(ep_params=ep_params, inflation_p=2.0, investment=investment)

This will generate a report like this one:

Mortgage simulation with early payments

Mortgage simulation Mortgage simulation with inflation

Mortgage vs investment curves

Mortgage vs investment Mortgage vs investment with inflation

Check the scripts/simulate.py file for a complete example.

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

downpyment-0.1.1.tar.gz (336.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

downpyment-0.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file downpyment-0.1.1.tar.gz.

File metadata

  • Download URL: downpyment-0.1.1.tar.gz
  • Upload date:
  • Size: 336.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.8

File hashes

Hashes for downpyment-0.1.1.tar.gz
Algorithm Hash digest
SHA256 813174217938f16b78cac03481fe0e978338a70190bd717b35527000ee30095a
MD5 abde47fdee395a064d8edc82c80716fc
BLAKE2b-256 b480607bac0bcddcd863e0ca5bc71da3b4e1739cef0e2e45013a16560d6a170e

See more details on using hashes here.

File details

Details for the file downpyment-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for downpyment-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 947fa5c7825a7bdd182d1e8c4f691ab8fe99e617fa6170c6d9d0df2561ffc390
MD5 c71f34fe164f2263713dd7ae554bb187
BLAKE2b-256 e9967e88a4c62af924245e3e8c5a81eae747bf8acc797cdd034dc8eda3023a6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page