Skip to content

Commit b7a60ed

Browse files
Update Readme
1 parent 1dd552d commit b7a60ed

6 files changed

Lines changed: 24 additions & 2 deletions

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33

44
Just a tiny lib to help with mortgage analysis and visualization in Python.
55

6+
# Installation
7+
8+
You can install the package via pip:
9+
10+
```bash
11+
pip install downpyment
12+
```
13+
14+
# Usage
615
The central class is the mortgage one
716

817
```python
@@ -36,3 +45,16 @@ investment = Investment(
3645

3746
MortgageReport(mortgage).report(ep_params=ep_params, inflation_p=2.0, investment=investment)
3847
```
48+
49+
This will generate a report like this one:
50+
51+
# Mortgage simulation with early payments
52+
![Mortgage simulation](mortgage_simulation.png)
53+
![Mortgage simulation with inflation](mortgage_simulation_inflation.png)
54+
55+
# Mortgage vs investment curves
56+
![Mortgage vs investment](mortgage_vs_investment.png)
57+
![Mortgage vs investment with inflation](mortgage_vs_investment_inflation.png)
58+
59+
60+
Check the `scripts/simulate.py` file for a complete example.

docs/mortgage_simulation.png

68.2 KB
Loading
79.8 KB
Loading

docs/mortgage_vs_investment.png

64.8 KB
Loading
73.8 KB
Loading

scripts/simulate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77

88
mortgage = Mortgage(
9-
property_price=450_000,
9+
property_price=300_000,
1010
interest=Interest(rate=1.85, scale=YEARLY_INTEREST_SCALE, perc=True),
1111
n_steps=30,
12-
downpayment=0,
12+
downpayment=30_000,
1313
tax_perc=8,
1414
)
1515

0 commit comments

Comments
 (0)