Show HN: Rent vs. buy, backtested across 241 US metros with pinned data

newroots1 pts0 comments

GitHub - assumptionsshown/RunTheNumbers · GitHub

/" data-turbo-transient="true" />

Skip to content

Search/

Sign in<br>Sign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

assumptionsshown

RunTheNumbers

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>8 Commits<br>8 Commits

data/snapshots

data/snapshots

episodes

episodes

render

render

src/RunTheNumbers.Sim

src/RunTheNumbers.Sim

tools

tools

.gitignore

.gitignore

LICENSE

LICENSE

README.md

README.md

View all files

Repository files navigation

The Assumption Panel

Code and data behind the videos.

Every personal finance argument, settled with data. Assumptions on screen, code<br>public. If you think one of the assumptions is wrong, change it and re-run it. That<br>is what this repository is for.

Why this exists

Most finance content asks you to trust the person saying it. This channel is<br>anonymous, so that is not on offer. What is on offer instead is that every number<br>in every video can be reproduced from this repository, from a dataset pinned by<br>date and hash, using code you can read.

Don't trust it. Re-run it.

Episodes

Question<br>Video<br>Data

Lump sum or spread it out?<br>Lump Sum vs DCA: I Tested All 1,855 Months Since 1871<br>episodes/ep01-lumpsum-vs-dca/results.json

What does a 1% fee actually cost, and is it ever worth it?<br>Paying 1% Costs More Than Panic Selling Every Crash for 30 Years<br>episodes/ep02-fees/results.json

What if you only ever bought at the market top?<br>I Only Ever Bought at the Market Top. It Cost 10%.<br>episodes/ep03-buying-at-the-top/results.json

Which numbers flip rent versus buy?<br>Rent vs Buy: One Assumption Flipped 82% to 31%<br>episodes/ep04-rent-vs-buy/results.json

Reproducing the episodes

Requires Node.js 22 or newer and the<br>.NET SDK 9 or newer. Nothing else. There<br>are no npm packages to install, on purpose: asking you to verify a result should<br>not also mean asking you to trust a dependency tree.

# Rebuild the pinned dataset from source (optional, it is already committed)<br>node tools/build-shiller-snapshot.mjs

# Check the dataset against an independent source<br>node tools/validate-shiller.mjs data/snapshots/shiller-2026-07-26

# Run the simulation<br>dotnet run --project src/RunTheNumbers.Sim -- \<br>data/snapshots/shiller-2026-07-26 \<br>episodes/ep01-lumpsum-vs-dca/results.json

# Episode 2<br>dotnet run --project src/RunTheNumbers.Sim -- \<br>data/snapshots/shiller-2026-07-26 \<br>episodes/ep02-fees/results.json \<br>--episode ep02

# Episode 3<br>dotnet run --project src/RunTheNumbers.Sim -- \<br>data/snapshots/shiller-2026-07-26 \<br>episodes/ep03-buying-at-the-top/results.json \<br>--episode ep03

# Episode 4<br>dotnet run --project src/RunTheNumbers.Sim -- \<br>data/snapshots/shiller-2026-07-26 \<br>episodes/ep04-rent-vs-buy/results.json \<br>--episode ep04

# Independently reproduce and compare all episode 4 result fields<br>node tools/validate-ep04.mjs

results.json holds every number that appears on screen. The slides read from it<br>directly, so nothing in a video is typed by hand.

To see the slides:

node tools/serve.mjs 5173

then open http://localhost:5173/render/ep01.html, render/ep02.html,<br>render/ep03.html, or render/ep04.html.

The result

Investing a lump sum immediately beat spreading it over 12 months in 67.2% of<br>1,855 starting months since 1871.

Three findings that matter more than the headline:

The holding period is irrelevant. After the final purchase both portfolios<br>own the same asset, so the outcome is fixed then and never changes. Measured<br>drift across every horizon tested: 2.2e-16, which is floating-point rounding.

The drip's better worst case is real but short-lived. It shows at one and two<br>years and cannot be distinguished from noise past three, while its cost is<br>charged at every horizon.

In two of the eight worst starting months on record, the drip made the outcome<br>worse. Both were 1998, the two highest starting valuations in that group.

Assumptions

These decide the answer. Change any of them and the number changes.

Real (inflation-adjusted) total return, dividends reinvested

Base case: idle cash holds its real value (0% real). Deliberately the generous<br>assumption for DCA, and a fair long-run stand-in for T-bills

Sensitivity: idle cash earns 0% nominal, so it erodes with inflation. The lump<br>sum then wins 72.0% instead of 67.2%, so the answer does not hinge on this choice

No taxes, no transaction costs, no fund fees

US large-cap index only (S&P Composite)

The holding period is measured from the month of the final purchase

Data

Robert Shiller's monthly US stock market dataset, 1871-01 to 2026-06, from<br>shillerdata.com.

Two...

data episodes results json runthenumbers shiller

Related Articles