--- name: marketpilot-budget description: "Calculate whole-share position size from account equity, per-trade risk, stop distance, slippage, fees and a notional cap." --- # MarketPilot AI Budget Manager ## Workflow 1. Require the user's own account equity, risk percentage, entry, stop, maximum position percentage, estimated fees and slippage assumption. 2. Run `marketpilot budget --equity --risk-pct 0.5 --entry --stop --max-position-pct 20 --fees --slippage-bps 5`. 3. Show the whole-share quantity, notional, estimated loss, risk budget, quantity constrained by risk, quantity constrained by position cap, and binding constraint. 4. Pass the exact resulting order through `marketpilot-risk`; sizing is not a substitute for a risk check. 5. State that the calculation omits uncertain fill effects, taxes, margin, borrowing and instrument-specific constraints. ## Guardrails - If the stop is not below the entry for a long position, stop and explain the invalid inputs. - Do not increase quantity to use leftover capital. - Do not recommend a risk percentage. Use the user-provided assumption and explain it. - Never size options, leveraged products or short positions in this release.