
Bet Sizing
Handles position sizing calculations from Kelly criterion to risk budgeting. You'll reach for this when deciding how much capital to put in a single position, whether you're sizing a concentrated portfolio or allocating a VaR budget across trades. It covers both discrete bets (binary outcomes with known odds) and continuous investments (normal distributions), plus practical adjustments like fractional Kelly since full Kelly tends to be way too aggressive in practice. The formulas are here for volatility scaling, conviction weighting, and liquidity-based limits. Honestly most useful for the worked examples that show why half Kelly achieves 75% of the growth with dramatically lower drawdowns, which is the kind of practical insight that actually changes how you size positions.
- skills.sh installs
- 755
- GitHub stars
- 224
- last updated
- Aug 21, 2026
Install
$ npx -y skills add joellewis/finance_skills --skill bet-sizing --agent claude-codeInstalls into .claude/skills of the current project.
Files
Bet Sizing
Core Concepts
Kelly Criterion (Discrete)
For a binary bet with payoff odds b, win probability p, and loss probability q = 1-p:
f* = (b*p - q) / b
where f* is the optimal fraction of wealth to wager. The Kelly criterion maximizes the expected logarithm of wealth (geometric growth rate) over repeated bets.
Properties:
- f* = 0 when edge = 0 (no bet when there is no advantage)
- f* < 0 when negative edge (the formula tells you to bet the other side)
- f* > 0 only when b*p > q (positive expected value)
Note: the reference script's discrete_kelly clamps negative Kelly fractions to 0 (no bet) rather than returning a negative value — it does not recommend taking the other side.
Kelly Criterion (Continuous / Investment)
For a normally distributed investment return with expected excess return mu-r_f and variance sigma^2:
f* = (mu - r_f) / sigma^2
This gives the fraction of total wealth to allocate. For example, an asset with 8% expected excess return and 20% volatility: f* = 0.08 / 0.04 = 2.0 (200% of wealth — implying leverage).
Sponsors
Details
- Repository
- github.com/joellewis/finance_skills
- Category
- Finance & Trading
- First seen
- Jun 3, 2026
More from joellewis/finance_skills
All 84- Time Value Of Money754
- Account Transfers753
- Volatility Modeling753
- Financial Planning Workflow751
- Emergency Fund748
- Performance Metrics746
- Data Quality745
- Return Calculations745
- Lending741
- Savings Goals741
- Trade Execution739
- Fund Vehicles737
- Forward Risk733
- Privacy Data Security731
- Performance Reporting729
- Equities727
- Tax Efficiency724
- Anti Money Laundering723
- Financial Planning Integration723
- Advertising Compliance722
- Fixed Income Corporate722
- Portfolio Management Systems721
- Real Assets721
- Digital Assets719