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.1.2.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.1.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mortgagemodeler-0.1.2.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.1.2.tar.gz
Algorithm Hash digest
SHA256 f70bf01900fb8fc413f8dba3d7f07dba119899b2e5ccf9449d9113330a405690
MD5 079b14c846c2635854fc57ead36c110c
BLAKE2b-256 a0b8056f8cec84cbf61b3639909b11cf180a87b6d6cf23504428d58e03755c62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mortgagemodeler-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 969e2cd659ed063f7cca52df0322d1dc37073336888b65411cae7eda438216c0
MD5 163ae878838ca37ecfb8d477c24b983a
BLAKE2b-256 bf0eaa44711e3b4ddd54f2fbc733682010c05c845e558fd4abc99e74660322b3

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