# trading-risk-manager

Calculates position sizes, liquidation boundaries, and portfolio drawdown metrics for retail traders and investors.

- subagent · `type=agent` · Claude Code · 82 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/business-marketing/trading-risk-manager.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/trading-risk-manager

## What it 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.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent business-marketing/trading-risk-manager
```

2. **Manually: put the files in place**
- File: `.claude/agents/trading-risk-manager.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/trading-risk-manager.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/trading-risk-manager.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/business-marketing/trading-risk-manager.md

## When to use it
- 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
- 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.

## Similar
- [business-analyst](https://affpapa.org/en/nevibecode/agents/voltagent-community-business-analyst.md) — subagent · 3855 installs
- [business-analyst](https://affpapa.org/en/nevibecode/agents/business-analyst.md) — subagent · 3855 installs
- [legal-advisor](https://affpapa.org/en/nevibecode/agents/voltagent-community-legal-advisor.md) — subagent · 1776 installs
- [quant-analyst](https://affpapa.org/en/nevibecode/agents/voltagent-community-quant-analyst.md) — subagent · 1366 installs
- [sales-automator](https://affpapa.org/en/nevibecode/agents/sales-automator.md) — subagent · 1443 installs
- [quant-analyst](https://affpapa.org/en/nevibecode/agents/quant-analyst.md) — subagent · 1366 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
