Skip to main content

Renovation Loan Simulator (France)

A desktop app (Qt / PySide6) to simulate a loan for renovating an apartment in France (prêt travaux).

Install

pip install loan-simu
loan-simu            # or: python -m loan_simu

It needs Python 3.10 or later. PySide6 and matplotlib are installed with it.

Numbers are shown in French format and you can type 4,5 or 4.5. Results update as you type.

The app follows the system's light or dark mode. To force one, set LOAN_SIMU_THEME=light or LOAN_SIMU_THEME=dark.

Simple mode

You enter the works cost, down payment, duration, rate, insurance, your net monthly income and your other loan payments. You get:

  • the monthly payment, the total cost of credit and the APR (TAEG)
  • the debt ratio (taux d'endettement), on a gauge against the 35 % HCSF limit, and the money left each month
  • a breakdown of capital, interest and insurance
  • a table comparing durations from 3 to 25 years, with the debt ratio for each; click a row to use that duration

In-depth mode

Area What it covers
Project Works cost, down payment (apport), grants (MaPrimeRénov', CEE…)
Main loan Personal loan (crédit conso) or real-estate loan (prêt immobilier), rate, duration, partial or total deferral (différé)
Insurance Rate, based on initial or remaining capital, coverage (quotité)
Fees Bank fee (frais de dossier), guarantee (caution / hypothèque), broker fee
Éco-PTZ 0 % loan for energy renovation, with a cap and maximum duration per category
Budget Debt ratio against the 35 % HCSF limit, money left to live on (reste à vivre)
Early repayment Penalty (IRA), interest saved, choice between a shorter loan and a lower payment
Checks APR above the usury rate, consumer loan over 75 000 €, real-estate loan over 25 years

The in-depth mode also has an amortization table (combined or per loan, by month or by year, exported as CSV for French Excel) and charts.

Calculation rules

  • Monthly rate = nominal rate / 12 (taux proportionnel), constant monthly payments.
  • The TAEG is the actuarial rate including interest, insurance and upfront fees. It is calculated without the early repayment, as banks do.
  • IRA:
    • real-estate loan: the lower of 6 months of interest and 3 % of the remaining capital
    • consumer loan: 1 % of the amount repaid (0.5 % if 12 months or less remain), nothing for 10 000 € or less, capped at the remaining interest
    • éco-PTZ: no penalty

Keep these up to date

The values in src/loan_simu/core.py change over time:

  • Usury rates (USURY_*) are published every quarter by the Banque de France. The real-estate table is from Q4 2026. The consumer table is from Q3 2026, because the Q4 figures were not found.
  • Éco-PTZ caps (ECO_PTZ_CATEGORIES): check them on service-public.fr (page F19905).

Development

git clone https://github.com/leoguignard/loan-simu.git
cd loan-simu
pip install -e ".[dev]"  # app + release tools (bumpver, build, twine)
python -m unittest       # engine tests + offscreen UI smoke test
src/loan_simu/
  core.py         calculation engine (no GUI dependency)
  ui/
    app.py        main window and entry point
    simple.py     simple mode
    advanced.py   in-depth mode
    widgets.py    cards, number fields, debt-ratio gauge
    charts.py     matplotlib charts
    theme.py      light/dark palettes and stylesheet
tests/            engine tests and an offscreen UI smoke test

Releasing to PyPI

  1. Bump the version with bumpver. It updates pyproject.toml and src/loan_simu/__init__.py, then commits and tags (needs a clean working tree):

    bumpver update --patch --dry   # preview the change
    bumpver update --patch         # or --minor / --major
    git push --follow-tags
    
  2. Build and check:

    rm -rf dist && python -m build
    twine check dist/*
    
  3. Upload to TestPyPI first, then to PyPI:

    twine upload --repository testpypi dist/*
    twine upload dist/*
    

Disclaimer

This is a simulation, not a loan offer. Your bank's offer (offre de prêt) and its FISE are the documents that count.

License

MIT, see LICENSE.

Metadata

Release files for loan-simu 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for loan-simu 0.2.0
File Size Uploaded Provenance Actions
loan_simu-0.2.0.tar.gz 28.5 kB Without provenance Details for loan_simu-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for loan-simu 0.2.0
File Interpreter ABI Platform Actions
loan_simu-0.2.0-py3-none-any.whl Python 3 none any Details for loan_simu-0.2.0-py3-none-any.whl

Total release size: 56.4 kB

Release files / loan_simu-0.2.0.tar.gz

Download URL loan_simu-0.2.0.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bee0e5f075098e40b54add8622bfce5ae94f7e3c8f1c1a9fef0cff9d0f00836e
BLAKE2b-256 checksum
How to use checksums
4f1b11ff12ff5aaf5bbe760aff009908af9428aece983ed2db65ae2203be5086
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / loan_simu-0.2.0-py3-none-any.whl

Download URL loan_simu-0.2.0-py3-none-any.whl
Size 27.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f5b0da1269ef4d7e6f0ea3671b2f1ae898d0a556c177722195ea104ebf4053d
BLAKE2b-256 checksum
How to use checksums
e40912b6fd3eab74072281e81ac636a96fdf5dbb16c5db3b872894111e226b9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for loan-simu 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page