If Position Sizing (Masterclass #01) is the brakes of your car, the Kelly Criterion is the accelerator. It is the mathematical bridge between “playing it safe” and “maximizing wealth.” In this session, we evolve the classic gambling formula into a multi-asset AI risk engine for the institutional trader.
1. Executive Summary: The Geometry of Growth
- THE CORE THESIS: Most traders under-bet when they have a massive edge and over-bet when their edge is thin. This leads to sub-optimal wealth compounding or, worse, “Gambler’s Ruin.” The Kelly Criterion solves this by finding the precise mathematical peak of a strategy’s growth curve.
- THE SOLUTION: We introduce Fractional-Kelly AI (V2). By integrating Google Gemini’s probability estimations with the Kelly formula, we create a dynamic capitalization model that scales with confidence and regime health.
- KPI SNAPSHOT:
| Metric | Institutional Target | The "Why" (Statistical Edge) |
|---|---|---|
| **Edge (Win Rate x Payout)** | > 0.20 | The minimum "positive expectancy" required for Kelly. |
| **Kelly Fraction (f\*)** | 0.25 (Quarter-Kelly) | The "Sweet Spot" between growth and drawdown. |
| **Max Drawdown Cap** | < 20% | The safety rail to prevent the "Half-Kelly" volatility trap. |
2. Philosophical Foundation: Survival is a Mathematical Game
In VibeAlgoLab’s philosophy, “The goal isn’t to be right; the goal is to be right and stay solvent long enough to let the math work.”
The Ergodicity Problem
Many traders look at “Average Returns.” if a strategy gains 50% and loses 50%, the average is 0%. But in your bank account, you have lost 25% of your money. This is the Arithmetic vs. Geometric trap. The Kelly Criterion is designed to maximize the Geometric Mean, ensuring that your compounding path is sustainable over thousands of iterations.
The AI Edge: Beyond Fixed Probabilities
The original 1956 Kelly formula assumed you knew the probability of winning (like in a coin toss). In the 2026 stock market, probabilities are “Vague” and “Dynamic.” We use Google AI to transform these “Vague Probabilities” into “Estimative Weights,” allowing us to apply Kelly to uncertain environments.
3. The Quantitative Engine: The Kelly Master Formula
The pure Kelly formula for a single binary outcome is:
$$f^* = \frac{bp – q}{b}$$
- f\*: The fraction of the bankroll to wager.
- b: The net odds received on the wager (Profit / Loss ratio).
- p: The probability of winning.
- q: The probability of losing ($1 – p$).
3.1 The 2026 Multi-Asset Evolution
In a portfolio context, we use the Expected Log Growth approach. 1. Calculate Expectancy: $E = (Win\% \times AvgWin) – (Loss\% \times AvgLoss)$. 2. Apply the “Half-Kelly” Safety Buffer: Pure Kelly is notoriously volatile. If your probability estimate is even slightly off, “Full Kelly” can lead to a 50%+ drawdown. Institutional standards mandate 0.25x (Quarter-Kelly) or 0.5x (Half-Kelly) of the calculated $f^*$.
Scenario: A 60% Win Rate Strategy with 2:1 Reward/Risk – $p = 0.60, q = 0.40, b = 2.0$ – $f^* = ( (2.0 \times 0.60) – 0.40 ) / 2.0 = 0.40$ (40% of capital) – VibeAlgoLab Execution: Apply Quarter-Kelly (0.25) -> 10% Position Size.
4. Google AI Integration: Estimating the “p” (Probability)
The most difficult part of Kelly is estimating p (Win Rate). We use Google Gemini 2.0 Pro to analyze the “Quality of the Setup.”
4.1 The AI Probability Score (AIPS)
We feed five years of historical “Contextual Data” (Interest rates, VIX, Sector Strength) into Gemini with the prompt:
*”Compare the current $TICKER technical setup with the ‘Golden Cross’ archetype of the 2023-2024 Bull regime. Analyze the current Fed ‘Beige Book’ sentiment. On a scale of 0 to 1, what is the probability of a 5% move to the upside occurring before a 2% move to the downside?”*
4.2 Dynamic Kelly Scaling
If Gemini returns $p = 0.72$, the sizer automatically increases the Kelly fraction. If Gemini identifies “Liquidity Thinning” and returns $p = 0.45$, the sizer moves the position to zero, regardless of what the backtest says.
5. Advanced Risk Management: Avoiding the “Nadir”
Kelly optimization is powerful, but it has a “Fat Tail” risk. If multiple uncorrelated positions are sized using Kelly, the Total Portfolio Heat can exceed 100%, creating “Hidden Correlation” during a market crash.
- The Correlation Dampener: If current market correlation > 0.70, all Kelly results are automatically cut by 50%.
- The Equity-Curve Filter: If the portfolio’s equity curve is below its 50-day moving average, the “Kelly Multiplier” is reduced to 0.1x (The Survival Mode).
- Recursive Kelly: We update the $p$ and $b$ variables daily based on actual trade outcomes (Walk-forward optimization).
6. Actionable Checklist: The Kelly Workflow
1. Define your Edge: Verify your win rate and reward/risk ratio over at least 50 trades. 2. Consult Google AI: Get the “Contextual Probability Score” for the current setup. 3. Calculate Full Kelly: Use the master formula to find the theoretical peak. 4. Fractionalize: Divide by 4 (Quarter-Kelly) for institutional safety. 5. Cross-Check masterclass #01: Ensure the ATR Sizer doesn’t cap the position lower than Kelly suggests. 6. Monitor for “Log-Normal” Drift: If the position doubles, re-size to lock in the “new” Kelly fraction.
7. Scenario Analysis: Kelly Under Stress
| Regime Score | Kelly Fraction (f\*) | Context | Result |
|---|---|---|---|
| **High Conviction** | 0.5f* | AI Score > 0.8, Bull Regime | Accelerated Compounding |
| **Standard Setup** | 0.25f* | AI Score ~0.6, Neutral Regime | Steady Growth |
| **Divergent** | 0.1f* | Low RS, High VIX | Preservation |
| **Contradictory** | **0.0** | AI Score < 0.4 | **CASH** |
8. Historical Analog: Edward Thorp vs. LTCM
The Success: Edward Thorp (The Father of Kelly)
Thorp used the Kelly Criterion to beat Las Vegas at Blackjack and then used the same math to build Princeton Newport Partners, generating 20% annual returns for 20 years with zero losing years. He never “bet it all,” always sticking to fractional Kelly.
The Failure: LTCM (The Full Kelly Trap)
Long-Term Capital Management (LTCM) used massive leverage based on “High Probability” trades. They essentially applied Over-Kelly (leveraging beyond the growth peak). When the 1998 Russian default (a Black Swan) occurred, their “High Probability” became a 100% loss because they had no “Fractional Buffer.” – The 2026 Lesson: Information travels faster, and “Anomalies” revert quicker. If you aren’t using Fractional Kelly, the AI-driven flash crashes will liquidate you before the “Mean Reversion” happens.
9. Recommended Resources
1. “Fortune’s Formula” by William Poundstone – The history of the Kelly Criterion. 2. “A Man for All Markets” by Edward Thorp – The blueprint for institutional risk. 3. VibeAlgoLab Python SDK: `v3_utils/calculators/kelly_engine_v2.py` 4. Gemini Pro API Documentation: Customizing probability prompts.
⚠️ **Important Disclaimer**
1. Educational Purpose: All content, including code and strategies, is for educational and research purposes only. 2. No Financial Advice: This is not financial advice. I am not a financial advisor. 3. Risk Warning: Algorithmic trading involves significant risk. Past performance (including backtest results) does not guarantee future results. 4. Software Liability: The code provided is “as-is” without warranty of any kind. The author is not responsible for any financial losses due to bugs, API errors, or market volatility. Use this code at your own risk.
Next Report: Masterclass #03: The Modern Magic Formula – AI-Powered Quality Screening.