
Signal Postmortem
FreeAnalyze trading signal outcomes to improve decision quality.
Free · Opens the source repo
What Signal Postmortem does
Signal Postmortem is a specialized tool designed for traders and analysts who need to evaluate the effectiveness of their trading signals. By recording and analyzing the outcomes of trades generated by various skills, this tool helps users identify patterns of success and failure. It compares predicted outcomes against actual returns over specified holding periods, allowing for a detailed assessment of trading strategies. The results can be used to adjust the weights of signal-generating skills and to build a backlog of improvements based on decision quality metrics.
The workflow begins with the preparation of signal records, which can be gathered from the edge-signal-aggregator or other sources. Users can then classify outcomes into categories such as true positives, false positives, missed opportunities, and regime mismatches. This classification helps traders understand the reliability of their signals and the conditions under which they perform best. By generating feedback for downstream systems, the Signal Postmortem skill ensures that trading strategies can be continuously refined and improved.
This skill is particularly useful for systematic traders who rely on data-driven decision-making. It allows for periodic audits of signal quality, helping users to identify systematic issues and adjust their strategies accordingly. Additionally, the ability to manually record outcomes provides flexibility for users who may not have automated access to price data. Overall, Signal Postmortem serves as a critical component in the toolkit of any trader looking to enhance their trading performance through rigorous analysis and feedback.
When to use it
Use Signal Postmortem after closing trades or reviewing signals that have reached their holding period to assess their performance and inform future trading decisions.
When not to use it
This tool may not be suitable for traders who prefer qualitative analysis over quantitative metrics or those who do not utilize automated trading signals.
What you can build with it
Post-Trade Analysis
After closing a trade, use Signal Postmortem to analyze the outcome and determine if the signal was effective.
Signal Quality Audits
Conduct regular audits of your trading signals to identify patterns of success and areas needing improvement.
Feedback for Skill Adjustment
Utilize the feedback generated to adjust the weights of your trading signals and improve overall strategy performance.
How to install Signal Postmortem
View source1. Install with the skills CLI
npx skills add tradermonty/claude-trading-skills/signal-postmortem --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by tradermontySignal Postmortem
Overview
Signal Postmortem records and analyzes the outcomes of trading signals generated by the edge pipeline, screeners, and other skills. It compares predicted edge direction against 5-day and 20-day realized returns, categorizes outcomes (true positive, false positive, missed opportunity, regime mismatch), and generates feedback for edge-signal-aggregator weight adjustments and skill improvement backlog entries.
When to Use
- After a trade has been closed and you want to record the outcome
- When reviewing a batch of signals that have reached their holding period (5 or 20 days)
- To identify systematic false positive patterns from specific skills
- To generate feedback for edge-signal-aggregator weight calibration
- When building a skill improvement backlog from decision quality metrics
- For periodic (weekly/monthly) signal quality audits
Prerequisites
- Python 3.9+
- FMP API key (optional, for fetching realized returns if not provided manually)
- Standard library +
requestsfor API calls - Input: signal records in JSON format (from edge-signal-aggregator or screener outputs)
API Key Setup (Optional)
If you want to automatically fetch price data for return calculations, set up the FMP API key:
export FMP_API_KEY=your_api_key_here
Alternatively, pass the key via command line with --api-key YOUR_KEY. Without an API key, you can still record outcomes manually by providing --exit-price and --exit-date.
Workflow
Step 1: Prepare Signal Records
Gather closed or matured signal records. Each record should include:
signal_id: Unique identifierticker: Stock symbolsignal_date: Date signal was generatedpredicted_direction: LONG or SHORTsource_skill: Which skill generated the signalentry_price: Price at signal generation (optional, for manual override)
# Example: List signals ready for postmortem (5+ days old)
python3 skills/signal-postmortem/scripts/postmortem_recorder.py \
--list-ready \
--signals-dir state/signals/ \
--min-days 5
Step 2: Record Outcomes
Run the postmortem recorder to fetch realized returns and classify outcomes.
python3 skills/signal-postmortem/scripts/postmortem_recorder.py \
--signals-file state/signals/aggregated_signals_2026-03-10.json \
--holding-periods 5,20 \
--output-dir reports/
For manual outcome recording (when price data is already available):
python3 skills/signal-postmortem/scripts/postmortem_recorder.py \
--signal-id sig_aapl_20260310_abc \
--exit-price 178.50 \
--exit-date 2026-03-15 \
--outcome-notes "Closed at target, +3.2% in 5 days" \
--output-dir reports/
Step 3: Classify Outcomes
The recorder automatically classifies each signal into one of four categories:
| Category | Definition |
|---|---|
| TRUE_POSITIVE | Predicted direction matched realized return sign |
| FALSE_POSITIVE | Predicted direction opposite to realized return |
| MISSED_OPPORTUNITY | Signal not taken but would have been profitable |
| REGIME_MISMATCH | Signal failed due to market regime change |
Classification rules are documented in references/outcome-classification.md.
Step 4: Generate Feedback Files
Generate feedback for downstream consumers:
# Generate weight adjustment suggestions for edge-signal-aggregator
python3 skills/signal-postmortem/scripts/postmortem_analyzer.py \
--postmortems-dir reports/postmortems/ \
--generate-weight-feedback \
--output-dir reports/
# Generate skill improvement backlog entries
python3 skills/signal-postmortem/scripts/postmortem_analyzer.py \
--postmortems-dir reports/postmortems/ \
--generate-improvement-backlog \
--output-dir reports/
Step 5: Review Summary Statistics
Generate aggregate statistics by skill, by ticker, and by time period:
python3 skills/signal-postmortem/scripts/postmortem_analyzer.py \
--postmortems-dir reports/postmortems/ \
--summary \
--group-by skill,month \
--output-dir reports/
Output Format
Postmortem Record (JSON)
{
"schema_version": "1.0",
"postmortem_id": "pm_sig_aapl_20260310_abc",
"signal_id": "sig_aapl_20260310_abc",
"ticker": "AAPL",
"signal_date": "2026-03-10",
"source_skill": "edge-signal-aggregator",
"predicted_direction": "LONG",
"entry_price": 172.50,
"realized_returns": {
"5d": 0.032,
"20d": 0.058
},
"exit_price": 178.50,
"exit_date": "2026-03-15",
"holding_days": 5,
"outcome_category": "TRUE_POSITIVE",
"regime_at_signal": "RISK_ON",
"regime_at_exit": "RISK_ON",
"outcome_notes": "Clean breakout, held through minor pullback",
"recorded_at": "2026-03-17T10:30:00Z"
}
Weight Feedback (JSON)
{
"schema_version": "1.0",
"generated_at": "2026-03-17T10:35:00Z",
"analysis_period": {
"from": "2026-02-01",
"to": "2026-03-15"
},
"skill_adjustments": [
{
"skill": "vcp-screener",
"current_weight": 1.0,
"suggested_weight": 0.85,
"reason": "15% false positive rate in RISK_OFF regime",
"sample_size": 42
}
],
"confidence": "MEDIUM",
"min_sample_threshold": 20
}
Skill Improvement Backlog Entry (YAML)
- skill: vcp-screener
issue_type: false_positive_cluster
severity: medium
evidence:
false_positive_rate: 0.15
sample_size: 42
regime_correlation: RISK_OFF
suggested_action: "Add regime filter or reduce signal confidence in RISK_OFF"
generated_by: signal-postmortem
generated_at: "2026-03-17T10:35:00Z"
Summary Report (Markdown)
Reports are saved to reports/ with filenames postmortem_summary_YYYY-MM-DD.md.
Resources
scripts/postmortem_recorder.py-- Records individual signal outcomesscripts/postmortem_analyzer.py-- Generates feedback and summary statisticsreferences/outcome-classification.md-- Classification rules and edge casesreferences/feedback-integration.md-- How to integrate feedback with downstream skills
Key Principles
- Honest Attribution -- Every outcome is attributed to its source skill for accountability
- Regime Awareness -- Regime context is recorded to distinguish skill failure from market regime shifts
- Minimum Sample Size -- Weight adjustments require 20+ signals for statistical validity
- Feedback Loop Closure -- Results flow back to improve both signal aggregation and skill quality
Frequently asked questions about Signal Postmortem
Similar skills
Spring Boot Testing
Master testing techniques for Spring Boot 4 applications.
GitHub Issues
Manage GitHub issues efficiently with MCP tools.
Geofeed Tuner
Optimize your IP geolocation feeds in CSV format.
Batch Files
Master Windows batch scripting for automation and task management.
Adobe Illustrator Scripting
Automate your Illustrator workflows with ExtendScript.
Plugin Structure
Create and organize Claude Code plugins effectively.
