Bet Sizes
Calculate López de Prado’s bet size for meta-labelled bets: how much of the budget to put on each date, from -1 (fully short) to 1 (fully long).
It follows from the sides of the bets a primary model takes and, for the probability bet size, how often its bets have paid off. A model that only says which side to take does not say how much to bet; sizing the bets keeps a strategy from betting the same on a weak signal as on a strong one.
- Budget bet size: the open long bets as a share of the most long bets ever open, minus the same share of the short bets, a size that spreads the budget over the bets the strategy usually has open.
- Reserve bet size: the net number of open bets (long minus short) against how many the strategy usually has open, through a mixture of two normal distributions fitted to it with the EF3M algorithm (López de Prado and Foreman, 2014). An unusually large net count gives a bet close to 1 and a usual one a small bet, keeping a reserve for stronger signals.
- Probability bet size: every bet sized by the probability that it pays off, taken as the hit rate of the bets closed before it was placed (the share whose meta-label is 1), and the sizes averaged over the bets still open. A hit rate of 50% or less gives no bet.
The formula is as follows, per method:
- Long Bets_t and Short Bets_t, the bets open on t: placed on or before t and closing after t,
Holding Periodperiods after they were placed
Where N is the standard normal distribution function. The bets come from the meta-labels: the Side is the side of a bet, the Holding Period the periods until it closes at a barrier and the Label (1 or 0) whether it made money.
Also known as: bet sizing, position sizing from meta-labels, budget bet size, reserve bet size, EF3M, bet size from predicted probabilities.
Example · AAPL, MSFT · 2024 to 2025
Install the Finance Toolkit with pip install financetoolkit -U, then call get_bet_sizes:
from financetoolkit import Toolkit
toolkit = Toolkit(
["AAPL", "MSFT"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2024-01-01",
end_date="2025-12-31",
)
bet_sizes = toolkit.technicals.get_bet_sizes(method="reserve")
bet_sizes.xs("AAPL", level=1, axis="columns")
Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:
How large a position did the reserve method of bet sizing take in Apple on each day of 2025?
Which returns:
| Date | Long Bets | Short Bets | Bet Size |
|---|---|---|---|
| 2024-01-02 | 0 | 1 | -0.5340 |
| 2024-01-03 | 0 | 1 | -0.5340 |
| 2024-01-04 | 0 | 1 | -0.5340 |
| 2024-01-05 | 0 | 1 | -0.5340 |
| 2024-01-08 | 1 | 0 | 0.5067 |
| 2024-01-09 | 1 | 0 | 0.5067 |
| 2024-01-10 | 1 | 0 | 0.5067 |
| 2024-01-11 | 1 | 0 | 0.5067 |
| 2024-01-12 | 1 | 0 | 0.5067 |
| 2024-01-16 | 1 | 1 | 0.0000 |
| 2024-01-17 | 0 | 1 | -0.5340 |
| 2024-01-18 | 1 | 0 | 0.5067 |
| 2024-01-19 | 1 | 0 | 0.5067 |
| 2024-01-22 | 1 | 0 | 0.5067 |
| 2024-01-23 | 1 | 0 | 0.5067 |
| 2024-01-24 | 1 | 0 | 0.5067 |
| 2024-01-25 | 1 | 0 | 0.5067 |
| 2024-01-26 | 0 | 1 | -0.5340 |
| 2024-01-29 | 0 | 1 | -0.5340 |
| 2024-01-30 | 0 | 1 | -0.5340 |
| 2024-01-31 | 0 | 1 | -0.5340 |
| 2024-02-01 | 1 | 0 | 0.5067 |
| 2024-02-02 | 1 | 0 | 0.5067 |
| 2024-02-05 | 1 | 0 | 0.5067 |
| 2024-02-06 | 1 | 0 | 0.5067 |
| 2024-02-07 | 1 | 0 | 0.5067 |
| 2024-02-08 | 1 | 0 | 0.5067 |
| 2024-02-09 | 1 | 0 | 0.5067 |
| 2024-02-12 | 1 | 0 | 0.5067 |
| 2024-02-13 | 0 | 1 | -0.5340 |
| 2024-02-14 | 0 | 1 | -0.5340 |
| 2024-02-15 | 0 | 1 | -0.5340 |
| 2024-02-16 | 0 | 1 | -0.5340 |
| 2024-02-20 | 0 | 1 | -0.5340 |
| 2024-02-21 | 0 | 1 | -0.5340 |
| 2024-02-22 | 1 | 1 | 0.0000 |
| 2024-02-23 | 1 | 1 | 0.0000 |
| 2024-02-26 | 0 | 2 | -0.9845 |
| 2024-02-27 | 0 | 2 | -0.9845 |
| 2024-02-28 | 0 | 2 | -0.9845 |
| 2024-02-29 | 0 | 2 | -0.9845 |
| 2024-03-01 | 0 | 2 | -0.9845 |
| 2024-03-04 | 0 | 1 | -0.5340 |
| 2024-03-05 | 0 | 1 | -0.5340 |
| 2024-03-06 | 0 | 1 | -0.5340 |
| 2024-03-07 | 0 | 1 | -0.5340 |
| 2024-03-08 | 0 | 1 | -0.5340 |
| 2024-03-11 | 1 | 0 | 0.5067 |
| 2024-03-12 | 1 | 0 | 0.5067 |
| 2024-03-13 | 1 | 1 | 0.0000 |
| 2024-03-14 | 1 | 1 | 0.0000 |
| 2024-03-15 | 1 | 1 | 0.0000 |
| 2024-03-18 | 2 | 0 | 0.9729 |
| 2024-03-19 | 1 | 0 | 0.5067 |
| 2024-03-20 | 1 | 0 | 0.5067 |
| 2024-03-21 | 0 | 1 | -0.5340 |
| 2024-03-22 | 0 | 1 | -0.5340 |
| 2024-03-25 | 0 | 1 | -0.5340 |
| 2024-03-26 | 0 | 2 | -0.9845 |
| 2024-03-27 | 1 | 1 | 0.0000 |
| 2024-03-28 | 1 | 1 | 0.0000 |
| 2024-04-01 | 0 | 2 | -0.9845 |
| 2024-04-02 | 0 | 1 | -0.5340 |
| 2024-04-03 | 0 | 1 | -0.5340 |
| 2024-04-04 | 0 | 1 | -0.5340 |
| 2024-04-05 | 0 | 1 | -0.5340 |
| 2024-04-08 | 0 | 1 | -0.5340 |
| 2024-04-09 | 0 | 1 | -0.5340 |
| 2024-04-10 | 0 | 1 | -0.5340 |
| 2024-04-11 | 1 | 0 | 0.5067 |
| 2024-04-12 | 1 | 0 | 0.5067 |
| 2024-04-15 | 1 | 1 | 0.0000 |
| 2024-04-16 | 0 | 1 | -0.5340 |
| 2024-04-17 | 0 | 1 | -0.5340 |
| 2024-04-18 | 0 | 1 | -0.5340 |
| 2024-04-19 | 0 | 1 | -0.5340 |
| 2024-04-22 | 0 | 1 | -0.5340 |
| 2024-04-23 | 0 | 1 | -0.5340 |
| 2024-04-24 | 1 | 1 | 0.0000 |
| 2024-04-25 | 1 | 0 | 0.5067 |
| 2024-04-26 | 1 | 0 | 0.5067 |
| 2024-04-29 | 1 | 0 | 0.5067 |
| 2024-04-30 | 0 | 1 | -0.5340 |
| 2024-05-01 | 0 | 1 | -0.5340 |
| 2024-05-02 | 1 | 0 | 0.5067 |
| 2024-05-03 | 1 | 0 | 0.5067 |
| 2024-05-06 | 1 | 0 | 0.5067 |
| 2024-05-07 | 1 | 0 | 0.5067 |
| 2024-05-08 | 1 | 0 | 0.5067 |
| 2024-05-09 | 2 | 0 | 0.9729 |
| 2024-05-10 | 2 | 0 | 0.9729 |
| 2024-05-13 | 2 | 0 | 0.9729 |
| 2024-05-14 | 1 | 0 | 0.5067 |
| 2024-05-15 | 1 | 0 | 0.5067 |
| 2024-05-16 | 1 | 0 | 0.5067 |
| 2024-05-17 | 1 | 0 | 0.5067 |
| 2024-05-20 | 1 | 0 | 0.5067 |
| 2024-05-21 | 1 | 0 | 0.5067 |
| 2024-05-22 | 1 | 0 | 0.5067 |
| 2024-05-23 | 1 | 1 | 0.0000 |
| 2024-05-24 | 2 | 0 | 0.9729 |
| 2024-05-28 | 2 | 0 | 0.9729 |
| 2024-05-29 | 2 | 0 | 0.9729 |
| 2024-05-30 | 1 | 0 | 0.5067 |
| 2024-05-31 | 1 | 0 | 0.5067 |
| 2024-06-03 | 1 | 0 | 0.5067 |
| 2024-06-04 | 1 | 0 | 0.5067 |
| 2024-06-05 | 1 | 0 | 0.5067 |
| 2024-06-06 | 1 | 0 | 0.5067 |
| 2024-06-07 | 1 | 0 | 0.5067 |
| 2024-06-10 | 0 | 1 | -0.5340 |
| 2024-06-11 | 1 | 0 | 0.5067 |
| 2024-06-12 | 1 | 0 | 0.5067 |
| 2024-06-13 | 1 | 0 | 0.5067 |
| 2024-06-14 | 1 | 0 | 0.5067 |
| 2024-06-17 | 2 | 0 | 0.9729 |
| 2024-06-18 | 2 | 0 | 0.9729 |
| 2024-06-20 | 1 | 1 | 0.0000 |
| 2024-06-21 | 0 | 1 | -0.5340 |
| 2024-06-24 | 0 | 1 | -0.5340 |
| 2024-06-25 | 0 | 1 | -0.5340 |
| 2024-06-26 | 1 | 0 | 0.5067 |
| 2024-06-27 | 1 | 0 | 0.5067 |
| 2024-06-28 | 1 | 0 | 0.5067 |
| 2024-07-01 | 2 | 0 | 0.9729 |
| 2024-07-02 | 1 | 0 | 0.5067 |
| 2024-07-03 | 1 | 0 | 0.5067 |
| 2024-07-05 | 1 | 0 | 0.5067 |
| 2024-07-08 | 1 | 0 | 0.5067 |
| 2024-07-09 | 1 | 0 | 0.5067 |
| 2024-07-10 | 1 | 0 | 0.5067 |
| 2024-07-11 | 0 | 1 | -0.5340 |
| 2024-07-12 | 0 | 1 | -0.5340 |
| 2024-07-15 | 1 | 0 | 0.5067 |
| 2024-07-16 | 1 | 0 | 0.5067 |
| 2024-07-17 | 0 | 1 | -0.5340 |
| 2024-07-18 | 0 | 1 | -0.5340 |
| 2024-07-19 | 0 | 1 | -0.5340 |
| 2024-07-22 | 0 | 1 | -0.5340 |
| 2024-07-23 | 0 | 1 | -0.5340 |
| 2024-07-24 | 0 | 1 | -0.5340 |
| 2024-07-25 | 0 | 1 | -0.5340 |
| 2024-07-26 | 0 | 1 | -0.5340 |
| 2024-07-29 | 0 | 1 | -0.5340 |
| 2024-07-30 | 0 | 1 | -0.5340 |
| 2024-07-31 | 1 | 1 | 0.0000 |
| 2024-08-01 | 0 | 2 | -0.9845 |
| 2024-08-02 | 0 | 2 | -0.9845 |
| 2024-08-05 | 0 | 1 | -0.5340 |
| 2024-08-06 | 0 | 1 | -0.5340 |
| 2024-08-07 | 0 | 1 | -0.5340 |
| 2024-08-08 | 1 | 0 | 0.5067 |
| 2024-08-09 | 1 | 0 | 0.5067 |
| 2024-08-12 | 1 | 0 | 0.5067 |
| 2024-08-13 | 1 | 0 | 0.5067 |
| 2024-08-14 | 1 | 0 | 0.5067 |
| 2024-08-15 | 1 | 0 | 0.5067 |
| 2024-08-16 | 1 | 0 | 0.5067 |
| 2024-08-19 | 1 | 0 | 0.5067 |
| 2024-08-20 | 1 | 0 | 0.5067 |
| 2024-08-21 | 1 | 0 | 0.5067 |
| 2024-08-22 | 1 | 0 | 0.5067 |
| 2024-08-23 | 1 | 0 | 0.5067 |
| 2024-08-26 | 1 | 0 | 0.5067 |
| 2024-08-27 | 2 | 0 | 0.9729 |
| 2024-08-28 | 2 | 0 | 0.9729 |
| 2024-08-29 | 1 | 0 | 0.5067 |
| 2024-08-30 | 1 | 0 | 0.5067 |
| 2024-09-03 | 0 | 1 | -0.5340 |
| 2024-09-04 | 0 | 1 | -0.5340 |
| 2024-09-05 | 0 | 1 | -0.5340 |
| 2024-09-06 | 0 | 1 | -0.5340 |
| 2024-09-09 | 0 | 1 | -0.5340 |
| 2024-09-10 | 0 | 1 | -0.5340 |
| 2024-09-11 | 0 | 1 | -0.5340 |
| 2024-09-12 | 0 | 1 | -0.5340 |
| 2024-09-13 | 0 | 1 | -0.5340 |
| 2024-09-16 | 0 | 1 | -0.5340 |
| 2024-09-17 | 0 | 1 | -0.5340 |
| 2024-09-18 | 1 | 0 | 0.5067 |
| 2024-09-19 | 1 | 0 | 0.5067 |
| 2024-09-20 | 1 | 0 | 0.5067 |
| 2024-09-23 | 1 | 0 | 0.5067 |
| 2024-09-24 | 1 | 0 | 0.5067 |
| 2024-09-25 | 1 | 0 | 0.5067 |
| 2024-09-26 | 1 | 0 | 0.5067 |
| 2024-09-27 | 1 | 0 | 0.5067 |
| 2024-09-30 | 1 | 0 | 0.5067 |
| 2024-10-01 | 0 | 1 | -0.5340 |
| 2024-10-02 | 0 | 1 | -0.5340 |
| 2024-10-03 | 0 | 1 | -0.5340 |
| 2024-10-04 | 0 | 1 | -0.5340 |
| 2024-10-07 | 0 | 1 | -0.5340 |
| 2024-10-08 | 1 | 0 | 0.5067 |
| 2024-10-09 | 1 | 0 | 0.5067 |
| 2024-10-10 | 1 | 0 | 0.5067 |
| 2024-10-11 | 1 | 0 | 0.5067 |
| 2024-10-14 | 2 | 0 | 0.9729 |
| 2024-10-15 | 1 | 0 | 0.5067 |
| 2024-10-16 | 1 | 0 | 0.5067 |
| 2024-10-17 | 1 | 0 | 0.5067 |
| 2024-10-18 | 1 | 0 | 0.5067 |
| 2024-10-21 | 1 | 0 | 0.5067 |
| 2024-10-22 | 1 | 0 | 0.5067 |
| 2024-10-23 | 0 | 1 | -0.5340 |
| 2024-10-24 | 0 | 1 | -0.5340 |
| 2024-10-25 | 0 | 1 | -0.5340 |
| 2024-10-28 | 0 | 1 | -0.5340 |
| 2024-10-29 | 0 | 1 | -0.5340 |
| 2024-10-30 | 0 | 2 | -0.9845 |
| 2024-10-31 | 0 | 1 | -0.5340 |
| 2024-11-01 | 0 | 1 | -0.5340 |
| 2024-11-04 | 0 | 1 | -0.5340 |
| 2024-11-05 | 0 | 1 | -0.5340 |
| 2024-11-06 | 0 | 1 | -0.5340 |
| 2024-11-07 | 1 | 0 | 0.5067 |
| 2024-11-08 | 1 | 0 | 0.5067 |
| 2024-11-11 | 1 | 0 | 0.5067 |
| 2024-11-12 | 1 | 0 | 0.5067 |
| 2024-11-13 | 1 | 0 | 0.5067 |
| 2024-11-14 | 2 | 0 | 0.9729 |
| 2024-11-15 | 1 | 1 | 0.0000 |
| 2024-11-18 | 1 | 1 | 0.0000 |
| 2024-11-19 | 2 | 0 | 0.9729 |
| 2024-11-20 | 2 | 0 | 0.9729 |
| 2024-11-21 | 1 | 0 | 0.5067 |
| 2024-11-22 | 1 | 0 | 0.5067 |
| 2024-11-25 | 1 | 0 | 0.5067 |
| 2024-11-26 | 1 | 0 | 0.5067 |
| 2024-11-27 | 1 | 0 | 0.5067 |
| 2024-11-29 | 1 | 0 | 0.5067 |
| 2024-12-02 | 1 | 0 | 0.5067 |
| 2024-12-03 | 1 | 0 | 0.5067 |
| 2024-12-04 | 1 | 0 | 0.5067 |
| 2024-12-05 | 1 | 0 | 0.5067 |
| 2024-12-06 | 1 | 0 | 0.5067 |
| 2024-12-09 | 1 | 0 | 0.5067 |
| 2024-12-10 | 1 | 0 | 0.5067 |
| 2024-12-11 | 1 | 0 | 0.5067 |
| 2024-12-12 | 1 | 0 | 0.5067 |
| 2024-12-13 | 1 | 0 | 0.5067 |
| 2024-12-16 | 1 | 0 | 0.5067 |
| 2024-12-17 | 1 | 0 | 0.5067 |
| 2024-12-18 | 0 | 1 | -0.5340 |
| 2024-12-19 | 0 | 1 | -0.5340 |
| 2024-12-20 | 1 | 0 | 0.5067 |
| 2024-12-23 | 1 | 0 | 0.5067 |
| 2024-12-24 | 1 | 0 | 0.5067 |
| 2024-12-26 | 1 | 0 | 0.5067 |
| 2024-12-27 | 1 | 1 | 0.0000 |
| 2024-12-30 | 0 | 1 | -0.5340 |
| 2024-12-31 | 0 | 1 | -0.5340 |
| 2025-01-02 | 0 | 1 | -0.5340 |
| 2025-01-03 | 0 | 1 | -0.5340 |
| 2025-01-06 | 0 | 1 | -0.5340 |
| 2025-01-07 | 0 | 1 | -0.5340 |
| 2025-01-08 | 0 | 1 | -0.5340 |
| 2025-01-10 | 0 | 1 | -0.5340 |
| 2025-01-13 | 0 | 1 | -0.5340 |
| 2025-01-14 | 0 | 1 | -0.5340 |
| 2025-01-15 | 1 | 0 | 0.5067 |
| 2025-01-16 | 0 | 1 | -0.5340 |
| 2025-01-17 | 0 | 1 | -0.5340 |
| 2025-01-21 | 0 | 1 | -0.5340 |
| 2025-01-22 | 0 | 1 | -0.5340 |
| 2025-01-23 | 0 | 1 | -0.5340 |
| 2025-01-24 | 0 | 1 | -0.5340 |
| 2025-01-27 | 1 | 0 | 0.5067 |
| 2025-01-28 | 1 | 0 | 0.5067 |
| 2025-01-29 | 1 | 0 | 0.5067 |
| 2025-01-30 | 1 | 0 | 0.5067 |
| 2025-01-31 | 1 | 0 | 0.5067 |
| 2025-02-03 | 0 | 1 | -0.5340 |
| 2025-02-04 | 1 | 0 | 0.5067 |
| 2025-02-05 | 1 | 0 | 0.5067 |
| 2025-02-06 | 1 | 0 | 0.5067 |
| 2025-02-07 | 0 | 1 | -0.5340 |
| 2025-02-10 | 0 | 1 | -0.5340 |
| 2025-02-11 | 1 | 0 | 0.5067 |
| 2025-02-12 | 1 | 0 | 0.5067 |
| 2025-02-13 | 1 | 0 | 0.5067 |
| 2025-02-14 | 1 | 0 | 0.5067 |
| 2025-02-18 | 1 | 0 | 0.5067 |
| 2025-02-19 | 1 | 0 | 0.5067 |
| 2025-02-20 | 1 | 0 | 0.5067 |
| 2025-02-21 | 1 | 0 | 0.5067 |
| 2025-02-24 | 1 | 0 | 0.5067 |
| 2025-02-25 | 1 | 0 | 0.5067 |
| 2025-02-26 | 0 | 1 | -0.5340 |
| 2025-02-27 | 0 | 1 | -0.5340 |
| 2025-02-28 | 1 | 1 | 0.0000 |
| 2025-03-03 | 0 | 2 | -0.9845 |
| 2025-03-04 | 0 | 1 | -0.5340 |
| 2025-03-05 | 0 | 1 | -0.5340 |
| 2025-03-06 | 0 | 1 | -0.5340 |
| 2025-03-07 | 1 | 1 | 0.0000 |
| 2025-03-10 | 0 | 1 | -0.5340 |
| 2025-03-11 | 0 | 1 | -0.5340 |
| 2025-03-12 | 0 | 1 | -0.5340 |
| 2025-03-13 | 0 | 1 | -0.5340 |
| 2025-03-14 | 1 | 0 | 0.5067 |
| 2025-03-17 | 1 | 0 | 0.5067 |
| 2025-03-18 | 1 | 0 | 0.5067 |
| 2025-03-19 | 1 | 0 | 0.5067 |
| 2025-03-20 | 1 | 0 | 0.5067 |
| 2025-03-21 | 1 | 0 | 0.5067 |
| 2025-03-24 | 1 | 0 | 0.5067 |
| 2025-03-25 | 1 | 0 | 0.5067 |
| 2025-03-26 | 1 | 0 | 0.5067 |
| 2025-03-27 | 1 | 0 | 0.5067 |
| 2025-03-28 | 0 | 1 | -0.5340 |
| 2025-03-31 | 1 | 0 | 0.5067 |
| 2025-04-01 | 1 | 0 | 0.5067 |
| 2025-04-02 | 1 | 0 | 0.5067 |
| 2025-04-03 | 0 | 1 | -0.5340 |
| 2025-04-04 | 0 | 1 | -0.5340 |
| 2025-04-07 | 0 | 1 | -0.5340 |
| 2025-04-08 | 0 | 1 | -0.5340 |
| 2025-04-09 | 1 | 0 | 0.5067 |
| 2025-04-10 | 0 | 1 | -0.5340 |
| 2025-04-11 | 1 | 0 | 0.5067 |
| 2025-04-14 | 1 | 0 | 0.5067 |
| 2025-04-15 | 1 | 0 | 0.5067 |
| 2025-04-16 | 1 | 1 | 0.0000 |
| 2025-04-17 | 1 | 1 | 0.0000 |
| 2025-04-21 | 1 | 1 | 0.0000 |
| 2025-04-22 | 2 | 1 | 0.5067 |
| 2025-04-23 | 2 | 0 | 0.9729 |
| 2025-04-24 | 1 | 0 | 0.5067 |
| 2025-04-25 | 1 | 0 | 0.5067 |
| 2025-04-28 | 1 | 0 | 0.5067 |
| 2025-04-29 | 1 | 0 | 0.5067 |
| 2025-04-30 | 1 | 0 | 0.5067 |
| 2025-05-01 | 1 | 0 | 0.5067 |
| 2025-05-02 | 1 | 1 | 0.0000 |
| 2025-05-05 | 0 | 1 | -0.5340 |
| 2025-05-06 | 0 | 1 | -0.5340 |
| 2025-05-07 | 0 | 1 | -0.5340 |
| 2025-05-08 | 0 | 1 | -0.5340 |
| 2025-05-09 | 0 | 1 | -0.5340 |
| 2025-05-12 | 1 | 0 | 0.5067 |
| 2025-05-13 | 1 | 0 | 0.5067 |
| 2025-05-14 | 1 | 0 | 0.5067 |
| 2025-05-15 | 1 | 0 | 0.5067 |
| 2025-05-16 | 1 | 0 | 0.5067 |
| 2025-05-19 | 1 | 0 | 0.5067 |
| 2025-05-20 | 1 | 1 | 0.0000 |
| 2025-05-21 | 0 | 1 | -0.5340 |
| 2025-05-22 | 0 | 1 | -0.5340 |
| 2025-05-23 | 0 | 1 | -0.5340 |
| 2025-05-27 | 0 | 1 | -0.5340 |
| 2025-05-28 | 0 | 1 | -0.5340 |
| 2025-05-29 | 0 | 1 | -0.5340 |
| 2025-05-30 | 1 | 0 | 0.5067 |
| 2025-06-02 | 1 | 0 | 0.5067 |
| 2025-06-03 | 1 | 0 | 0.5067 |
| 2025-06-04 | 1 | 0 | 0.5067 |
| 2025-06-05 | 1 | 0 | 0.5067 |
| 2025-06-06 | 1 | 0 | 0.5067 |
| 2025-06-09 | 1 | 0 | 0.5067 |
| 2025-06-10 | 1 | 0 | 0.5067 |
| 2025-06-11 | 1 | 0 | 0.5067 |
| 2025-06-12 | 1 | 0 | 0.5067 |
| 2025-06-13 | 0 | 1 | -0.5340 |
| 2025-06-16 | 0 | 1 | -0.5340 |
| 2025-06-17 | 0 | 1 | -0.5340 |
| 2025-06-18 | 0 | 1 | -0.5340 |
| 2025-06-20 | 1 | 1 | 0.0000 |
| 2025-06-23 | 1 | 0 | 0.5067 |
| 2025-06-24 | 1 | 0 | 0.5067 |
| 2025-06-25 | 1 | 0 | 0.5067 |
| 2025-06-26 | 1 | 0 | 0.5067 |
| 2025-06-27 | 1 | 0 | 0.5067 |
| 2025-06-30 | 2 | 0 | 0.9729 |
| 2025-07-01 | 1 | 0 | 0.5067 |
| 2025-07-02 | 1 | 0 | 0.5067 |
| 2025-07-03 | 1 | 0 | 0.5067 |
| 2025-07-07 | 1 | 0 | 0.5067 |
| 2025-07-08 | 1 | 0 | 0.5067 |
| 2025-07-09 | 1 | 0 | 0.5067 |
| 2025-07-10 | 1 | 0 | 0.5067 |
| 2025-07-11 | 1 | 0 | 0.5067 |
| 2025-07-14 | 1 | 1 | 0.0000 |
| 2025-07-15 | 1 | 1 | 0.0000 |
| 2025-07-16 | 1 | 1 | 0.0000 |
| 2025-07-17 | 0 | 1 | -0.5340 |
| 2025-07-18 | 0 | 1 | -0.5340 |
| 2025-07-21 | 0 | 1 | -0.5340 |
| 2025-07-22 | 1 | 0 | 0.5067 |
| 2025-07-23 | 1 | 0 | 0.5067 |
| 2025-07-24 | 1 | 0 | 0.5067 |
| 2025-07-25 | 1 | 0 | 0.5067 |
| 2025-07-28 | 1 | 0 | 0.5067 |
| 2025-07-29 | 1 | 0 | 0.5067 |
| 2025-07-30 | 0 | 1 | -0.5340 |
| 2025-07-31 | 0 | 1 | -0.5340 |
| 2025-08-01 | 0 | 1 | -0.5340 |
| 2025-08-04 | 0 | 1 | -0.5340 |
| 2025-08-05 | 0 | 1 | -0.5340 |
| 2025-08-06 | 1 | 0 | 0.5067 |
| 2025-08-07 | 1 | 0 | 0.5067 |
| 2025-08-08 | 1 | 0 | 0.5067 |
| 2025-08-11 | 1 | 0 | 0.5067 |
| 2025-08-12 | 1 | 0 | 0.5067 |
| 2025-08-13 | 2 | 0 | 0.9729 |
| 2025-08-14 | 2 | 0 | 0.9729 |
| 2025-08-15 | 2 | 0 | 0.9729 |
| 2025-08-18 | 2 | 0 | 0.9729 |
| 2025-08-19 | 2 | 0 | 0.9729 |
| 2025-08-20 | 1 | 1 | 0.0000 |
| 2025-08-21 | 1 | 1 | 0.0000 |
| 2025-08-22 | 0 | 1 | -0.5340 |
| 2025-08-25 | 0 | 1 | -0.5340 |
| 2025-08-26 | 1 | 1 | 0.0000 |
| 2025-08-27 | 1 | 1 | 0.0000 |
| 2025-08-28 | 1 | 0 | 0.5067 |
| 2025-08-29 | 1 | 0 | 0.5067 |
| 2025-09-02 | 1 | 0 | 0.5067 |
| 2025-09-03 | 1 | 0 | 0.5067 |
| 2025-09-04 | 1 | 0 | 0.5067 |
| 2025-09-05 | 1 | 0 | 0.5067 |
| 2025-09-08 | 1 | 0 | 0.5067 |
| 2025-09-09 | 1 | 1 | 0.0000 |
| 2025-09-10 | 0 | 1 | -0.5340 |
| 2025-09-11 | 0 | 1 | -0.5340 |
| 2025-09-12 | 1 | 0 | 0.5067 |
| 2025-09-15 | 1 | 0 | 0.5067 |
| 2025-09-16 | 1 | 0 | 0.5067 |
| 2025-09-17 | 1 | 0 | 0.5067 |
| 2025-09-18 | 1 | 0 | 0.5067 |
| 2025-09-19 | 1 | 0 | 0.5067 |
| 2025-09-22 | 1 | 0 | 0.5067 |
| 2025-09-23 | 1 | 0 | 0.5067 |
| 2025-09-24 | 1 | 0 | 0.5067 |
| 2025-09-25 | 1 | 0 | 0.5067 |
| 2025-09-26 | 1 | 0 | 0.5067 |
| 2025-09-29 | 1 | 0 | 0.5067 |
| 2025-09-30 | 1 | 0 | 0.5067 |
| 2025-10-01 | 1 | 0 | 0.5067 |
| 2025-10-02 | 2 | 0 | 0.9729 |
| 2025-10-03 | 2 | 0 | 0.9729 |
| 2025-10-06 | 1 | 0 | 0.5067 |
| 2025-10-07 | 1 | 0 | 0.5067 |
| 2025-10-08 | 1 | 0 | 0.5067 |
| 2025-10-09 | 1 | 0 | 0.5067 |
| 2025-10-10 | 0 | 1 | -0.5340 |
| 2025-10-13 | 0 | 1 | -0.5340 |
| 2025-10-14 | 0 | 1 | -0.5340 |
| 2025-10-15 | 0 | 1 | -0.5340 |
| 2025-10-16 | 0 | 1 | -0.5340 |
| 2025-10-17 | 1 | 0 | 0.5067 |
| 2025-10-20 | 1 | 0 | 0.5067 |
| 2025-10-21 | 1 | 0 | 0.5067 |
| 2025-10-22 | 1 | 0 | 0.5067 |
| 2025-10-23 | 1 | 0 | 0.5067 |
| 2025-10-24 | 1 | 0 | 0.5067 |
| 2025-10-27 | 1 | 0 | 0.5067 |
| 2025-10-28 | 1 | 0 | 0.5067 |
| 2025-10-29 | 1 | 0 | 0.5067 |
| 2025-10-30 | 1 | 0 | 0.5067 |
| 2025-10-31 | 1 | 0 | 0.5067 |
| 2025-11-03 | 1 | 0 | 0.5067 |
| 2025-11-04 | 1 | 0 | 0.5067 |
| 2025-11-05 | 1 | 0 | 0.5067 |
| 2025-11-06 | 1 | 0 | 0.5067 |
| 2025-11-07 | 1 | 0 | 0.5067 |
| 2025-11-10 | 0 | 0 | 0.0000 |
| 2025-11-11 | 1 | 0 | 0.5067 |
| 2025-11-12 | 1 | 0 | 0.5067 |
| 2025-11-13 | 1 | 0 | 0.5067 |
| 2025-11-14 | 1 | 0 | 0.5067 |
| 2025-11-17 | 0 | 1 | -0.5340 |
| 2025-11-18 | 0 | 1 | -0.5340 |
| 2025-11-19 | 0 | 1 | -0.5340 |
| 2025-11-20 | 0 | 1 | -0.5340 |
| 2025-11-21 | 1 | 1 | 0.0000 |
| 2025-11-24 | 1 | 0 | 0.5067 |
| 2025-11-25 | 1 | 0 | 0.5067 |
| 2025-11-26 | 1 | 0 | 0.5067 |
| 2025-11-28 | 1 | 0 | 0.5067 |
| 2025-12-01 | 1 | 0 | 0.5067 |
| 2025-12-02 | 1 | 0 | 0.5067 |
| 2025-12-03 | 1 | 0 | 0.5067 |
| 2025-12-04 | 1 | 1 | 0.0000 |
| 2025-12-05 | 0 | 1 | -0.5340 |
| 2025-12-08 | 0 | 1 | -0.5340 |
| 2025-12-09 | 0 | 1 | -0.5340 |
| 2025-12-10 | 0 | 1 | -0.5340 |
| 2025-12-11 | 0 | 1 | -0.5340 |
| 2025-12-12 | 0 | 1 | -0.5340 |
| 2025-12-15 | 0 | 1 | -0.5340 |
| 2025-12-16 | 0 | 1 | -0.5340 |
| 2025-12-17 | 0 | 1 | -0.5340 |
| 2025-12-18 | 0 | 1 | -0.5340 |
| 2025-12-19 | 0 | 1 | -0.5340 |
| 2025-12-22 | 0 | 1 | -0.5340 |
| 2025-12-23 | 0 | 1 | -0.5340 |
| 2025-12-24 | 0 | 1 | -0.5340 |
| 2025-12-26 | 0 | 1 | -0.5340 |
| 2025-12-29 | 0 | 1 | -0.5340 |
| 2025-12-30 | 0 | 0 | 0.0000 |
| 2025-12-31 | 0 | 0 | 0.0000 |
502 rows
Parameters
get_bet_sizes accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
method | str | The bet size. Options are: “budget” (the budget bet size), “reserve” (the reserve bet size), “probability” (the probability bet size). Defaults to “budget”. | "budget" |
labels | pd.DataFrame | None | Meta-labels with a Side, Holding Period and Label per date and ticker, such as the result of get_triple_barrier_labels with a side. Defaults to None, which uses the triple-barrier meta-labels of the CUSUM filter’s events with the direction of each event as the side (a trend-following primary model) and the other defaults. | None, which uses the triple-barrier meta-labels of the CUSUM filter's events with the direction of each event as the side (a trend-following primary model) and the other defaults |
step_size | float | None | The step the bet sizes are rounded to, between 0 and 1, so small changes of the size do not trade. Defaults to None, which keeps them unrounded. | None, which keeps them unrounded |
minimum_labels | int | The number of closed bets the hit rate of “probability” needs before it sizes a bet; earlier bets are left out. Defaults to 20. | 20 |
runs | int | The number of random starting points of the EF3M fit of “reserve”. Defaults to 100. | 100 |
seed | int | The seed of the starting points of the EF3M fit. Defaults to 0. | 42 |
period | str | The time period of the labels. Options are: “intraday” (intraday prices), “daily” (daily prices), “weekly” (weekly prices), “monthly” (monthly prices), “quarterly” (quarterly prices), “yearly” (yearly prices). Defaults to “daily”. | "weekly" |
close_column | str | The column name for closing prices in the historical data. Defaults to “Adj Close”. | "Close" |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
References
- Paper López de Prado, M. (2018). “Advances in Financial Machine Learning.” Wiley, chapter 10 (Snippets 10.1 to 10.3).
- Paper López de Prado, M. and Foreman, M. (2014). “A mixture of two Gaussians approach to mathematical portfolio oversight: the EF3M algorithm.” Quantitative Finance, 14(5), 913-930.
- Library Referenced against RiskLabAI’s probability_bet_size
- Library Referenced against RiskLabAI’s avg_active_signals