A rent-versus-buy model you can audit line by line
A month-by-month household simulation that files full tax returns for every housing plan, sources every assumption, and shows how much the answer depends on each one.
"Should we rent or buy?" is usually answered with an online calculator that compares a mortgage payment to rent. That ignores almost everything that decides the answer: taxes on selling investments for the down payment, Cook County property tax, transfer taxes, what the renter does with the money they didn't spend, the cost of selling in seven years, and the chance that the market goes the wrong way. A wrong answer here is a six-figure mistake, and the calculator can't tell you how wrong it might be.
At a glance
| Client | Internal project: built to support a real home-buying decision in Chicago |
| Industry | Personal finance and real estate |
| What we built | A decision model that compares whole housing plans (condo now and upgrade later, rent now and buy later, a two-flat with a rental unit, rent forever) on after-tax net worth |
| Where AI fits | In the build, not the product. AI agents researched every tax rule and market figure against primary sources, and a second agent independently re-checked that research. The model itself is ordinary, inspectable Python. |
| Stack | A Python simulation engine with a browser dashboard that runs locally, plus analysis notebooks |
| Status | A sourced, auditable rent-versus-buy decision model |
The old way
- Plug a price, rate and rent into an online calculator.
- Compare one monthly payment to another.
- Guess at taxes, closing costs and appreciation, or leave them out.
- Get one number, with no sense of how fragile it is.
- Ask an advisor, who builds a fresh spreadsheet with a different set of guesses.
Nothing in that process says where an assumption came from, or which one actually decides the outcome.
What we built
The model simulates a household's complete finances month by month, under each housing plan. Every plan sees the same income, the same everyday spending and the same market path, so any difference in outcome comes only from the housing decision.
For each plan, it computes full federal and Illinois tax returns, Cook County and Chicago property and transfer taxes, mortgage and lending rules (including whether a lender would approve the loan), and the capital-gains tax triggered by selling investments for a down payment. It then runs the same comparison across thousands of simulated market paths.
Four questions come out the other side: which plan leaves the household wealthier, and when; what would have to be true for the answer to flip; how likely each outcome is; and how bad the downside gets.
How the workflow changes
| Step | Before | After |
|---|---|---|
| Framing the decision | Buy versus rent, one property | Whole multi-stage plans compared side by side, including when to buy and whether to keep the first home as a rental |
| Assumptions | Typed in from memory | Researched defaults, each with its source and a "verified" or "judgment" flag shown next to the input |
| Taxes | Ignored or rough | A full federal and Illinois return per plan, per year |
| Risk | One expected answer | Probability of each plan winning, a range of outcomes, and the bad-case result |
| Sensitivity | Change a cell and re-read | Tornado charts and break-even tables showing which assumption decides the answer |
| Searching options | Try a few by hand | A plan explorer that generates every combination of neighborhood, home type, timing and financing, and ranks them |
Inside the build
Every plan runs on the same income, spending and market path; only the housing choice differs.
Under the hood
- Every number has a source. No tax rate, limit or market figure was typed from memory. Each lives in a data file with its source and a
verifiedflag. Anything that is judgment rather than statute, such as forward-looking returns or maintenance rates, is marked as such and surfaced in the interface. - Research was checked twice. A second, independent research pass re-verified the statutory and market values against primary sources, and a separate audit compared 75 implemented tax rules against the statute. It found six bugs, all fixed.
- A hand-worked check, to the cent. A five-year scenario computed with plain arithmetic, outside the engine, matches the engine's results to the cent every year. It runs as a regression test.
- Built-in sanity laws. The test suite checks properties that must always hold: cash is conserved, higher rent never makes the buy plan worse, and with no frictions or taxes buying and renting tie exactly.
- Privacy by construction. Real household numbers live in a folder that can't be committed, enforced by a pre-commit hook and a test. The shipped example scenario is fictional.
By the numbers
As of October 2026:
- 145 commits.
- More than 1,400 test functions, about 2,400 test cases once parameterized.
- 75 implemented tax rules audited against the statute, with six bugs found and fixed.
- A hand-worked five-year check that matches the engine to the cent, every year.
Example scenario
Example scenario (illustrative): A fee-only financial planner has clients choosing between buying a two-flat and renting for three more years. Instead of a spreadsheet built for the meeting, the planner runs both plans through a sourced model. The meeting covers three things: which plan builds more wealth, the break-even appreciation rate at which the answer flips, and the chance the client is worse off after seven years. When the client asks "where does that property-tax number come from?", the answer is a link to the source.
What this means for your business
The reusable capability is an auditable decision model: a simulation where every assumption is sourced, every rule is tested, and the output shows how fragile the answer is. It fits:
- Wealth managers and financial planners who need defensible client recommendations
- Lenders and mortgage brokers explaining real affordability, not just a payment
- Real-estate investors and developers comparing hold, sell and refinance strategies
- Any team making a high-stakes decision from a spreadsheet nobody can audit
This model is a decision aid, not tax or financial advice.
Second Voyage builds AI systems that are held to a standard you can check. Talk to us about yours.