A simple Python tool to help you figure out if buying a home was a good investment compared to putting your money in the stock market. It considers your mortgage payments, home improvements, and other costs to give you a clear picture.
- Track all your home-related costs:
- Down payment and closing costs
- Monthly mortgage payments
- Home improvements
- Regular expenses (taxes, insurance, HOA)
- Compare against potential stock market returns
- See how much equity you're building
- Get a simple profit/loss analysis
- Clone and set up:
git clone https://github.com/zlwaterfield/home-model
cd home-model
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
-
Create a CSV with your home costs (see example below)
-
Run it:
python index.py --csv your_costs.csv
category,description,amount,date,frequency
mortgage,term_years=25;annual_rate=5.2,400000,2024-11-27,
initial,Closing costs,23000,2024-11-27,
initial,Down payment,100000,2024-11-27,
recurring,Property Tax,3500,2024-11-27,annual
recurring,Home Insurance,150,2024-11-27,annual
improvement,Appliances,5500,2024-11-27,
improvement,Electrical,22000,2024-11-27,
improvement,Roof,10000,2024-11-27,
improvement,Kitchen,2000,2026-11-27,
improvement,Bathroom,2000,2028-11-27,
sale,6.0,800000,2029-12-01,
- This is a work in progress!
- Makes some basic assumptions about market returns (7% for S&P 500)
- Doesn't account for things like tax benefits or rental income
- Uses a simplified comparison model
- Tax benefits (mortgage interest & property tax deductions)
- Rental income modeling
- Advanced market analysis (variable returns, historical data)
- Additional cost tracking (utilities, maintenance, PMI)
- Risk analysis and scenario modeling
- Visual reporting (graphs & charts)
- Support for different mortgage types (ARM, bi-weekly payments)
- Renovation ROI calculations
- Multiple property comparison
- Real estate market data integration
- Python 3.x
- Basic Python packages (numpy, pandas)
Feel free to contribute or suggest improvements!