Notebooks
These are our notebooks: Jupyter notebooks you can run. Some are the computations behind an essay; others stand on their own. Each one takes a single question and works it through in code, from the data or the equations to the final number, with every figure and every output produced by its own cells. Download the .ipynb and run it on your own machine, or open its copy on Kaggle and run it there; before a notebook carries its Kaggle button, Kaggle's results are checked against the ones on this page. The stories are on the Essays, and the research papers live under Research.
1. Does Risk Grow With the Square Root of Time?
A runnable notebook. Banks scale a day's risk to ten days by the square root of ten. On a century of the US stock market the rule understated risk at every horizon from two days to 6.8 years, though only the shortest horizons are measured precisely; and the sign flipped around 2000: a week's variance ratio went from 1.152 to 0.859, and Basel's √10 now gives a ten-day loss larger than the market delivered.
2. How Often Should You Look at Your Portfolio?
A runnable notebook. Two investors have owned the same S&P 500 fund since 1928: one looks every day and sees a loss on 46% of days, the other once a year and sees one in 24.7% of years. Benartzi and Thaler's 1995 model, rebuilt with their parameters, prefers stocks to a 10-year bond from an evaluation period of 9 months (11 on their own years).
3. Has the Sahm Rule Ever Been Wrong?
A runnable notebook. In 2019 Claudia Sahm proposed an alarm for the start of a recession: the three-month average unemployment rate half a point above its low of the previous year. Rebuilt from 77 years of data, it rang in all twelve recessions, a median of three months after the peak, and twice with no recession near: in 2003 and in July 2024.
4. Three Numbers Move the Whole Yield Curve
A runnable notebook. In 1991 Litterman and Scheinkman found that three moves, level, steepness and curvature, drive the Treasury curve. On the Treasury's daily par curve from 1990 to 2026 the three still carry 96.2% of the daily changes, between 92.0% and 98.4% in every year. At zero rates the level became a long-end move, and a level-only hedge leaves a 10-year with 15% of its daily variance.
5. What Does a Kaggle Prize Pay?
A runnable notebook on Kaggle's own record, Meta Kaggle. An entry in a prize competition is a lottery ticket paid for in hours. Most Kaggle competitions pay no cash; across the 649 that did, the pot came to 48.62 dollars an entry and a team's chance of any prize was about 1 in 301. Against the days people submitted, the pot paid at most 2.03 dollars an hour.
6. Does a Nobel Formula Beat Dividing by N?
A runnable notebook. The Talmud says to divide your money in three; Markowitz's Nobel formula weighs means and covariances. On 1,000 random portfolios of 25 S&P 500 stocks the textbook formula was wiped out in 862 and its long-only form beat 1/N in 149. Fed hindsight, it more than doubles 1/N's Sharpe ratio; in closed form it needs 171 years of data to win.
7. The Bet Samuelson’s Colleague Refused
A runnable notebook. In 1963 Paul Samuelson told of a colleague who refused one coin toss paying 200 dollars against 100 but would take a hundred. Over 98 years of the S&P 500 with dividends, a daily look shows a loss 46% of the time, and a loss-averse investor (λ = 2.25) feels stocks as a gain only when the looks are at least 56 trading days apart.
8. Both Sides of the Policy Get Richer
A runnable notebook. In 1738 Daniel Bernoulli's merchant Caius faced an 800-ruble premium on a cargo whose expected loss was 500, and Bernoulli found that a merchant worth less than 5,043 rubles should buy it and an insurer worth more than 14,243 should sell it. Measured by growth over time instead of expected value, both sides of one policy get richer: in Peters and Adamou's shipowner example, any fee from 1.73% to 2.04% of the owner's wealth does it.
9. Is a Lottery Ticket Ever Worth Buying?
A runnable R notebook. From 2004 to 2012 the Massachusetts lottery game Cash WinFall had a roll-down rule that made a two-dollar ticket worth more than two dollars on 44 draws. The value of a ticket on those nights is one line, the fixed prizes plus the rolled-down jackpot divided by the tickets sold, and it reproduces the Inspector General's worked examples, including the MIT group's 700,000-dollar profit on its forced roll-down of August 2010.
10. 63% of Stocks Lost to the Average Stock
A runnable notebook. A dollar in each of 459 S&P 500 stocks for five years: the average stock turned $1 into $2.00, the median stock into $1.73, and 288 of the 459, 62.7%, finished below the average. Compounding alone does it, by an amount the lognormal formula Φ(s/2) predicts: 60.6%. Over one year the share is barely half; over five, almost two in three.
11. The Bold Play That Passes the Funded Challenge
A runnable notebook. A $50K futures evaluation asks for $3,000 of profit before a $2,000 trailing loss limit. For a trader with no edge, the maths caps the pass rate and says the bold beat the busy: replayed on three years of Nasdaq futures under the firm's own rules, trading all day passes at best one attempt in ten, while one bold bracket a day, sized to the rules, passes about one in four.
12. The Cellar That Is Warmest in Winter
A runnable notebook. The yearly temperature wave sinks into the ground, shrinking and running late: seven metres down in damp soil the seasons are reversed, warmest on 22 January. A Crank–Nicolson grid matches Fourier's exact solution to about a ten-thousandth of a degree, and two buried thermometers give the soil's diffusivity back within 0.2%, the way Kelvin read Forbes's Edinburgh thermometers.
13. The Noise That Looks Like Correlation
A runnable notebook. Two hundred independent assets still show correlations; the Marchenko–Pastur law says how wide the band of noise eigenvalues is, a planted market shows which eigenvalues rise above it, and a minimum-variance portfolio built on the raw matrix promises less risk than the best possible portfolio while delivering more, as the theory predicts. Updated with Ledoit–Wolf shrinkage against clipping, and an empirical noise band for 459 S&P 500 stocks.
14. The Jensen Gap at Grand Forks, 1997
A runnable notebook. From the Weather Service's own record of its spring outlooks, the 1997 forecast of 49 feet gave a one-in-four chance of topping the 52-foot dikes at Grand Forks, and an expected 0.67 foot of water over them where the forecast alone gave zero: Jensen's inequality, computed from one table.