Analyze TradingView strategy backtest results to identify edge quality, overfitting risks, and improvement opportunities.
coding-pinescriptUsers may provide backtest data as:
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" |
After finding a metric name, extract:
$ or USD ā Dollar value% ā PercentageIf parsing fails, ask user to confirm key metrics directly.
Must Have (required for analysis):
Nice to Have:
Flag if any of these are true:
| Trades | Assessment |
|---|---|
| < 30 | ā Insufficient - results meaningless |
| 30-100 | ā ļø Marginal - proceed with caution |
| 100-500 | ā Acceptable - reasonable confidence |
| > 500 | ā Strong - high confidence |
| 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 |
| 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 = (Win% Ć Avg Win) - (Loss% Ć Avg Loss)
Must be positive. Calculate per-trade expected value.
Overfitting Indicators:
Survivorship Bias:
Curve Fitting:
Always ask:
š 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 | 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 |
coding-pinescriptplanning-trading-systemsiterating-strategies