Under the hood: how the simulator computes this book

Every chapter of this book leans on pofo's FIRE simulator. The last article returns the favor: here is what the machine computes, with no black box left in it. Where its data comes from (the backfilled histories, the century-long panel, the living CAPE). How the central model gets built, from your own holdings to parameters fitted and then blended. What each column of the results table draws on, in a technical rundown of the six lenses. How the simulation core runs a plan month by month: spending rules, the tax that grosses up every sale, the buffer and its thresholds, the flows. And what each section of the page computes. Then, in the spirit of the whole book, the limits, owned up to. A tool whose simplifications you cannot see is an oracle, and this book has said enough against oracles (Simulator traps: independence, US bias, survivorship, Monte Carlo: strengths, weaknesses, and how to use it well). This is also the most version-dependent chapter in the book, because the machine keeps changing. The page's own "How this machine works" panel is the authority on its exact state on any given day (Using the FIRE simulator).

The data: what the machine knows about the world§

The long history of your funds. In portfolio mode, pofo extends every holding back beyond its quoted history. The SIM extensions splice on documented backcasts: long indices, reconstructed composites. Each recipe is calibrated and versioned. Managed futures, to take one, are a vol-targeted TSMOM backcast (Managed futures and trend following: the diversification that works in a crisis). Everything is then converted into euros and deflated by the HICP (^HICP-FR). What comes out is a matrix of monthly real returns for your holdings, decades deep.

A century across sixteen countries. The broad-sample model carries the Jorda-Schularick-Taylor academic panel (annual real stock and bond returns for 16 developed countries, 1870 to 2020): the raw material for replaying national fates (Beyond the United States: Anarkulova, Cederburg and the world sample).

A living CAPE. Shiller's series (1881 to today) is kept current. §00 of the simulator and the CAPE anchor both feed on it (Valuations, the CAPE, and what they say about your withdrawal rate).

The central model's pipeline§

Five steps run from your holdings to the central Student-t model (Making a Monte Carlo relevant: blending, regimes, stress argues each one).

  1. The monthly real panel, at the weights your holding sliders sit at right now.
  2. The fit. The machine computes μ (the realized mean, annualized), σ (the monthly dispersion scaled to a year) and df (the inverse of the monthly kurtosis, so the tails of your funds, Fat tails, crises, and the Student-t). Computed that way, σ lands below the annualized daily volatility the brochures quote.
  3. Blending. The fitted parameters are pulled toward a cautious world prior (μ 4.5%, σ 13%, df 4), in proportion to the share of the horizon your history does not cover, and never past 50/50. Your portfolio reaches the central model through its statistics, never through its sequence.
  4. The optional anchors. The CAPE anchor replaces the mean with what today's valuations imply; the broad-sample prior overwrites all three dials.
  5. The draw. Independent Student-t years are drawn and then compounded, so volatility drag falls out on its own (Arithmetic mean, geometric mean, and volatility drag).

The six columns, exactly what each one does (Historical windows, bootstrap, parametric: the three families of models for how to read them):

The core: a plan run month by month§

Every simulated path is exact accounting (Monte Carlo: strengths, weaknesses, and how to use it well). At each time step, a year by default and a month when monthly withdrawals are switched on, the core does four things, in this order.

  1. The return for the period is applied to the sleeves.
  2. The need for the period is set by whichever rule is active, then reduced by the flows arriving at that date (the pension from its start year, side income until its end year, an annuity if part of the capital was converted). Each rule has its own formula: the fixed inflation-adjusted rule serves the same real need every year; the flexible cut bites when drawdown crosses its threshold; guardrails move spending by plus or minus 10% at the edges of the corridor, with their floor; VPW takes a share of the current portfolio; ABW reprices the annuity on wealth plus discounted pensions; the bounded rule follows the Vanguard corridor; the ratchet and the retirement smile ride on top of whatever comes out (Withdrawal strategies: the map before the territory).
  3. The source of the withdrawal is picked. The buffer pays first when drawdown is past its threshold (10% by default), the sleeves otherwise. The buffer then refills gradually as calm returns, never above its ceiling, and stops refilling in the year you chose (Drawing on a buffer and refilling it: the rules that work: the mechanics described there are literally the ones in the code).
  4. Tax is applied. Every sale is grossed up so the net lands where it should: the rate on the dial hits the gain share of the sale. That share starts low and drifts up as unrealized gains compound, which is how a weighted-average cost basis behaves. Optional tax wrappers, each with its own rate and its own place in the selling order, refine how the sales are spread.

Ruin is recorded when the money runs out, with its date. Everything else is recorded too: wealth, the spending delivered, time spent underwater. The machine draws 2,000 paths by default, and the dial goes to 10,000.

The sections: what each one computes§

A quick tour, with the reading advice for each one in the manual (Using the FIRE simulator).

Checking it yourself§

There are three ways to audit the machine. The engine is Go code you can read: in the pofo repository, the models, the withdrawal rules and the backcast recipes are all legible and all tested, and the golden tests compare the computations against frozen external references. The book's headline results reproduce there in a few minutes. A SAFEMAX near 4% over 30 years falls out of the historical windows; the Trinity cliff appears when you sweep the withdrawal rate; what a bad sequence costs shows up as the gap between the central case and the stress column; the pension effect shows up the moment you move its dial. The matching chapters give the recipe each time. And disagreements with other tools are explained by the audit checklist: tails, memory, frictions, sample (Simulator traps: independence, US bias, survivorship). This simulator ticks boxes that most consumer tools leave empty, and it shows the ones it leaves empty itself. That is the final test to apply to any tool, this one included. The question is not "is it right?", because nobody is right about 45 years, but "do we know what it does, and does it say so?".

The essentials§


Going further§