🏠 Rent or Buy?
The buy-vs-rent decision simulator — which strategy leaves you wealthier, and how sure can you be.
Run it
Install from PyPI and start the app:
pip install rent-vs-buy-simulator
rent-vs-buy # serves the app at http://localhost:8501 (set PORT to change it)
Or run it from a clone of the repo:
uv run uvicorn simulator.server:app --port 8000
Open http://localhost:8000.
Using Rent or Buy?
- A 12-step tour walks you through every feature on first visit; replay it anytime via Replay the Tour in the guide.
- The
?button opens the in-app guide — the concepts behind the verdict, one click away. - Region presets — United States, France (Lyon), Germany (Köln), Netherlands, United Kingdom (England & NI) — fill in tax rules, buyer costs and typical prices, rendered in each market's currency.
- First-time-buyer relief where a region enacts it — on by default, withdrawing itself above the statutory price cap.
- Market outlook — conservative, historical, or optimistic growth and inflation assumptions.
- Advanced drawer — tax deductibility, capital gains, levies, maintenance; every default follows the selected region.
Every slider input updates the charts live, and the address bar is always a shareable link to your exact scenario.
Understanding & hacking Rent or Buy?
- docs/README.md — full annotated index
- docs/architecture.md — system + module map
- docs/formulas.md — the math behind the engine (Net Value, Monte Carlo, tax primitives)
- docs/adr/README.md — 9 design decisions
- CONTEXT.md — project vocabulary
- DEPLOYMENT.md — Docker + analytics wiring
Numbers
Verified from source, not asserted:
- 12 tour steps (
src/simulator/static/js/tour.js) — welcome → region presets → first-time-buyer relief → outlook → situation → verdict → decision chart → fan/tornado → advanced → numbers → guide → all set. - 5 region bundles (
src/simulator/regions.py) — United States, France (Lyon), Germany (Köln), Netherlands, United Kingdom (England & NI); United States is the shipped default on a fresh load. - Monte Carlo defaults (
src/simulator/models.py,MonteCarloConfig) — 500 simulations, seed 42, property-appreciation σ 8.0 pp, equity-growth σ 15.0 pp, rent-inflation σ 1.5 pp, correlation ρ 0.3. - 12 pytest files (
tests/test_*.py), 5 Playwright spec files (tests/*.spec.js):tour,welcome,analytics,a11y,restore. - Package rent-vs-buy-simulator v2.0.0 (
pyproject.toml).
Develop
- No build step — a vanilla ES-module frontend served straight from
static/. uv run pytest tests/ -q— engine, API, region, Monte Carlo, and Umami tests.npx playwright test— headless E2E (the config leaves Playwright's default headless mode) over the welcome modal, 12-step tour, analytics contract, a11y, and share/restore specs.Dockerfilefor deploy (FastAPI + static files,PORTselects the listen port).
See docs/formulas.md for the mathematical reference and CONTEXT.md for the vocabulary.
Metadata
Release files for rent-vs-buy-simulator 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rent_vs_buy_simulator-2.0.0.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rent_vs_buy_simulator-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.1 MB
Release files / rent_vs_buy_simulator-2.0.0.tar.gz
| Download URL | rent_vs_buy_simulator-2.0.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99faf6fd341c5fb11f45102b6cf9f511e91053f373e32d63ab161a319072cd68
|
|
BLAKE2b-256 checksum How to use checksums |
d75a34952ade12d2f9feceef677cba7b86329d7a3fbe5a238fadde7d3a7ab03b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / rent_vs_buy_simulator-2.0.0-py3-none-any.whl
| Download URL | rent_vs_buy_simulator-2.0.0-py3-none-any.whl |
|---|---|
| Size | 948.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9aada04b9e6b4e7dd18dab07fccfb74c293eb1a760cc26805eae35442395a294
|
|
BLAKE2b-256 checksum How to use checksums |
ab6c0414c6dec9bd58103ddf4a80036f42daa0bf7d6c9ee8833ed2769b209297
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|