SuperAPI AI Directory

kelly-position

General & other

View repository

Updated 10-16 00:01

About this skill

Kelly Position Calculation

Use the Kelly formula to calculate the optimal investment position, balancing long-term growth and risk control.

Core Formula

Full Kelly: f* = (bp - q) / b

  • b = payoff ratio (average profit/average loss)
  • p = win rate, q = loss rate (1-p)
  • f* = optimal position ratio

Simplified Kelly: f = μ / σ² (based on expected return μ and variance σ²)

Practical Recommendations

  1. Fractional Kelly: Use 1/4 or 1/2 Kelly to reduce volatility
  2. Position cap: single stock ≤25% (Munger principle)
  3. Minimum position: do not open a position when Kelly<2%
  4. Portfolio management: with multiple stocks, total positions need to be normalized

How to Use

When the user provides the win rate and payoff ratio, calculate full Kelly and apply 1/4 fractional:

let kelly = (b * p - (1.0 - p)) / b;
let safe_kelly = (kelly * 0.25).min(0.25).max(0.0);

Output Content

  • Kelly optimal position
  • Recommended position (1/4 or 1/2 Kelly)
  • Risk level assessment
  • Position limit explanation
  • Rationale for the recommendation

Tools and Detailed Documentation