kelly-criterion

Calculate optimal position sizing using the Kelly criterion and fractional variants.

266|54|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/agiprolabs/claude-trading-skills --skill kelly-criterion-agiprolabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kelly-criterion
Source: https://github.com/agiprolabs/claude-trading-skills/tree/main/skills/kelly-criterion
Command: npx skills add https://github.com/agiprolabs/claude-trading-skills --skill kelly-criterion-agiprolabs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps traders and investors determine the optimal fraction of their capital to risk on each trade to maximize long-term geometric growth, while minimizing ruin risk.

Core Features & Use Cases

  • Kelly Formula Calculation: Computes the precise Kelly fraction based on win rate and payoff ratio.
  • Fractional Kelly Application: Recommends conservative fractional Kelly sizing (e.g., 0.25x, 0.5x) suitable for real-world trading.
  • Edge Estimation: Provides tools and guidance for estimating trading edge from historical data, including confidence intervals.
  • Use Case: A quantitative trader has backtested a strategy yielding a 55% win rate with an average win of 1.5x the average loss. This Skill calculates the optimal bet size, recommending a 15% allocation per trade (0.5x Kelly) to balance growth and risk.

Quick Start

Use the kelly-criterion skill to calculate the optimal bet size for a strategy with a 55% win rate and a 1.5 payoff ratio on a 1000 SOL account.

Frequently Asked Questions about kelly-criterion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate optimal position sizing for a trading strategy?

Optimal position sizing is calculated by analyzing your strategy's win rate and payoff ratio to compute the Kelly fraction, which maximizes long-term geometric growth. This Skill applies fractional Kelly variants to recommend conservative allocations balancing growth and ruin risk.

What is fractional Kelly and why use it for bet sizing?

Fractional Kelly applies a fraction (e.g., 0.25x, 0.5x) of the full Kelly criterion recommendation to reduce volatility and ruin risk. It provides conservative bet sizing suitable for real-world trading by accounting for edge stability and sample size confidence intervals.

How do I estimate trading edge from historical P&L data?

Estimating trading edge from historical P&L involves calculating your strategy's win rate and average payoff ratio. This Skill analyzes historical performance data to compute confidence intervals and edge stability, ensuring position sizing recommendations account for statistical variance.

Can I use Kelly criterion for betting scenarios with small sample sizes?

Yes, the Kelly criterion can be applied to betting scenarios with small sample sizes by using conservative fractional Kelly sizing. This Skill adjusts recommendations based on sample size and confidence intervals to prevent overestimating edge and risking ruin.

Does numpy support the calculations needed for Kelly criterion position sizing?

Yes, numpy supports the mathematical operations required for Kelly criterion position sizing, including statistical analysis of historical P&L data. This Skill leverages numpy to compute optimal allocation fractions, confidence intervals, and edge stability metrics.

Why does full Kelly criterion sizing lead to high ruin risk in real trading?

Full Kelly criterion sizing assumes perfect edge estimation, which is unrealistic and leads to high volatility and ruin risk. This Skill mitigates this by applying fractional Kelly sizing and adjusting recommendations based on sample size, edge stability, and statistical confidence intervals.