Skip to content
SIAT PAPER 2026Open the research page
Cryptoverso

The labs and calculators from the book

Every figure and every number in “La matematica di chi perde” comes from code you can reopen, re-run and challenge. Here are the twenty-one labs and the eight calculators, numbered exactly as they are in the book.

A lab answers a question from the book with data and code; a calculator is a tool you re-run by changing its starting numbers.

29 runnable notebooks, 26 with the figure their code produces

From the book “La matematica di chi perde”

L01This notebook produces no figures

L01 — How many retail accounts close at a loss, and how long it takes

Lab 1 — Who really loses, and how much

Lab5 code cells · run on 2026-08-27

Open L01

How much you need to gain to break even, as the loss taken grows.

C01

C01 — How much you need to gain to recover a loss

Calculator 1 — How much it takes to recover from a loss

Calculator6 code cells · run on 2026-08-27

Open C01

How much you need to gain to cover costs alone, as trading frequency changes.

C02

C02 — Cumulative costs over a year of activity, as frequency varies

Calculator 2 — Costs, on your own numbers

Calculator5 code cells · run on 2026-08-27

Open C02

Twelve capital curves generated by chance alone, with no edge inside them.

L02

L02 — Equity curves generated by chance alone, and the finest among a thousand

Lab 2 — Chance dressed up as skill

Lab5 code cells · run on 2026-08-27

Open L02

Nine days of a collapse on a logarithmic scale: every tick is a factor of ten. The series stops on 13 May, where that ticker stops quoting the same token.

L03

L03 — Token mortality and survivorship bias

Lab 3 — The graveyard of tokens

Lab6 code cells · run on 2026-08-27

Open L03

The same price series and the same costs: only the two behavioural thresholds change.

L04

L04 — Loss aversion and the disposition effect, measured on your own numbers

Lab 4 — The measured cost of your reflexes

Lab6 code cells · run on 2026-08-27

Open L04

The same data seen as a price, as a daily change and as a distribution.

L05

L05 — Three views of the same data, and the real-versus-synthetic test

Lab 5 — Looking is not measuring

Lab6 code cells · run on 2026-08-27

Open L05

What actually happened and what the bell curve predicted, on the same scale.

L06

L06 — Fat tails, kurtosis and the twenty days that decide everything

Lab 6 — The lying average

Lab6 code cells · run on 2026-08-27

Open L06

How long you spend away from your own peak, rather than how far down you go.

C03

C03 — Time under the peak and position size compatible with your tolerance

Calculator 3 — Risk, measured in time

Calculator6 code cells · run on 2026-08-27

Open C03

The correlation between three series, and how it rises exactly in the hard stretches.

L07

L07 — Rolling-window correlations and how far they rise in crashes

Lab 7 — When diversification vanishes

Lab5 code cells · run on 2026-08-27

Open L07

How many independent directions it takes to describe three assets that look like three separate bets.

L08

L08 — Principal components and the effective number of bets

Lab 8 — How many things you're really buying

Lab6 code cells · run on 2026-08-27

Open L08

Volatility is not a number: it is a series that spends little time near its own average.

L09

L09 — Rolling volatility, regime persistence and the length of turbulent periods

Lab 9 — The market isn't always the same market

Lab7 code cells · run on 2026-08-27

Open L09

Adding ingredients improves the past and leaves the future untouched.

L10

L10 — More parameters, perfect and useless fits

Lab 10 — More parameters, less knowledge

Lab7 code cells · run on 2026-08-27

Open L10

How many observations it takes to tell an edge from chance, as the edge changes.

L11

L11 — How many observations it takes to tell an edge from chance

Lab 11 — How many observations you really need

Lab7 code cells · run on 2026-08-27

Open L11

The right yardstick: a thousand strategies that do the same things but pick their moments at random.

L12

L12 — An honest backtest line by line, and the generator of the yardstick

Lab 12 — An honest backtest, line by line

Lab6 code cells · run on 2026-08-27

Open L12

The same rule written twice: one looks at the day in progress, the other does not.

L13

L13 — Lookahead, invariance tests and the five checks on the data

Lab 13 — How a backtest lies: the data

Lab5 code cells · run on 2026-08-27

Open L13

Twenty ideas with no edge, and the one that passes the test anyway.

L14

L14 — Twenty strategies with no edge and the multiple-testing correction

Lab 14 — How a backtest lies: the method

Lab7 code cells · run on 2026-08-27

Open L14

The same parameter seen on the half that chose it and on the half that never saw it.

L15

L15 — Optimising a meaningless rule, in sample and out of sample

Lab 15 — Optimizing is fooling yourself

Lab6 code cells · run on 2026-08-27

Open L15

Six rules measured together, and not just the one that worked.

L16

L16 — Six textbook rules measured together, with the three checks

Lab 16 — Technical analysis, measured

Lab8 code cells · run on 2026-08-27

Open L16

The extremes of a move recognised by a rule declared before looking.

L17

L17 — The two coordinates of a move, and volume put to the test

Lab 17 — The two coordinates of a move

Lab8 code cells · run on 2026-08-27

Open L17

The other possible histories next to the one that happened, and the drawdowns each of them went through.

L18

L18 — A thousand paths instead of one, and the three numbers that decide

Lab 18 — A thousand futures instead of one

Lab6 code cells · run on 2026-08-27

Open L18

The same favourable bet, repeated 500 times, risking a different fraction each time.

C04

C04 — Optimal fraction, risk of ruin and overall risk

Calculator 4 — How much to risk

Calculator7 code cells · run on 2026-08-27

Open C04

A small probability repeated over years, and the cost of keeping everything in one place.

C05

C05 — Probability of a custody event and cost of concentration

Calculator 5 — The risk of keeping it all in one place

Calculator6 code cells · run on 2026-08-27

Open C05

Two identical people on the same tax rate: one pays every year, the other at the end.

C06

C06 — Tax friction, carried-forward losses and expired losses

Calculator 6 — Tax friction

Calculator5 code cells · run on 2026-08-27

Open C06

Where the history that happened falls among the two thousand that could have.

L19

L19 — The five tests to run on your own working environment

Lab 19 — The five tests for your tool

Lab7 code cells · run on 2026-08-27

Open L19

L20This notebook produces no figures

L20 — Random seed, vectorisation and reproducibility

Lab 20 — The basics you actually need

Lab7 code cells · run on 2026-08-27

Open L20

Two implementations of the same strategy, and the difference that is worth three thousand times.

L21

L21 — Two implementations of the same strategy: find the lookahead

Lab 21 — Find the lookahead

Lab8 code cells · run on 2026-08-27

Open L21

Where a claimed track record falls inside the distribution of twenty thousand attempts with no edge.

C07

C07 — The runnable Criterion: unanswered questions and the yardstick of chance

Calculator 7 — The Criterion, executable

Calculator6 code cells · run on 2026-08-27

Open C07

C08This notebook produces no figures

C08 — Generator for the written plan and the trade journal

Calculator 8 — Your plan, written down

Calculator8 code cells · run on 2026-08-27

Open C08

The two service pages