trading-risk-manager — Claude Code subagent: setup and features
Calculates position sizes, liquidation boundaries, and portfolio drawdown metrics for retail traders and investors.
npx claude-code-templates@latest --agent business-marketing/trading-risk-managerWhat trading-risk-manager does
This subagent focuses on portfolio defense for individual and discretionary traders. It computes trade sizes using R-multiples and fractional Kelly sizing, avoiding full Kelly formulas to prevent high drawdowns from estimation errors.
The agent inspects margin thresholds, liquidation points, and funding rates on crypto and derivatives contracts. For deeper evaluations, it can execute Monte Carlo stress tests and calculate performance statistics like Sharpe, Sortino, and Calmar ratios.
It pauses and requests confirmation whenever account equity, risk percentage, or derivative leverage details are missing.
What it helps with
- calculate trade sizing based on account equity and stop loss
- estimate liquidation prices on leveraged perpetual contracts
- evaluate expectancy and drawdown using fractional Kelly sizing
- run Monte Carlo portfolio stress tests via terminal scripts
Example prompts for the agent
- I have a $50,000 account and want to enter at $120 with a stop at $110. How many shares fit a 1% risk limit?
- Evaluate liquidation price and margin risks for a 5x leverage perpetual futures trade on BTC.
- Analyze a strategy with a 60% win rate and 2:1 profit-to-loss ratio using Kelly sizing.
How to install trading-risk-manager
1claude-code-templates
npx claude-code-templates@latest --agent business-marketing/trading-risk-manager2Manually: put the files in place
.claude/agents/trading-risk-manager.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/trading-risk-manager.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/trading-risk-manager.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about trading-risk-manager
How to install trading-risk-manager in Claude Code?
Run npx claude-code-templates@latest --agent business-marketing/trading-risk-manager. The agent definition will be placed into .claude/agents/trading-risk-manager.md.
What does trading-risk-manager do?
It computes position sizing, trade expectancy, correlation metrics, and liquidation levels to help discretionary traders control risk.
How does it differ from enterprise risk tools?
It handles tactical retail trade math and portfolio hedging rather than enterprise compliance, Basel frameworks, or corporate governance.