Kelly Criterion
The Kelly Criterion node calculates the mathematically optimal fraction of your capital to allocate to a strategy, derived from its historical win rate and win/loss size ratio. It also exposes a fractional Kelly output that applies a conservative multiplier to prevent over-sizing, which is the practical choice for live trading.
Formula
A positive Kelly % means the strategy has an edge. A negative value means the strategy destroys value and should not be traded at all.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| kellyFraction | number | 0.25 | Multiplier applied to the full Kelly % to produce a conservative fractional allocation. 0.25 = Quarter Kelly. Range 0–1. |
Inputs & Outputs
| Port | Type | Description |
|---|---|---|
| Input | ||
| input | (number | null)[] | Series of trade returns (positive = win, negative = loss). Windowed to the chart view range if set. |
| Outputs | ||
| value | number | null | Full Kelly % (0–1 scale). null if no valid returns or zero win/loss ratio. |
| fractionalKelly | number | null | value × kellyFraction. The recommended allocation fraction for live use. |
| winRate | number | null | Fraction of trades with positive returns (0–1). |
| avgWin | number | null | Average value of winning returns. |
| avgLoss | number | null | Average absolute value of losing returns. |
| winLossRatio | number | null | avgWin / avgLoss. Values above 1 mean wins are larger than losses on average. |
Use Cases
Dynamic allocation from backtested returns
Connect a return series from a backtested strategy to Kelly. The fractionalKelly output tells you exactly what percentage of your equity to allocate, updating automatically as new trades are added to the window.
Strategy comparison
Run multiple strategies in parallel and compare their value (full Kelly %) outputs. A higher Kelly % indicates a superior edge; negative values indicate the strategy should be abandoned entirely.
Combining with Position Sizing
Use fractionalKelly × accountEquity as the equity input to Risk Per Trade, then pipe that into Position Sizing. This creates a fully Kelly-scaled position sizing pipeline.