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.
npx skills add JoelLewis/finance_skills --skill bet-sizinggit clone --depth 1 https://github.com/JoelLewis/finance_skillsWrote 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.
[](https://agentmods.dev/skills/joellewis/finance_skills/bet-sizing)<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.
<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>- Socket pass
- Snyk pass
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.
| Model | Per session | Once 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 |
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.
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.
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).
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.
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.
- 3d ago First seen · 181 lines · 93 tokens per session scan A 185e0056c0a9
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.
bet-sizing compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| bet-sizingJoelLewis/finance_skills | Skill | 272 | 3d ago | MIT | A | 93 | Claude Code |
| Freelance EmpireLeoYeAI/openclaw-master-skills | Skill | 2.2k | 8d ago | MIT | A | 71 | Claude Code, Codex |
| agent-otc-tradeLeoYeAI/openclaw-master-skills | Skill | 2.2k | 8d ago | MIT | A | 80 | Claude Code |
| agentic-streetLeoYeAI/openclaw-master-skills | Skill | 2.2k | 8d ago | MIT | A | 91 | Claude Code, Codex |
| alpha-vantageforyourhealth111-pixel/Vibe-Skills | Skill | 3.9k | 21d ago | Apache-2.0 | A | 126 | Claude Code, Codex |
| prompt-proximity-architectureelvisun/newsjack | Skill | 1.7k | 4d ago | MIT | A | 67 | Claude Code |
| syndicromainsimon/paperasse | Skill | 2.6k | 18d ago | MIT | A | 204 | Claude Code |