Skip to main content

Flexible mortgage amortization and analytics tools in Python

Project description

MortgageModeler

MortgageModeler is a modular Python toolkit for modeling mortgage amortization, refinancing, FHA loans, and HELOCs — complete with CLI support and plotting.

PyPI GitHub Binder

MortgageModeler lets you simulate mortgage payments over time, compare fixed vs ARM loans, evaluate refinance and recast scenarios, and export visualizations or CSVs — all from Python or the command line.

Installation

Install from PyPI:

pip install mortgagemodeler

Quickstart

Using the Python API:

from mortgagemodeler import Loan

loan = Loan.from_fixed(principal=400000, rate=0.065, term_years=30)
loan.plot_amortization()

CLI Usage

Run amortization simulations via CLI:

mortgagemodeler simulate --principal 400000 --rate 6.5 --term 30

Use --help to see all available options.

Features

  • Fixed-rate, ARM, FHA, and HELOC support
  • Recast and refinance simulation logic
  • Cost comparison based on exit year or refinance timing
  • Monthly and annual amortization tables with CSV export
  • Matplotlib-based amortization plots
  • Python API and CLI tool (mortgagemodeler)
  • Easily extendable for other loan types and policies

Example Notebooks

This repo includes ready-to-run Jupyter examples in the notebooks/ folder:

  • Fixed_vs_ARM.ipynb: Compare fixed vs adjustable-rate loan paths
  • FHA_vs_Conventional.ipynb: Analyze MIP vs PMI cost impact
  • Refinance_Breakeven.ipynb: Estimate the optimal time to refinance

Launch directly in Binder: Binder

License

MIT License © 2025 Arun Kumar

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

mortgagemodeler-0.2.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

mortgagemodeler-0.2.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file mortgagemodeler-0.2.0.tar.gz.

File metadata

  • Download URL: mortgagemodeler-0.2.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for mortgagemodeler-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a22234068d7ded5b6167364aa363381da4d7f4e6e8c55c140b4cd303658ee85d
MD5 aa296b0d0e5672a9e90239f043b0eaa1
BLAKE2b-256 d22ad1f8c3631ce42d184f8b8c5628e4ffa37c88ae26cf5d9925f53a50e864b5

See more details on using hashes here.

File details

Details for the file mortgagemodeler-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mortgagemodeler-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5cb9ef501c2a983cf0f4e3ed171828fe5d043332bb5fa56dabedc9b1a8f529fc
MD5 638d30722340ce65c7b35b15d51c001b
BLAKE2b-256 de3264557ccb2c90f998d09768b61a9aff94fe4a4620d2adf8554bb06696d5aa

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