bet-sizinglisted
Install: claude install-skill howard-lynn-ye/fin-skills
# Bet sizing
**A probability is not a position, and the four steps between them each cost something
measurable.** Advances in Financial Machine Learning (Lopez de Prado 2018), chapter 10. The size
curve, the averaging of concurrent bets, the discretisation, and the leverage budget — all four
are usually written in one line each, and three of them are usually wrong.
Every number below is printed by `scripts/bet_sizing.py` (numpy + scipy, seed 0, **2.8 s**).
⚠️ **This chapter is the one place in this plugin with no runnable reference implementation.**
mlfinpy 0.1.2 ships no bet-sizing module (its packages are `labeling`, `sample_weights`,
`sampling`, `filters`, `structural_breaks`, `cross_validation`, `ensemble`, `data_structure`,
`util`, `dataset`), and 🔴 `mlfinlab` is not installable — ✅ checked 2026-09-09: the PyPI JSON API
returns 404 and the simple index lists zero distribution files. The formulas below are transcribed
from the published snippets; what is **measured** is every property they should have.
## 1. The size curve is not `2p - 1`
```
z = (p - 1/n_classes) / sqrt(p (1 - p)) m = 2 * Phi(z) - 1 signal = side * m
```
⚠️ AFML Snippet 10.1 (page 142), `getSignal` / `getBetSize`. ✅ Measured against the obvious
alternative:
| p | z | **m = 2Φ(z)-1** | 2p - 1 | m / (2p-1) |
|---|---|---|---|---|
| 0.50 | 0.000 | **0.0000** | 0.00 | — |
| 0.55 | 0.101 | 0.0801 | 0.10 | **0.801** |
| 0.60 | 0.204 | 0.1617 | 0.20 | 0.809 |
| 0.70 | 0.436 | 0.3375 | 0.40