| name | analyzing-backtests |
| description | Analyze TradingView strategy backtest results to identify edge quality, overfitting risks, and improvement opportunities. |
Backtest Analysis Skill
Triggering Contexts
- User shares TradingView strategy tester results (pasted or file)
- User asks "Is this strategy good?" or "Should I trade this?"
- User wants to compare strategy versions
- After implementing changes from
coding-pinescript
Input Handling
Accept Any Format
Users may provide backtest data as:
- Raw paste from TradingView Performance Summary (messy but parseable)
- Excel export from TradingView (complete multi-sheet data)
- CSV trade list (individual trade data)
- Screenshot (extract visually)
Semantic Parsing Rules
Do NOT rely on exact formatting. Look for these concepts flexibly:
| Metric | Variations to Recognize |
|---|
| Net Profit | "Net P&L", "Net P/L", "Total Profit", "Net profit" |
| Total Trades | "Total trades", "# Trades", "Trade count" |
| Win Rate | "Percent profitable", "% Profitable", "Win %", "Winning %" |
| Profit Factor | "PF", "Profit factor" |
| Max Drawdown | "Max DD", "Maximum drawdown", "Max equity drawdown" |
| Avg Win | "Avg winning trade", "Average win" |
| Avg Loss | "Avg losing trade", "Average loss" |
| Sharpe Ratio | "Sharpe", "Sharpe ratio" |
| Sortino Ratio | "Sortino", "Sortino ratio" |
Value Extraction
After finding a metric name, extract:
- Number with
$ or USD ā Dollar value
- Number with
% ā Percentage
- Plain number ā Raw value
Fallback
If parsing fails, ask user to confirm key metrics directly.
Core Analysis Framework
Step 1: Extract & Validate Metrics
Must Have (required for analysis):
- Net Profit ($ and %)
- Total Trades
- Win Rate (%)
- Profit Factor
- Max Drawdown ($ and %)
- Avg Win / Avg Loss
Nice to Have:
- Sharpe Ratio
- Sortino Ratio
- CAGR
- Avg Bars in Trade
Step 2: Sanity Checks
Flag if any of these are true:
Step 3: Quality Assessment
Statistical Significance
| Trades | Assessment |
|---|
| < 30 | ā Insufficient - results meaningless |
| 30-100 | ā ļø Marginal - proceed with caution |
| 100-500 | ā
Acceptable - reasonable confidence |
| > 500 | ā
Strong - high confidence |
Profit Factor Interpretation
| PF | Assessment |
|---|
| < 1.0 | ā Losing strategy |
| 1.0 - 1.2 | ā ļø Weak edge - transaction costs may kill it |
| 1.2 - 1.5 | ā
Decent edge - tradeable with discipline |
| 1.5 - 2.0 | ā
Good edge |
| > 2.0 | ā ļø Excellent OR overfitted - verify out-of-sample |
Drawdown Analysis
| Max DD vs Net Profit | Assessment |
|---|
| DD < 50% of Profit | ā
Healthy risk/reward |
| DD = 50-100% of Profit | ā ļø Moderate risk |
| DD > Net Profit | ā Risk exceeds reward |
Expectancy Check
Expectancy = (Win% Ć Avg Win) - (Loss% Ć Avg Loss)
Must be positive. Calculate per-trade expected value.
Step 4: Red Flag Detection
Overfitting Indicators:
Survivorship Bias:
Curve Fitting:
Step 5: Probing Questions
Always ask:
- "Was this tested on out-of-sample data (walk-forward or separate period)?"
- "How many parameters were optimized?"
- "Does this logic make sense fundamentally, or is it just pattern-matched?"
Output Format
Summary Card
š BACKTEST ANALYSIS: [Strategy Name]
Edge Quality: [STRONG/MODERATE/WEAK/NONE]
Trade Count: [N] trades ā [Significance assessment]
Profit Factor: [X] ā [Interpretation]
Max Drawdown: [X%] ā [Risk assessment]
Expectancy: $[X] per trade
ā ļø WARNINGS:
- [List any red flags]
ā
STRENGTHS:
- [List positive aspects]
š RECOMMENDATIONS:
1. [Actionable next steps]
Verdict Categories
| Verdict | Meaning |
|---|
| ā
TRADEABLE | Passes all checks, reasonable edge |
| ā ļø NEEDS WORK | Has potential but issues to fix |
| ā NOT READY | Fundamental problems, don't trade |
| š MORE DATA NEEDED | Can't assess without additional info |
Cross-References
- After analysis, if improvements needed ā
coding-pinescript
- If strategy needs redesign ā
planning-trading-systems
- Track changes between versions ā
iterating-strategies