bet-sizing

bet-sizing is a skill for Claude Code from JoelLewis/finance_skills. It costs 93 tokens per session (2,348 once invoked), scanned A, original, MIT.

Guidance for deciding how much money to put into each investment or trade. It covers position sizing, the Kelly criterion, fractional Kelly, risk budgets, and conviction-based sizing.

In plain words
What is it for?
Use it for maximum position sizes, risk budgets, Kelly calculations, and deciding how concentrated a portfolio should be.
Why use it?
It helps limit the damage from an oversized position and makes the link between risk, confidence, and capital allocation explicit. The Kelly criterion is a formula for sizing repeated bets, while fractional Kelly uses a smaller amount to reduce risk.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the wealth-management plugin — 38 skills shipped together

Good fit Use it for maximum position sizes, risk budgets, Kelly calculations, and deciding how concentrated a portfolio should be.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joellewis/finance_skills/bet-sizing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JoelLewis/finance_skills --skill bet-sizing
Clone the repo
git clone --depth 1 https://github.com/JoelLewis/finance_skills

Made for: Claude Code.

Or install wealth-management, the plugin that ships this one along with the rest of its 38 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bet-sizing

README.md
[![agentmods](https://agentmods.dev/badge/skills/joellewis/finance_skills/bet-sizing/github.svg)](https://agentmods.dev/skills/joellewis/finance_skills/bet-sizing)
Your own site
<a href="https://agentmods.dev/skills/joellewis/finance_skills/bet-sizing"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/bet-sizing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bet-sizing

Your own site · 80×15
<a href="https://agentmods.dev/skills/joellewis/finance_skills/bet-sizing"><img src="https://agentmods.dev/badge/skills/joellewis/finance_skills/bet-sizing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,348 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 14 Sept 2026
  • Snyk pass 14 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.02348
Opus 5.5 $0.00037 $0.00939
Sonnet 5.5 $0.00019 $0.00470
Haiku 4.5 $0.00009 $0.00235

Measured 3d ago against content hash 185e0056c0a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bet-sizing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/bet_sizing.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/wealth-management/skills/bet-sizing/SKILL.md · 181 lines

How it starts

The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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).

Fractional Kelly

Full Kelly sizing is theoretically optimal but practically too aggressive because:

  • It assumes perfect knowledge of probabilities and payoffs
  • It produces large drawdowns (the expected drawdown of full Kelly is significant)
  • Estimation error in parameters can turn optimal into catastrophic

Practical approach: use a fraction of Kelly, commonly:

  • Half Kelly (f/2):* Achieves 75% of the growth rate with substantially lower variance and drawdown risk
  • Third Kelly (f/3):* Even more conservative; appropriate when parameter uncertainty is high
  • Quarter Kelly (f/4):* Suitable for highly uncertain estimates

The key insight: the growth rate curve is flat near the peak. Reducing from full Kelly to half Kelly only sacrifices 25% of growth but reduces risk dramatically.

Risk Budgeting

Allocate risk (not capital) across positions. The total risk budget is the maximum acceptable portfolio risk (e.g., 10% VaR or 5% tracking error).

Read the full file on GitHub · 181 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 181 lines · 93 tokens per session scan A 185e0056c0a9

Subscribe to this mod's changes

bet-sizing is a skill published in the GitHub repository JoelLewis/finance_skills (272 stars, last pushed 3d ago), licensed MIT. It adds 93 tokens to every session and 2,348 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-27.

Related

bet-sizing compared with skills from other repositories

bet-sizing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bet-sizingJoelLewis/finance_skillsSkill2723d agoMITA93Claude Code
Freelance EmpireLeoYeAI/openclaw-master-skillsSkill2.2k8d agoMITA71Claude Code, Codex
agent-otc-tradeLeoYeAI/openclaw-master-skillsSkill2.2k8d agoMITA80Claude Code
agentic-streetLeoYeAI/openclaw-master-skillsSkill2.2k8d agoMITA91Claude Code, Codex
alpha-vantageforyourhealth111-pixel/Vibe-SkillsSkill3.9k21d agoApache-2.0A126Claude Code, Codex
prompt-proximity-architectureelvisun/newsjackSkill1.7k4d agoMITA67Claude Code
syndicromainsimon/paperasseSkill2.6k18d agoMITA204Claude Code