Trade Journal Analyzer (Expanded)
Absorbs: drawdown-classifier
Reads historical trade entries, extracts actionable statistical patterns, AND classifies drawdowns. Converts a "diary" into a "data warehouse."
Triggers
"analyze my trades", "journal patterns", "what's my actual WR", "edge audit", "losing streak", "drawdown", "is my system broken", "should I stop trading", "3 losses in a row"
Core Analytics
- Ingest: Read entries from
.context/trading_journal/.
- Parse: Extract setup type, instrument, direction, entry, SL, TP, result, notes.
- Analyze:
- Win Rate by Setup Type: Which setups are actually profitable?
- Win Rate by Instrument: Where is the edge strongest?
- Win Rate by Time of Day: Asian vs London vs NY session performance.
- Average R:R Achieved: Planned RR vs actual RR (execution gap).
- Drawdown Sequences: Longest losing streaks, recovery time.
- Edge Decay: Is WR trending up or down over last 20 trades?
- Flag:
- Setups with WR < breakeven threshold → flag for review or removal.
- Instruments with consistent negative EV → stop trading them.
- Emotional notes correlation → do emotional trades have lower WR?
Drawdown Classification
Not all drawdowns are equal. The wrong response is more dangerous than the drawdown itself.
Class 1: Noise (Random Variance)
- Losing streak within expected statistical bounds for the system's WR.
- Test: At 60% WR, a 5-loss streak has P = 0.4^5 = 1.02%. Over 200 trades, ~2 expected.
- Response: Do nothing. Continue executing. Do NOT adjust.
Class 2: Structural (Setup Flaw)
- Losses concentrated in a specific setup, instrument, or time period.
- Test: Is the WR decline isolated to one setup type?
- Response: Quarantine the specific setup. Continue trading others.
Class 3: Thesis-Breaker (Edge Invalidation)
- Systematic WR decline across ALL setups.
- Test: Is the WR decline persistent (>30 trades)? Has market microstructure changed?
- Response: Full stop. Trigger
circuit-breaker. Paper trade. Re-validate edge.
Output Format
## Trade Journal Analysis (Last N Trades)
### Win Rate by Setup
| Setup | Trades | Wins | WR | Avg RR | EV/Trade |
|-------|--------|------|----|--------|----------|
### Win Rate Trend (Rolling 20)
[Trending UP / DOWN / FLAT] — current WR: XX%
### Drawdown Classification
Observed: X losses in last Y trades
P(this streak | WR=Z%): XX.X%
Classification: [NOISE / STRUCTURAL / THESIS-BREAKER]
Prescribed Action: [Continue / Quarantine setup X / Full stop]
### Edge Health
Verdict: [HEALTHY / DECAYING / CRITICAL]
Integration
- Feeds into
zenith-execution for forward simulation (Monte Carlo)
- Validates Kelly assumptions (is the stated WR real?)
- Triggers
circuit-breaker if edge decay is CRITICAL
1---2name: trade-journal-analyzer3description: Unified post-trade analytics: journal pattern extraction + drawdown classification. Absorbs: drawdown-classifier.4---56# Trade Journal Analyzer (Expanded)78> **Absorbs**: `drawdown-classifier`910Reads historical trade entries, extracts actionable statistical patterns, AND classifies drawdowns. Converts a "diary" into a "data warehouse."1112## Triggers1314"analyze my trades", "journal patterns", "what's my actual WR", "edge audit", "losing streak", "drawdown", "is my system broken", "should I stop trading", "3 losses in a row"1516## Core Analytics17181. **Ingest**: Read entries from `.context/trading_journal/`.192. **Parse**: Extract setup type, instrument, direction, entry, SL, TP, result, notes.203. **Analyze**:21 - **Win Rate by Setup Type**: Which setups are actually profitable?22 - **Win Rate by Instrument**: Where is the edge strongest?23 - **Win Rate by Time of Day**: Asian vs London vs NY session performance.24 - **Average R:R Achieved**: Planned RR vs actual RR (execution gap).25 - **Drawdown Sequences**: Longest losing streaks, recovery time.26 - **Edge Decay**: Is WR trending up or down over last 20 trades?274. **Flag**:28 - Setups with WR < breakeven threshold → flag for review or removal.29 - Instruments with consistent negative EV → stop trading them.30 - Emotional notes correlation → do emotional trades have lower WR?3132## Drawdown Classification3334Not all drawdowns are equal. The wrong response is more dangerous than the drawdown itself.3536### Class 1: Noise (Random Variance)3738- Losing streak within expected statistical bounds for the system's WR.39- **Test**: At 60% WR, a 5-loss streak has P = 0.4^5 = 1.02%. Over 200 trades, ~2 expected.40- **Response**: **Do nothing.** Continue executing. Do NOT adjust.4142### Class 2: Structural (Setup Flaw)4344- Losses concentrated in a specific setup, instrument, or time period.45- **Test**: Is the WR decline isolated to one setup type?46- **Response**: **Quarantine the specific setup.** Continue trading others.4748### Class 3: Thesis-Breaker (Edge Invalidation)4950- Systematic WR decline across ALL setups.51- **Test**: Is the WR decline persistent (>30 trades)? Has market microstructure changed?52- **Response**: **Full stop.** Trigger `circuit-breaker`. Paper trade. Re-validate edge.5354## Output Format5556```markdown57## Trade Journal Analysis (Last N Trades)5859### Win Rate by Setup60| Setup | Trades | Wins | WR | Avg RR | EV/Trade |61|-------|--------|------|----|--------|----------|6263### Win Rate Trend (Rolling 20)64[Trending UP / DOWN / FLAT] — current WR: XX%6566### Drawdown Classification67Observed: X losses in last Y trades68P(this streak | WR=Z%): XX.X%69Classification: [NOISE / STRUCTURAL / THESIS-BREAKER]70Prescribed Action: [Continue / Quarantine setup X / Full stop]7172### Edge Health73Verdict: [HEALTHY / DECAYING / CRITICAL]74```7576## Integration7778- Feeds into `zenith-execution` for forward simulation (Monte Carlo)79- Validates Kelly assumptions (is the stated WR real?)80- Triggers `circuit-breaker` if edge decay is CRITICAL