You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A top 0.1% investor always asks: "What if rent drops 5%? Vacancy hits 8%? Rates rise 100bps?" Currently prei shows a single-point analysis. No sensitivity modeling means investors can't stress-test deals.
Solution
Add a sensitivity analysis view for each property. Show a matrix table varying 3 inputs (rent, vacancy, interest rate) and showing resulting CoC, DSCR, and IRR for each combination.
Acceptance Criteria
Create core/services/sensitivity.py with run_sensitivity(property, base_values, scenarios) -> dict
Add view /properties/<pk>/sensitivity/ rendering the sensitivity matrix
Create templates/properties/sensitivity.html with a data table
Vary rent: -5%, 0%, +5% of base
Vary vacancy: 5%, 8%, 12%
Vary interest rate: base, +100bps, +200bps
Show CoC, DSCR, IRR for each of the 27 combinations (3x3x3)
Highlight scenarios where DSCR < 1.25 (red flag for lenders)
Add link from property detail view to sensitivity analysis
E2E test: navigate to sensitivity view, verify table renders with 27 rows
Unit tests for sensitivity calculation logic
Technical Notes
Base values come from the property's InvestmentAnalysis record
Use existing investor_app/finance/utils.py functions (noi, cap_rate, cash_on_cash, dscr, irr)
All calculations use Decimal (repo rule)
Table is server-rendered (no JS framework needed)
Color-code cells: green (good), yellow (marginal), red (fails DSCR)
Problem
A top 0.1% investor always asks: "What if rent drops 5%? Vacancy hits 8%? Rates rise 100bps?" Currently prei shows a single-point analysis. No sensitivity modeling means investors can't stress-test deals.
Solution
Add a sensitivity analysis view for each property. Show a matrix table varying 3 inputs (rent, vacancy, interest rate) and showing resulting CoC, DSCR, and IRR for each combination.
Acceptance Criteria
core/services/sensitivity.pywithrun_sensitivity(property, base_values, scenarios) -> dict/properties/<pk>/sensitivity/rendering the sensitivity matrixtemplates/properties/sensitivity.htmlwith a data tableTechnical Notes
investor_app/finance/utils.pyfunctions (noi, cap_rate, cash_on_cash, dscr, irr)Decimal(repo rule)Implementation Guide (for opencode/mimo v2.5)
core/services/sensitivity.py— generate scenario combinations, call finance functionssensitivity_viewtocore/views/__init__.pyproperties/<int:pk>/sensitivity/templates/properties/sensitivity.html— table with conditional CSS classestests/test_sensitivity.pyDependencies