A century of market returns, bundled into your browser
July 27, 2026
Most tools that promise historical backtesting put the data behind an API and your plan on their servers. retplan does the opposite: the history ships with the site. When the backtest replays your retirement through the Great Depression, it is reading a JavaScript array that arrived alongside the CSS.
The dataset
The backtest engine runs on a compact annual series covering 1928-2023: S&P 500 total returns, 10-year US Treasury total returns, and CPI inflation. These are the well-known published figures compiled by Aswath Damodaran and Robert Shiller - rounded, widely cross-checked, and close enough for rolling-window backtests without pretending to be accounting-grade. In the bundle it is nothing more exotic than this:
interface HistoricalYear {
year: number
stocks: number // S&P 500 total return, nominal
bonds: number // 10-year US Treasury total return, nominal
inflation: number // US CPI
}
// 1931, the worst year in the series:
{ year: 1931, stocks: -0.4384, bonds: -0.0256, inflation: -0.0932 }
Ninety-six years of markets compress to a few kilobytes - small enough that "download a century of history" is not even a noticeable part of the page load.
How a backtest runs
For a 30-year plan, the engine slides a 30-year window across the series - 1928 through 1957, then 1929 through 1958, and so on - which yields 67 rolling windows, each one a complete retirement lived through real history. Your accounts map onto the series with a deliberately simple, documented heuristic:
- Cash earns 60% of that year's bond return, floored at zero - roughly how a savings account trails the 10-year yield without ever going nominally negative.
- Low-volatility accounts (under 5%) earn the bond return.
- Everything else earns the stock return.
Each window's average CPI stands in for the scenario's inflation rate - a documented simplification (the engine takes one constant rate per run), traded for keeping every window comparable. The result is a survival rate, the worst starting year by ending balance, and the full spread of outcomes below the chart.
The same privacy shape holds everywhere in retplan: the market history tool bundles roughly a century of daily data - indexes, S&P sectors, gold, CPI - browsable and backtestable entirely offline. No API key, no account, no plan that ever leaves your device. History is not a forecast, but it is the cheapest reality check a plan can get - so it should not cost you your data.