Skip to content
SIAT PAPER 2026 — Open 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. The notebooks of the preview chapters open without an account; the others are for readers who have the volume, with a personal code.

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, 4 in preview

From the book “La matematica di chi perde”

The table notebook L01 prints when you run it

L01

Preview

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-09-29

Open L01

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

C01

Preview

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-09-29

Open C01

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

C02

Preview

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

Calculator 2 — Costs, on your own numbers

Calculator5 code cells · run on 2026-09-29

Open C02

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

L02

Preview

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-09-29

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

With the volume

L03 — Token mortality and survivorship bias

Lab 3 — The graveyard of tokens

Lab6 code cells · run on 2026-09-29

Open L03

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

L04

With the volume

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-09-29

Open L04

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

L05

With the volume

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-09-29

Open L05

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

L06

With the volume

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

Lab 6 — The lying average

Lab6 code cells · run on 2026-09-29

Open L06

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

C03

With the volume

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

Calculator 3 — Risk, measured in time

Calculator6 code cells · run on 2026-09-29

Open C03

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

L07

With the volume

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

Lab 7 — When diversification vanishes

Lab5 code cells · run on 2026-09-29

Open L07

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

L08

With the volume

L08 — Principal components and the effective number of bets

Lab 8 — How many things you're really buying

Lab6 code cells · run on 2026-09-29

Open L08

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

L09

With the volume

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-09-29

Open L09

Adding ingredients improves the past and leaves the future untouched.

L10

With the volume

L10 — More parameters, perfect and useless fits

Lab 10 — More parameters, less knowledge

Lab7 code cells · run on 2026-09-29

Open L10

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

L11

With the volume

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-09-29

Open L11

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

L12

With the volume

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-09-29

Open L12

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

L13

With the volume

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-09-29

Open L13

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

L14

With the volume

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-09-29

Open L14

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

L15

With the volume

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

Lab 15 — Optimizing is fooling yourself

Lab6 code cells · run on 2026-09-29

Open L15

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

L16

With the volume

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

Lab 16 — Technical analysis, measured

Lab8 code cells · run on 2026-09-29

Open L16

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

L17

With the volume

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-09-29

Open L17

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

L18

With the volume

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-09-29

Open L18

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

C04

With the volume

C04 — Optimal fraction, risk of ruin and overall risk

Calculator 4 — How much to risk

Calculator7 code cells · run on 2026-09-29

Open C04

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

C05

With the volume

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-09-29

Open C05

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

C06

With the volume

C06 — Tax friction, carried-forward losses and losses left without a positive year

Calculator 6 — Tax friction

Calculator5 code cells · run on 2026-09-29

Open C06

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

L19

With the volume

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-09-29

Open L19

The table notebook L20 prints when you run it

L20

With the volume

L20 — Random seed, vectorisation and reproducibility

Lab 20 — The basics you actually need

Lab7 code cells · run on 2026-09-29

Open L20

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

L21

With the volume

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

Lab 21 — Find the lookahead

Lab8 code cells · run on 2026-09-29

Open L21

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

C07

With the volume

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

Calculator 7 — The Criterion, executable

Calculator6 code cells · run on 2026-09-29

Open C07

The table notebook C08 prints when you run it

C08

With the volume

C08 — Generator for the written plan and the trade journal

Calculator 8 — Your plan, written down

Calculator8 code cells · run on 2026-09-29

Open C08

The cycles series

The two service pages