/tradememory:risk-managementfrom tradememory
Provides behavioral risk management for trading agents: affective state monitoring, position sizing, drawdown management, tilt detection, and behavioral guardrails. Use before trades, during drawdowns, or when detecting emotional drift.
Ships in tradememory. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Risk management in TradeMemory is behavioral, not just mathematical. Traditional risk management calculates position sizes and stop losses. TradeMemory adds a behavioral layer: it monitors your execution patterns, detects emotional drift, and flags when you're deviating from your own rules.
The system tracks two kinds of risk:
TradeMemory maintains a real-time emotional state model for the trading agent:
| Dimension | Range | What It Tracks |
|---|---|---|
| Confidence | 0.0 - 1.0 | Self-assessed confidence, calibrated against outcomes |
| Drawdown | 0% - 100% | Current peak-to-trough equity drawdown |
| Win Streak | 0 - N | Consecutive winning trades |
| Loss Streak | 0 - N | Consecutive losing trades |
| Risk Appetite | low / normal / high | Derived from confidence + drawdown + streaks |
Check get_agent_state before every trading session:
get_agent_state() → {
confidence: 0.42,
drawdown: 8.3%,
win_streak: 0,
loss_streak: 3,
risk_appetite: "low"
}
Action rules:
risk_appetite == "low" → Reduce position size by 50% or skip marginal setupsloss_streak >= 3 → Stop trading for the session. Review, don't revenge trade.confidence < 0.3 → Paper trade only until confidence recoversdrawdown > 15% → Hard stop. No new positions until daily review.What: Cutting winners short and holding losers too long.
Detection: get_behavioral_analysis → disposition_ratio
What: Increasing position size or trade frequency after losses. Detection: Compare lot sizes and trade count in the N trades after a losing streak vs baseline.
What: Taking more trades than the strategy generates signals for. Detection: Compare actual trade count vs strategy signal count.
What: Trading outside designated sessions. Detection: Check trade timestamps against strategy's defined trading windows.
What: Your confidence doesn't match your actual accuracy.
Detection: get_behavioral_analysis → confidence calibration curve.
TradeMemory's procedural memory tracks position sizing patterns:
Default: Risk X% of equity per trade (typically 0.25-2%).
Position Size = (Equity × Risk%) / (Entry - StopLoss)
Optimal sizing based on historical edge:
Kelly% = WinRate - (LossRate / AvgWin÷AvgLoss)
get_behavioral_analysis returns Kelly criterion values per strategy.Procedural memory tracks how consistent your sizing is:
get_agent_state — is confidence reasonable? Any active streaks?remember_trade — include honest reflection/daily-review — is there a systematic problem or just variance?| Mistake | Why It's Bad | Fix |
|---|---|---|
| No pre-session risk check | Walk into the market emotionally unprepared | Always run get_agent_state first |
| Ignoring drawdown thresholds | Small drawdowns become account-threatening drawdowns | Hard stop at 15% drawdown |
| Sizing up after wins | Gives back profits faster when the streak breaks | Keep sizing constant |
| Sizing down after losses | Reduces recovery speed when edge reasserts | Keep sizing constant (unless risk appetite is "low") |
| Skipping daily reviews | Behavioral drift goes undetected for days | Daily reviews are non-negotiable |
| Paper trading with different sizing | Paper P&L doesn't reflect real execution | Same sizing rules for paper and live |
What SKILL.md sets; muted values are Claude Code's defaults
2 plugins ship this exact skill · first indexed Oct 15, 2026
3 skills in this plugin
/evolution-engineDomain knowledge for the Evolution Engine — LLM-powered autonomous strategy discovery from raw OHLCV data. Covers the generate-backtest-select-evolve loop, vectorized backtesting, out-of-sample validation, and strategy graduation. Use when discovering trading patterns, running backtests, evolving strategies, or reviewing evolution logs. Triggers on "evolve", "discover patterns", "backtest", "evolution", "strategy generation", "candidate strategy"./trading-memoryDomain knowledge for AI trading memory — Outcome-Weighted Memory (OWM) architecture, 5 memory types, recall scoring, and behavioral analysis. Use when recording trades, recalling similar contexts, analyzing performance, or checking behavioral drift. Triggers on "record trade", "remember trade", "recall", "similar trades", "performance", "behavioral", "disposition", "affective state", "confidence".Generated from the plugin's indexed repository (mnemox-ai/tradememory-protocol) — no native marketplace selected
npx claudepluginhub p/mnemox-ai-tradememory-tradememory-pluginOther plugins' skills for the same job