/trade-journal
Structured trade logging, performance review, behavioral pattern detection, and strategy attribution for systematic improvement
$ npx -y skills add agiprolabs/claude-trading-skills --skill trade-journal --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/trade-journal
Context preview
The summary Claude sees to decide when to auto-load this skill.
Structured trade logging, performance review, behavioral pattern detection, and strategy attribution for systematic improvement
SKILL.md
trade-journal.SKILL.mdname: trade-journal
description: Structured trade logging, performance review, behavioral pattern detection, and strategy attribution for systematic improvement
Trade Journal
Structured trade journaling for systematic improvement. Log every trade with context, review performance at multiple cadences, detect behavioral patterns that destroy edge, and attribute returns to specific strategies.
Why Journaling Matters
Most traders fail not from bad strategies but from bad behavior. A trade journal transforms subjective "feel" into objective data:
- **Strategy Attribution**: Know which setups actually make money vs. which feel profitable
- **Behavioral Detection**: Catch revenge trading, FOMO entries, and premature exits before they compound
- **Pattern Recognition**: Discover that your Monday morning trades lose money, or that you cut SOL winners too early
- **Accountability**: Written rationale before entry forces deliberate decision-making
- **Improvement Tracking**: Measure whether changes to your process actually improve results
Without a journal, you optimize on noise. With one, you optimize on signal.
Trade Record Structure
Every trade record captures context at entry and outcome at exit. See `references/record_format.md` for the complete 18-field schema.
Minimum Required Fields
trade = {
"id": "T-20250310-001",
"token": "SOL",
"direction": "long",
"entry_date": "2025-03-10T14:30:00Z",
"entry_price": 142.50,
"size_sol": 5.0,
"strategy": "momentum-breakout",
"rationale": "Breaking above 4h resistance at 141.80 with volume confirmation",
"exit_date": "2025-03-10T16:45:00Z",
"exit_price": 146.20,
"pnl_sol": 0.648,
"outcome": "win",
"lessons": "Held through initial pullback to 143.0, rewarded for patience"
}Strategy Tagging
Use consistent tags to enable performance attribution:
| Category | Tags | |----------|------| | Momentum | `momentum-breakout`, `trend-continuation`, `pullback-entry` | | Mean Reversion | `range-fade`, `oversold-bounce`, `deviation-snap` | | Event-Driven | `listing-play`, `catalyst-trade`, `news-reaction` | | On-Chain | `whale-follow`, `wallet-copy`, `flow-signal` | | DeFi | `lp-entry`, `yield-farm`, `arb-capture` |
Rationale Templates
Write rationale **before** entering. Templates by setup type:
Momentum: "[Token] breaking [level] on [timeframe] with [confirmation]. Target [price], stop [price]."
Mean Reversion: "[Token] at [X] std devs from [mean] on [timeframe]. Expecting reversion to [target]."
On-Chain: "[Signal type] detected — [wallet/flow description]. Historical hit rate [X]%."
Storage Format
The journal uses JSON for structured querying and CSV for spreadsheet compatibility.
JSON Format (Primary)
{
"journal_version": "1.0",
"trader_id": "anon",
"trades": [
{
"id": "T-20250310-001",
"token": "SOL",
"direction": "long",
"entry_date": "2025-03-10T14:30:00Z",
"entry_price": 142.50,
"size_sol": 5.0,
"size_usd": 712.50,
"strategy": "momentum-breakout",
"setup_quality": 8,
"rationale": "Breaking above 4h resistance with volume",
"exit_date": "2025-03-10T16:45:00Z",
"exit_price": 146.20,
"pnl_sol": 0.648,
"pnl_pct": 2.60,
"outcome": "win",
"hold_time_minutes": 135,
"emotional_state": "calm",
"lessons": "Patience through pullback paid off",
"tags": ["high-conviction", "clean-setup"]
}
]
}CSV Format (Export)
id,token,direction,entry_date,entry_price,size_sol,strategy,exit_date,exit_price,pnl_sol,pnl_pct,outcome,lessons
T-20250310-001,SOL,long,2025-03-10T14:30:00Z,142.50,5.0,momentum-breakout,2025-03-10T16:45:00Z,146.20,0.648,2.60,win,"Patience paid off"
Analytics from Journal Data
Win Rate by Strategy
from collections import Counter
def win_rate_by_strategy(trades: list[dict]) -> dict[str, float]:
"""Compute win rate grouped by strategy tag."""
strategy_outcomes: dict[str, list[str]] = {}
for t in trades:
strat = t["strategy"]
strategy_outcomes.setdefault(strat, []).append(t["outcome"])
return {
strat: outcomes.count("win") / len(outcomes)
for strat, outcomes in strategy_outcomes.items()
if len(outcomes) >= 5 # minimum sample size
}Performance by Time of Day
from datetime import datetime
def pnl_by_hour(trades: list[dict]) -> dict[int, float]:
"""Aggregate P&L by entry hour (UTC)."""
hourly: dict[int, float] = {}
for t in trades:
hour = datetime.fromisoformat(t["entry_date"].rstrip("Z")).hour
hourly[hour] = hourly.get(hour, 0.0) + t.get("pnl_sol", 0.0)
return dict(sorted(hourly.items()))Profit Factor by Token Type
def profit_factor(trades: list[dict], group_key: str = "token") -> dict[str, float]:
"""Compute profit factor (gross wins / gross losses) by grouping key."""
groups: dict[str, dict[str, float]] = {}
for t in trades:
key = t.get(group_key, "unknown")
groups.setdefault(key, {"wins": 0.0, "losses": 0.0})
pnl = t.get("pnl_sol", 0.0)
if pnl > 0:
groups[key]["wins"] += pnl
else:
groups[key]["losses"] += abs(pnl)
return {
k: v["wins"] / v["losses"] if v["losses"] > 0 else float("inf")
for k, v in groups.items()
}Behavioral Pattern Detection
The journal enables detection of destructive trading patterns. See `references/review_framework.md` for the full framework.
Revenge Trading
Rapid re-entry after a loss, often with larger size:
def detect_revenge_trades(trades: list[dict], max_gap_minutes: int = 15) -> list[dict]:
"""Find trades entered within max_gap_minutes of a losing exit."""
sorted_trades = sorted(trades, key=lambda t: t["entry_date"])
revenge = []
for i in range(1, len(sorted_tradeRead more
name: trade-journal description: Structured trade logging, performance review, behavioral pattern detection, and strategy attribution for systematic improvement
Trade Journal
Structured trade journaling for systematic improvement. Log every trade with context, review performance at multiple cadences, detect behavioral patterns that destroy edge, and attribute returns to specific strategies.
Why Journaling Matters
Most traders fail not from bad strategies but from bad behavior. A trade journal transforms subjective "feel" into objective data:
- **Strategy Attribution**: Know which setups actually make money vs. which feel profitable
- **Behavioral Detection**: Catch revenge trading, FOMO entries, and premature exits before they compound
- **Pattern Recognition**: Discover that your Monday morning trades lose money, or that you cut SOL winners too early
- **Accountability**: Written rationale before entry forces deliberate decision-making
- **Improvement Tracking**: Measure whether changes to your process actually improve results
Without a journal, you optimize on noise. With one, you optimize on signal.
Trade Record Structure
Every trade record captures context at entry and outcome at exit. See `references/record_format.md` for the complete 18-field schema.
Minimum Required Fields
trade = {
"id": "T-20250310-001",
"token": "SOL",
"direction": "long",
"entry_date": "2025-03-10T14:30:00Z",
"entry_price": 142.50,
"size_sol": 5.0,
"strategy": "momentum-breakout",
"rationale": "Breaking above 4h resistance at 141.80 with volume confirmation",
"exit_date": "2025-03-10T16:45:00Z",
"exit_price": 146.20,
"pnl_sol": 0.648,
"outcome": "win",
"lessons": "Held through initial pullback to 143.0, rewarded for patience"
}Strategy Tagging
Use consistent tags to enable performance attribution:
| Category | Tags | |----------|------| | Momentum | `momentum-breakout`, `trend-continuation`, `pullback-entry` | | Mean Reversion | `range-fade`, `oversold-bounce`, `deviation-snap` | | Event-Driven | `listing-play`, `catalyst-trade`, `news-reaction` | | On-Chain | `whale-follow`, `wallet-copy`, `flow-signal` | | DeFi | `lp-entry`, `yield-farm`, `arb-capture` |
Rationale Templates
Write rationale **before** entering. Templates by setup type:
Momentum: "[Token] breaking [level] on [timeframe] with [confirmation]. Target [price], stop [price]." Mean Reversion: "[Token] at [X] std devs from [mean] on [timeframe]. Expecting reversion to [target]." On-Chain: "[Signal type] detected — [wallet/flow description]. Historical hit rate [X]%."
Storage Format
The journal uses JSON for structured querying and CSV for spreadsheet compatibility.
JSON Format (Primary)
{
"journal_version": "1.0",
"trader_id": "anon",
"trades": [
{
"id": "T-20250310-001",
"token": "SOL",
"direction": "long",
"entry_date": "2025-03-10T14:30:00Z",
"entry_price": 142.50,
"size_sol": 5.0,
"size_usd": 712.50,
"strategy": "momentum-breakout",
"setup_quality": 8,
"rationale": "Breaking above 4h resistance with volume",
"exit_date": "2025-03-10T16:45:00Z",
"exit_price": 146.20,
"pnl_sol": 0.648,
"pnl_pct": 2.60,
"outcome": "win",
"hold_time_minutes": 135,
"emotional_state": "calm",
"lessons": "Patience through pullback paid off",
"tags": ["high-conviction", "clean-setup"]
}
]
}CSV Format (Export)
id,token,direction,entry_date,entry_price,size_sol,strategy,exit_date,exit_price,pnl_sol,pnl_pct,outcome,lessons T-20250310-001,SOL,long,2025-03-10T14:30:00Z,142.50,5.0,momentum-breakout,2025-03-10T16:45:00Z,146.20,0.648,2.60,win,"Patience paid off"
Analytics from Journal Data
Win Rate by Strategy
from collections import Counter
def win_rate_by_strategy(trades: list[dict]) -> dict[str, float]:
"""Compute win rate grouped by strategy tag."""
strategy_outcomes: dict[str, list[str]] = {}
for t in trades:
strat = t["strategy"]
strategy_outcomes.setdefault(strat, []).append(t["outcome"])
return {
strat: outcomes.count("win") / len(outcomes)
for strat, outcomes in strategy_outcomes.items()
if len(outcomes) >= 5 # minimum sample size
}Performance by Time of Day
from datetime import datetime
def pnl_by_hour(trades: list[dict]) -> dict[int, float]:
"""Aggregate P&L by entry hour (UTC)."""
hourly: dict[int, float] = {}
for t in trades:
hour = datetime.fromisoformat(t["entry_date"].rstrip("Z")).hour
hourly[hour] = hourly.get(hour, 0.0) + t.get("pnl_sol", 0.0)
return dict(sorted(hourly.items()))Profit Factor by Token Type
def profit_factor(trades: list[dict], group_key: str = "token") -> dict[str, float]:
"""Compute profit factor (gross wins / gross losses) by grouping key."""
groups: dict[str, dict[str, float]] = {}
for t in trades:
key = t.get(group_key, "unknown")
groups.setdefault(key, {"wins": 0.0, "losses": 0.0})
pnl = t.get("pnl_sol", 0.0)
if pnl > 0:
groups[key]["wins"] += pnl
else:
groups[key]["losses"] += abs(pnl)
return {
k: v["wins"] / v["losses"] if v["losses"] > 0 else float("inf")
for k, v in groups.items()
}Behavioral Pattern Detection
The journal enables detection of destructive trading patterns. See `references/review_framework.md` for the full framework.
Revenge Trading
Rapid re-entry after a loss, often with larger size:
def detect_revenge_trades(trades: list[dict], max_gap_minutes: int = 15) -> list[dict]:
"""Find trades entered within max_gap_minutes of a losing exit."""
sorted_trades = sorted(trades, key=lambda t: t["entry_date"])
revenge = []
for i in range(1, len(sorted_tradeA comprehensive collection of 67 ready-to-use trading, DeFi, and quantitative finance Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, and 30+ other tools.
Repo: agiprolabs/claude-trading-skills
Other skills on trading-skills.
- /backtrader
Event-driven backtesting with bar-by-bar execution, complex order types, multiple analyzers, and custom indicators
Open skill - /birdeye-api
Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity
Open skill - /coingecko-api
Broad crypto market data from CoinGecko covering 13,000+ tokens. Global market stats, historical price data going back years, exchange volumes, trending tokens, and category filters. Best for macro analysis and long-term historical data.
Open skill - /cointegration-analysis
Cointegration testing for pairs trading using Engle-Granger, Johansen, and rolling stability analysis
Open skill - /copy-trading
Wallet evaluation, monitoring, and copy-trade strategy design for Solana DEX trading
Open skill - /correlation-analysis
Cross-asset correlation analysis including rolling correlation, hierarchical clustering, tail dependence, and regime-dependent correlation
Open skill

