Kelly Criterion

Loading SPY daily bars…

Assumptions

  • Data: SPY split-adjusted daily OHLC bars from /api/portfolio. Dividends, taxes, borrow costs, and interest on cash are excluded.
  • Period: every strategy starts with $100,000 at the first open after the selected lookback and ends at the final close. Fractional shares are allowed.
  • Sessions: regular trading hours are 9:30 a.m.–4:00 p.m. America/New_York. Early closes are not modeled.
  • Return segments: open→close and close→next open partition the same elapsed buy-and-hold period. Returns compound multiplicatively.
  • Walk-forward estimates: each Kelly decision uses only the preceding 1–120 bars (60 by default); the current bar is never included.
  • Kelly estimate: f = p / average loss − (1 − p) / average win. Zero-return observations are ignored when estimating win probability and payoff sizes.
  • Risk estimate: “Realized loss” uses average negative return. “Peak drawdown” substitutes adverse excursion to the candle low for losing observations.
  • Position limits: Kelly fractions are constrained to 0–100%; there is no shorting or leverage. Unallocated capital earns 0%.
  • Execution: trades execute at the reported open or close. Optional slippage is 2 bps per side and is independent of commission.
  • Commission: optional IBKR Pro Fixed U.S. stock pricing—$0.005/share, $1 minimum per order, capped at 1% of trade value. Regulatory, exchange, clearing, and pass-through fees are excluded.
  • Friction columns: Fees and Slippage show percentage-point terminal-return drag versus rerunning that strategy with only the named friction disabled.
  • Time in market: actual elapsed New York time invested, including overnight gaps, weekends, holidays, and daylight-saving transitions. Kelly time counts only intervals with a positive allocation.
  • Metrics: CAGR and Sharpe annualize at 252 sessions/year; Sharpe uses a 0% risk-free rate. Win rate includes zero-return sessions in its denominator.
  • Maximum drawdown: measured from the prior equity peak using candle lows for positions held intraday; overnight paths are observed only at the next open.
  • Data correction: a high above 2× or low below 0.5× the candle body is treated as an obvious decimal-place vendor error and rescaled by powers of ten.