Written by me, AI-reviewed

Vehicle Finance Engine

Code · Python · Active · Updated 2026-11-03 · 1 min read

Problem

Vehicle loan calculators often live in one large spreadsheet. The rules for pricing, insurance and affordability are spread across cells, which makes them hard to test and easy to break.

What I built

A generic vehicle finance engine in Python, written from scratch as separate modules: pricing, insurance, customer tiers and affordability. Every parameter comes from a configuration object. The repository ships a synthetic example configuration only; no real lender parameters are published.

How it works

pricing.py computes the financed amount and instalment. insurance.py builds the premium for a coverage combination across the loan tenor. tiers.py assigns the rate tier. affordability.py compares the instalment and other debts against income. example_config.py holds the synthetic numbers that drive the tests.

Evidence

Limits and next steps

The engine covers one product shape. It does not model early settlement, fees that vary by partner, or regulatory caps by market. Those are the next rules to add as configuration, with tests first.

Links

Source on GitHub