The mathematical formula for calculating optimal bet size to maximize long-term growth.
Win rate: 55%, Avg win: $200, Avg loss: $100 f* = (0.55 x 2 - 0.45) / 2 = 0.325 = 32.5% Half-Kelly (recommended): 16.25%
from gfil_calculators.position_size import calculate_kelly
result = calculate_kelly(0.55, 200, 100, 0.5)
print(f"Kelly: {{result['kelly_percent']}}%, Adjusted: {{result['adjusted_percent']}}%")