Position Sizing
agiprolabs/claude-trading-skills
Trade sizing methods including fixed fractional, volatility-adjusted, Kelly criterion, and liquidity-constrained sizing
Position sizing with Kelly criterion and bankroll management
$ npx skills add alsk1992/CloddsBot --skill sizing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install alsk1992/CloddsBot sizing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/alsk1992/CloddsBot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/bundled/sizing .claude/skills/sizing && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "sizing" agent skill from https://github.com/alsk1992/CloddsBot/tree/main/src/skills/bundled/sizing into .claude/skills/sizing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sizing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/alsk1992/CloddsBot/tree/main/src/skills/bundled/sizingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add alsk1992/CloddsBot --skill sizing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install alsk1992/CloddsBot sizing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alsk1992/CloddsBot.git skills-src && mkdir -p .agents/skills && cp -r skills-src/src/skills/bundled/sizing .agents/skills/sizing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "sizing" agent skill from https://github.com/alsk1992/CloddsBot/tree/main/src/skills/bundled/sizing into .agents/skills/sizing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sizing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alsk1992/CloddsBot --skill sizing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install alsk1992/CloddsBot sizing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alsk1992/CloddsBot.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/src/skills/bundled/sizing .cursor/skills/sizing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "sizing" agent skill from https://github.com/alsk1992/CloddsBot/tree/main/src/skills/bundled/sizing into .cursor/skills/sizing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sizing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/alsk1992/CloddsBot.git --path src/skills/bundled/sizing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add alsk1992/CloddsBot --skill sizing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install alsk1992/CloddsBot sizing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alsk1992/CloddsBot.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/src/skills/bundled/sizing .gemini/skills/sizing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "sizing" agent skill from https://github.com/alsk1992/CloddsBot/tree/main/src/skills/bundled/sizing into .gemini/skills/sizing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sizing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install alsk1992/CloddsBot sizingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add alsk1992/CloddsBot --skill sizing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/alsk1992/CloddsBot.git skills-src && mkdir -p .github/skills && cp -r skills-src/src/skills/bundled/sizing .github/skills/sizing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "sizing" agent skill from https://github.com/alsk1992/CloddsBot/tree/main/src/skills/bundled/sizing into .github/skills/sizing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sizing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alsk1992/CloddsBot --skill sizing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install alsk1992/CloddsBot sizing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alsk1992/CloddsBot.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/src/skills/bundled/sizing .opencode/skills/sizing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "sizing" agent skill from https://github.com/alsk1992/CloddsBot/tree/main/src/skills/bundled/sizing into .opencode/skills/sizing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sizing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
sizingPosition sizing with Kelly criterion and bankroll management
Sizing is an agent skill from alsk1992/CloddsBot. Position sizing with Kelly criterion and bankroll management
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `index.ts`).
The repository describes itself as: Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes… The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit c930628. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (TypeScript), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Sizing loads about 1.4k tokens when it runs. Until then it costs about 17 tokens; SKILL.md has 154 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from alsk1992/CloddsBot at commit c930628, republished under its MIT licence (© alsk1992). 154 words, ~1,389 tokens.
.claude/skills/sizing/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Calculate optimal position sizes using Kelly criterion, fractional Kelly, and portfolio-level allocation.
/kelly 0.45 0.55 10000 Market price, your prob, bankroll
/kelly "Trump 2028" 0.55 --bank 10k Calculate for specific market
/kelly --half 0.45 0.55 10000 Half Kelly (safer)
/kelly --quarter 0.45 0.55 10000 Quarter Kelly (conservative)/size 10000 --risk 2% Size for 2% risk per trade
/size 10000 --max-position 25% Max 25% in single position
/size portfolio --rebalance Rebalance to target weights/edge 0.45 0.55 Calculate edge (prob - price)
/edge "Trump 2028" --estimate 0.55 Edge vs market priceimport { createSizingCalculator } from 'clodds/sizing';
const sizing = createSizingCalculator({
// Bankroll
bankroll: 10000,
// Kelly fraction (1 = full, 0.5 = half)
kellyFraction: 0.5,
// Limits
maxPositionPercent: 25,
maxTotalExposure: 80,
});// Binary outcome (YES/NO market)
const size = sizing.kelly({
marketPrice: 0.45, // Current price
estimatedProb: 0.55, // Your probability estimate
bankroll: 10000,
});
console.log(`Optimal bet: $${size.optimalSize}`);
console.log(`Edge: ${size.edge}%`);
console.log(`Kelly %: ${size.kellyPercent}%`);
console.log(`Expected value: $${size.expectedValue}`);// Half Kelly (recommended for most traders)
const halfKelly = sizing.kelly({
marketPrice: 0.45,
estimatedProb: 0.55,
bankroll: 10000,
fraction: 0.5, // Half Kelly
});
// Quarter Kelly (very conservative)
const quarterKelly = sizing.kelly({
marketPrice: 0.45,
estimatedProb: 0.55,
bankroll: 10000,
fraction: 0.25,
});
console.log(`Full Kelly: $${sizing.kelly({...}).optimalSize}`);
console.log(`Half Kelly: $${halfKelly.optimalSize}`);
console.log(`Quarter Kelly: $${quarterKelly.optimalSize}`);// For markets with 3+ outcomes
const multiKelly = sizing.kellyMultiOutcome({
outcomes: [
{ name: 'Trump', price: 0.35, estimatedProb: 0.40 },
{ name: 'DeSantis', price: 0.25, estimatedProb: 0.20 },
{ name: 'Haley', price: 0.15, estimatedProb: 0.15 },
{ name: 'Other', price: 0.25, estimatedProb: 0.25 },
],
bankroll: 10000,
fraction: 0.5,
});
for (const alloc of multiKelly.allocations) {
console.log(`${alloc.name}: $${alloc.size} (${alloc.percent}%)`);
}// Optimal allocation across multiple markets
const portfolio = sizing.kellyPortfolio({
positions: [
{ market: 'Trump 2028', price: 0.45, prob: 0.55 },
{ market: 'Fed Rate Cut', price: 0.60, prob: 0.70 },
{ market: 'BTC > 100k', price: 0.30, prob: 0.40 },
],
bankroll: 10000,
correlations: correlationMatrix, // Optional
fraction: 0.5,
});
console.log('Optimal Portfolio:');
for (const pos of portfolio.positions) {
console.log(` ${pos.market}: $${pos.size}`);
}
console.log(`Total exposure: ${portfolio.totalExposure}%`);// Reduce size when less confident
const size = sizing.kellyWithConfidence({
marketPrice: 0.45,
estimatedProb: 0.55,
confidence: 0.7, // 70% confident in estimate
bankroll: 10000,
});
// Size is reduced proportionally to confidence
console.log(`Confidence-adjusted size: $${size.optimalSize}`);// Calculate edge
const edge = sizing.calculateEdge({
marketPrice: 0.45,
estimatedProb: 0.55,
});
console.log(`Edge: ${edge.edgePercent}%`);
console.log(`EV per dollar: $${edge.evPerDollar}`);
console.log(`Implied odds: ${edge.impliedOdds}`);
console.log(`True odds: ${edge.trueOdds}`);// Size based on risk per trade
const size = sizing.riskBased({
bankroll: 10000,
riskPercent: 2, // Risk 2% per trade
stopLossPercent: 10, // 10% stop loss
});
console.log(`Position size: $${size.positionSize}`);
console.log(`Max loss: $${size.maxLoss}`);| Fraction | Risk Level | Use Case |
|---|---|---|
| Full (1.0) | Aggressive | Mathematical optimum, high variance |
| Half (0.5) | Moderate | Most traders, good balance |
| Quarter (0.25) | Conservative | New traders, uncertain edges |
| Tenth (0.1) | Very Safe | Learning, small edges |
| Edge | Recommendation |
|---|---|
| < 2% | Don't trade |
| 2-5% | Small size (quarter Kelly) |
| 5-10% | Normal size (half Kelly) |
| 10%+ | Larger size, verify edge |
f* = (p * b - q) / b
Where:
f* = fraction of bankroll to bet
p = probability of winning
q = probability of losing (1 - p)
b = odds received (1/price - 1)Edge = Estimated Prob - Market Price
EV = Edge * Bet Size© alsk1992, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in src/skills/bundled/sizing of alsk1992/CloddsBot.
Open the folder on GitHubat commit c930628
Sizing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Sizing this skillalsk1992/CloddsBot | 2.9k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Position Sizingagiprolabs/claude-trading-skills | 410 | — | ~2.4k | Automated safety check: Pass | MIT | |
| Position Sizingagentii-ai/agentii-investment-intelligence | 206 | — | ~871 | Automated safety check: Pass | Apache-2.0 | |
| Kelly Criterionagiprolabs/claude-trading-skills | 410 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Positioning Ideasphuryn/pm-skills | 27k | — | ~751 | Automated safety check: Pass | MIT | |
| Gtm Positioning Strategygithub/awesome-copilot | 40k | 1 repos | ~3.5k | Automated safety check: Pass | MIT |
agiprolabs/claude-trading-skills
Trade sizing methods including fixed fractional, volatility-adjusted, Kelly criterion, and liquidity-constrained sizing
agentii-ai/agentii-investment-intelligence
position sizing, Kelly criterion, risk budgeting, volatility targeting, portfolio allocation, bet sizing, capital allocation, drawdown management, position management, risk parity sizing
agiprolabs/claude-trading-skills
Kelly criterion optimal sizing with fractional variants, edge estimation, and practical application for crypto trading
phuryn/pm-skills
Brainstorm product positioning ideas differentiated from competitors.
github/awesome-copilot
Find and own a defensible market position. An agent skill from github/awesome-copilot.
thedaviddias/Front-End-Checklist
A skill your agent uses when reviewing image assets, markup, and CDN or build transforms related to Serve images at the correct display size.
alsk1992/CloddsBot
Local hybrid search for markdown notes and docs. An agent skill from alsk1992/CloddsBot.
alsk1992/CloddsBot
Drift Protocol perpetual futures trading on Solana (direct SDK)
alsk1992/CloddsBot
Find mispriced markets by comparing to external models and data sources
alsk1992/CloddsBot
Vector embeddings configuration and semantic search. An agent skill from alsk1992/CloddsBot.
alsk1992/CloddsBot
Monitor news and correlate with prediction market movements. An agent skill from alsk1992/CloddsBot.
alsk1992/CloddsBot
Find and execute cross-platform arbitrage opportunities across prediction markets
Position sizing with Kelly criterion and bankroll management. Sizing is an agent skill from alsk1992/CloddsBot.
Run `npx skills add alsk1992/CloddsBot --skill sizing -a claude-code`. Or copy the skill folder (src/skills/bundled/sizing in alsk1992/CloddsBot) into .claude/skills/sizing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add alsk1992/CloddsBot --skill sizing -a codex`. Or copy the skill folder (src/skills/bundled/sizing in alsk1992/CloddsBot) into .agents/skills/sizing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alsk1992/CloddsBot --skill sizing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sizing, .gemini/skills/sizing, .github/skills/sizing and .opencode/skills/sizing in your project.
Going by SKILL.md and its folder, Sizing needs TypeScript for the scripts in its folder. Our summary lists: Node.js.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Sizing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Sizing: Position Sizing (agiprolabs/claude-trading-skills, 410 stars), Position Sizing (agentii-ai/agentii-investment-intelligence, 206 stars), Kelly Criterion (agiprolabs/claude-trading-skills, 410 stars) and Positioning Ideas (phuryn/pm-skills, 27k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
alsk1992 (a GitHub user) maintains it in alsk1992/CloddsBot, which has 2,901 GitHub stars. The repository holds 118 skills in this directory. The repository was last updated on October 2, 2026.
Source: alsk1992/CloddsBot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.