# position-sizing-kelly

> Size positions with fractional Kelly, vol targeting, drawdown limits and liquidation-aware crypto leverage.

position-sizing-kelly is a paid AI agent skill on Agensi by BanditXBT, in Finance & Accounting. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $29 (one-time purchase)
- Creator: [BanditXBT](https://www.agensi.io/creators/banditxbt)
- Category: [Finance & Accounting](https://www.agensi.io/skills/finance-accounting)
- Version: 1.0
- Last updated: 2026-11-21
- Security: scan passed (2026-11-21); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/position-sizing-kelly
- Tags: trading-investing, web3-crypto, finance

## About this skill

Sizing converts an edge estimate into capital at risk. The edge is always an estimate; size for its uncertainty, not its point value. Educational analysis, not investment advice; state assumptions and data sources.

- Discrete bet (win prob p, q=1-p, net payoff b per unit risked): `f* = (b*p - q)/b = p - q/b`.
- Continuous/small-edge approximation: `f* = mu/sigma^2` (mu = expected excess return per period, sigma^2 = variance); multi-asset `f* = Sigma^-1 mu`. Fat tails and skew break it: for a return sample, numerically maximize `mean(log(1 + f*r))` instead, then shrink.
- Under GBM, growth `g(f) = f*mu - f^2*sigma^2/2`, maximized at f*. At `f = 2f*` growth equals the risk-free rate (zero excess growth); beyond that it is lower still.
- Fraction c of Kelly (f = c f*) gives `(2c - c^2)` of maximum growth with c^2 of the variance (c of the volatility): half Kelly keeps about 75% of growth with 25% of the variance (50% of the vol).
- Drawdown (continuous-time GBM, infinite horizon; derived from the hitting probability of drifted Brownian motion for log wealth): P(wealth ever falls to fraction x < 1 of start) = `x^(2/c - 1)`. Full Kelly: 50% chance of ever halving. Half Kelly: `x^3`, so 12.5% for halving. Discrete bets, fat tails, finite horizons differ: bootstrap.

- Overbetting is penalized more than underbetting: growth is quadratic in f and turns negative above 2f*. Shrink.
- `se(mu) ~ sigma/sqrt(T)`. Annualized Sharpe 1 over 3 years has SE about sqrt((1+SR^2/2)/3) = 0.71 (Lo 2002 iid approximation), and Kelly size is proportional to the edge, so a 1-SE band (Sharpe 0.3 to 1.7) moves size by several-fold. Size on a lower confidence bound (e.g., mu - 1 se) or shrink toward zero edge with a Bayesian prior.
- Heuristic default: 0.25-0.5 Kelly for model-derived edges; the upper end only for long, out-of-sample, cost-net evidence. Validate mu with strategy-statistical-validation and backtest-integrity-audit; see signal-research-alpha-decay for edge half-life.
- Use net-of-cost mu (fees, slippage, funding; see execution-cost-tca). Impact scales with size, so cap size where marginal impact equals marginal edge.

- Position = `target_vol / forecast_vol * capital`, leverage capped. Forecast with EWMA (RiskMetrics lambda 0.94 daily) or GARCH blended with long-run vol; evaluate out of sample (see regime-detection-volatility).
- Empirically, volatility scaling has helped Sharpe mainly in assets with a leverage effect (equities, credit) and little elsewhere (Harvey et al., *J. Portfolio Mgmt* 2018). It lags gap moves: size for jump risk separately (see drawdown-tail-risk-var).
- Use buffer bands (e.g., rebalance only if target moves >20%, heuristic) to limit cost drag.

## Requires

- Python 3
- numpy

## Known limitations

Educational analysis, not investment advice. The drawdown formula is a continuous-time approximation; liquidation formulas vary by venue.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the position-sizing-kelly skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does position-sizing-kelly do?

Size positions with fractional Kelly, vol targeting, drawdown limits and liquidation-aware crypto leverage.

### Which AI agents support position-sizing-kelly?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use position-sizing-kelly?

Connect your AI agent to Agensi through MCP, then ask it to use position-sizing-kelly on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
