What it is: A practical guide to using AI for the two pieces of trading that decide whether your account survives — position sizing and stop-loss discipline. Covers the math, the AI workflow that runs it identically every time, and the specific failures AI prevents that humans repeat. Who it is for: Retail traders who already have entries and exits figured out but lose money on sizing mistakes and skipped stops. Best if: You believe risk management is the actual edge in trading. Skip if: You think the next great pick is what is holding you back. Daily AI fundamentals in our free Beginners in AI newsletter.
Academic context: The TradingAgents paper (UCLA + MIT, 2024) built an entire “Risk Management Team” of LLM agents that explicitly debate Aggressive vs. Neutral vs. Conservative perspectives before any trade is approved by a Fund Manager agent. The architecture is a direct echo of the position-sizing discipline below — formalized as a multi-agent debate.
The most underrated edge in trading is position sizing. Not stock selection. Not timing. Not pattern recognition. Sizing.
Every trader who has been around long enough learns this the expensive way. Two traders take the exact same trades with the exact same entries and exits. One ends the year up 40%. The other ends down 20%. The difference is how big they sized each trade and where they put each stop. The skill that compounds is the boring one.
This is also exactly the part of trading AI handles better than humans. Not because the math is hard — the math is trivial. Because humans get emotional, skip steps, round up, and conveniently forget the rules they wrote down. AI does not.
Why position sizing is the trading skill nobody talks about
Pick up any popular trading book and count the pages spent on chart patterns versus pages spent on position sizing. The ratio is roughly 10 to 1. The truth ratio runs the other direction.
Mark Minervini, the 1997 U.S. Investing Champion, has said publicly that he has never let a single loss exceed his preset stop — not once across decades of trading. That discipline, not his stock-picking or his timing, is what separates him from traders with identical chart skills who never compound their accounts. It is not a guideline. It is arithmetic.
The reason most traders ignore this: position sizing is boring. It feels like accounting, not trading. It is also where the actual money is made or lost.
The classic illustration is Jesse Livermore. The most famous speculator on Wall Street in the early twentieth century, the man who shorted the 1929 crash and walked away with the equivalent of $1.7 billion in today’s money. He died bankrupt. Not because the markets stopped working. Because he stopped following his own rules. He let small losses turn into medium losses. He averaged down. He hoped. The discipline that built the fortune did not build the man.
Position sizing and stop discipline are the two rules most traders eventually violate, and the violation is what kills them. AI does not invent these rules. It enforces the ones you wrote down.
The math AI handles better than humans
The position-sizing formula is three lines. Anyone can do it. Almost no one does it consistently.
Risk per trade (R) = Account size × Maximum loss percent (typically 0.25% to 1%).
Risk per share = Entry price − Stop price.
Share count = R ÷ Risk per share.
Example. Account is $100,000. Maximum loss per trade is 0.5%. Risk per trade (R) is $500. Stock entry is $80, stop is $75. Risk per share is $5. Share count is 100. Position size is $8,000.
What humans actually do: round to a comfortable number. Skip the calculation when the trade feels “obvious.” Quietly widen the stop because the calculated size is “too small.” Add to the position after entry without recalculating R. Skip sizing entirely when in a hurry.
What AI does: runs the formula every single time, identically, in two seconds. No rounding. No skipping. No emotional override. It also rejects the trade if the calculated share count is below your minimum or above a sanity-check threshold, depending on what rules you wrote down.
The position-sizing skill that runs every trade
A position-sizing skill in Claude Code (or a custom GPT, or a Gemini gem) is one of the highest-leverage workflows you can build. It is also one of the easiest. Here is the prompt structure that works.
Inputs you supply: ticker, entry price, stop price, risk percent for this trade (use your default unless you have a specific reason to deviate). Optionally: trade conviction tier (used to scale risk between, say, 0.25% for tier-3 and 1% for tier-1 trades).
Outputs the AI returns: share count, dollar risk, position size in dollars, position size as percent of account, and a check against your rules (max single-position concentration, sector exposure, total open risk across all positions).
Behaviors the skill enforces: never rounds. Never override-sizes “because conviction is high.” Always references the current account state from your me/account.md file rather than asking. Always names the trade conviction tier you assigned. Always shows the calculation, not just the answer (so you can verify).
For the full architecture — how this skill fits inside a wider trading workstation — see stock trading with AI: the workstation I run every day.
Stop-loss placement and AI
Stops are where most traders self-destruct. Not because they place them wrong — though many do — but because they move them. Always in the wrong direction. Always with a reason that sounds good at the time.
AI helps with stops in three specific ways.
One: methodology-grounded stop placement. The stop location should come from the trade’s framework, not from a comfortable round number. CAN SLIM bases stop 7-8% below the pivot in most cases. VCP stops below the most recent contraction low. Episodic-pivot stops below the pivot bar low. A grounded AI returns the framework-correct stop, not a vibes-based one.
Two: stop discipline enforcement. When you ask the AI “should I move my stop?” mid-trade, a well-configured system pushes back. It asks: what rule justifies the move? Trailing the stop up after a clear secondary base is fine. Widening the stop because the trade is going against you is not. Naming the rule before acting catches most of the bad moves.
Three: open-risk tracking. The AI keeps a running tally of total open risk across all positions. If you have five positions each sized for 0.5% risk, your total open risk is 2.5% — not 0.5%. Most traders underestimate this by a factor of two or three. The AI does not.
R-multiples, expectancy, and tracking
R is your risk per trade. An R-multiple is the result of a trade expressed in R’s. A +3R trade made three times your risk. A −1R trade lost the full risk. A −0.5R trade lost half — usually because the stop was tight.
Expectancy — the math that tells you whether your edge is real — is built from R-multiples. The formula:
Expectancy = (Win rate × Average win R) − (Loss rate × Average loss R).
If you win 40% of trades with an average winner of +2.5R and lose 60% with an average loser of −1R, your expectancy is (0.4 × 2.5) − (0.6 × 1) = +0.4R per trade. Across a hundred trades, that is +40R. With proper sizing, that is real money.
Almost no retail trader runs this calculation. Most cannot tell you their average R win or loss because they never logged it. AI fixes this trivially. Every trade is closed with an R-multiple result. Every month the AI tallies the running expectancy. You see whether your methodology is actually positive-expectancy or whether it is breaking even.
This single metric — honest, current expectancy — is worth more than any trading newsletter you will ever buy.
When not to use AI for sizing
- You do not have written sizing rules yet. Decide on max risk per trade, conviction tiers, and concentration limits first. Then build the skill to enforce them. The AI cannot write your rules for you.
- You want the AI to autonomously place sized trades. Do not. Sizing math is correct in isolation; brokerage slippage, partial fills, and overnight risk are not in the AI’s model. Calculate the size, place the trade yourself.
- You are sizing options positions. Position sizing for options requires inputs the AI does not have without you supplying them (current implied volatility, delta, theta, time to expiration). The math is doable, but the inputs are harder.
- You have wildly different account access (margin, day-trading buying power, retirement). Be careful what account size the AI is calculating from. Build separate skills per account if needed.
How to build an AI position-sizing skill in one afternoon
Five steps, in order.
1. Write your sizing rules document. Maximum risk per trade (e.g., 0.5% default, 1% for tier-1 conviction, 0.25% for tier-3). Maximum single-position concentration (e.g., 15% of account). Maximum sector exposure (e.g., 30%). Maximum total open risk (e.g., 5% across all positions). Pick numbers that survive the worst week you can imagine.
2. Write your account state file. Account size, base currency, brokerage, available cash, open positions list. Update this daily or after every trade. The AI reads it on demand.
3. Define the skill. In Claude Code, create a slash command (e.g., /size) that takes ticker, entry, stop, and tier as inputs. Have it read the rules and account files, run the calculation, and output the share count plus rule check.
4. Add the discipline rules. “Never round up.” “Never override-size for conviction.” “If calculated risk exceeds rules, reject the trade with the rule cited.” “Always show the calculation.” These are the constraints that make the skill actually save you money.
5. Use it every trade for a month. No exceptions. The point is not the math; the point is the habit of always running it. After a month, you will not want to size any other way.
FAQ
What is the best risk percentage per trade?
Most professional traders run between 0.25% and 1% of account per trade as default. The right number for you depends on win rate, average winner size, and how many concurrent positions you carry. Lower is almost always safer than higher; 2% per trade is aggressive and 3%+ is risk-of-ruin territory if your win rate is normal.
Can AI calculate stop-loss levels?
Yes — if you supply the framework. CAN SLIM bases, Minervini VCPs, and episodic pivots all have documented stop placement rules. The AI applies the rule from a described or charted setup. Without a framework, the AI invents a stop, which defeats the point.
Can AI replace a position-sizing calculator?
Yes, and more usefully. Calculators run the math; AI runs the math and checks the result against your rules, your account state, and your other open positions. The math is the easy part; the rule check is the hard part.
What is an R-multiple?
The result of a trade measured against your initial risk (R). A trade that risked $500 and made $1,500 is +3R. A trade that risked $500 and lost the full stop is −1R. R-multiples normalize trade results across different position sizes and let you calculate expectancy.
How does AI prevent moving stop-losses?
By requiring a named rule for any stop adjustment. Trailing up after a confirmed secondary base is a rule. Widening because the trade is going against you is not. A well-configured AI rejects the move and cites the rule. The mental friction is the point.
Should I use AI for crypto position sizing?
The math is identical. Risk per trade, entry minus stop, share count. The frameworks for entry and stop placement in crypto are less mature than in equities, so the rule documents you load look different. But the AI does the same job: enforces sizing, checks open risk, refuses to round.
The bottom line
Position sizing and stop discipline are where retail traders quietly destroy themselves. AI does not make these tasks possible — the math has always been simple. It makes them consistent. Every trade. Every day. No emotional override.
If you only build one AI skill for trading, build the sizing skill. The chart analysis can wait. The journaling can wait. The premarket brief can wait. Position sizing is the single most valuable workflow AI can run for you, and it pays back in months one and two.
For the full workstation pattern, see stock trading with AI: the workstation I run every day. For Claude specifically, see Claude for stock traders. For the broader category, see AI for stock trading: what works and what is hype.
Two newsletters feed each other. The free Beginners in AI newsletter covers what is worth using and what is hype across the entire AI tooling landscape, daily. The Beginners in Stock Trading newsletter is a separate free daily — 8:00 PM ET, ~8-minute read — that teaches the underlying methodology the workstation enforces. CAN SLIM. The 7–8% rule. Position sizing math. The trader frameworks (Minervini, O’Neil, Kullamägi, Bonde, Ryan, Breitstein, Raschke, Williams, Parker, Basso, Goedeker, Soreide) that ground every analysis. If this post resonated, that is where the rest of the discipline lives.
Learn Our Proven AI Frameworks
Beginners in AI created 6 branded frameworks to help you master AI: STACK for prompting, BUILD for business, ADAPT for learning, THINK for decisions, CRAFT for content, and CRON for automation.
Get Smarter About AI Every Morning
Free daily newsletter — one story, one tool, one tip. Plain English, no jargon.
Free forever. Unsubscribe anytime.
Sources
- Mark Minervini, Trade Like a Stock Market Wizard — the case for sizing as the dominant edge.
- Van Tharp, Trade Your Way to Financial Freedom — the original R-multiple and expectancy framework.
- Tom Basso, on position sizing math and expectancy — widely cited in trading curricula.
- William O’Neil, How to Make Money in Stocks — the 7-8% stop rule and base-level stop placement.
- Anthropic, Claude Code documentation — building skills (slash commands) that run identical workflows.
Glossary references
Two ways to go further
The AI Prompt Library
1,000+ ready-to-use prompts for Claude, ChatGPT, and Gemini. Stop staring at a blank box.
Get it for $39 →2-Hour Live AI Crash Course
A private, beginner-friendly session across Claude, ChatGPT, Gemini, and the wider landscape.
Book for $125 →