Lesson 6: Strategy Performance Analysis
β± Duration: 2 hours
π― Learning Objectives: Learn to evaluate strategy quality
π Difficulty: ββ Backtesting practical
π Course Overview
Backtesting reports contain numerous metrics. How can you judge strategy quality from these metrics? This lesson will teach you to deeply understand key metrics in backtesting reports and establish a scientific strategy evaluation system.
6.1 Key Metrics Interpretation
Total Profit vs Average Profit
Total Profit
Cumulative profit during the entire backtesting period.
Example:
Total profit: 3.64 USDT (0.36%)
Interpretation:
- 1000 USDT principal, earned 3.64 USDT
- Total return rate: 0.36%
Limitations:
- Doesn't consider number of trades
- Doesn't consider time duration
- Doesn't consider risk
Average Profit per Trade
Average profit per trade.
Example:
Avg. profit per trade: 0.52%
Interpretation:
- Average profit of 0.52% per trade
- Reflects individual trade quality
Importance:
- β Better reflects strategy quality than total profit
- β High average profit = efficient strategy
- β οΈ Need to combine with trade frequency for comprehensive judgment
Comparison Example
Strategy | Trade Count | Total Profit | Avg Profit | Evaluation |
---|---|---|---|---|
Strategy A | 100 | +10% | +0.1% | β Inefficient: many trades, low profit |
Strategy B | 10 | +10% | +1.0% | β Efficient: few trades, high profit |
Strategy C | 50 | +10% | +0.2% | β Balanced: moderate |
Conclusion: Strategy B is the best because it achieves the same profit with fewer trades.
Win Rate vs Profit Factor
This is the most important pair of metrics in strategy analysis.
Win Rate
Percentage of profitable trades out of total trades.
Calculation Formula:
Win Rate = Number of profitable trades / Total number of trades Γ 100%
Example:
Win rate: 85.7% (6 wins / 7 trades)
Classification:
- High Win Rate: > 70%
- Medium Win Rate: 50-70%
- Low Win Rate: < 50%
Profit Factor / Risk-Reward Ratio
Ratio of average profit to average loss.
Calculation Formula:
Profit Factor = Average Profit / Average Loss
Example:
- Average profit: +2%
- Average loss: -1%
- Profit factor: 2:1
Relationship Between Win Rate and Profit Factor
This is a classic trade-off:
Type | Win Rate | Profit Factor | Trading Style | Psychological Pressure |
---|---|---|---|---|
High Win Rate Low Profit Factor | 70-90% | 1:1 ~ 1.5:1 | Frequent small profits | Low |
Balanced | 50-70% | 1.5:1 ~ 2:1 | Moderate | Medium |
Low Win Rate High Profit Factor | 30-50% | 3:1 ~ 5:1 | Occasional large profits | High |
Profit Model Calculation
High Win Rate Low Profit Factor Strategy:
Win Rate: 80%, Average Profit: +1%, Average Loss: -1%
Expected Return = 0.80 Γ 1% + 0.20 Γ (-1%) = 0.6%
Low Win Rate High Profit Factor Strategy:
Win Rate: 40%, Average Profit: +5%, Average Loss: -2%
Expected Return = 0.40 Γ 5% + 0.60 Γ (-2%) = 0.8%
Conclusion: Low win rate strategy has higher returns but requires enduring more consecutive losses.
What Type is Your Strategy?
Judgment Criteria:
if win_rate > 70% and profit_factor < 2:
print("High win rate low profit factor - suitable for conservative investors")
elif win_rate < 50% and profit_factor > 3:
print("Low win rate high profit factor - suitable for aggressive investors")
else:
print("Balanced strategy - suitable for most people")
Maximum Drawdown
Definition
The largest decline from the highest equity point to the lowest point.
Calculation Example:
Initial Capital: $1,000
Highest Point: $1,200 (2025-09-15)
Lowest Point: $1,080 (2025-09-22, after the highest point)
Maximum Drawdown = (1,080 - 1,200) / 1,200 = -10%
Drawdown Classification
Drawdown Level | Rating | Psychological Tolerance | Recovery Difficulty |
---|---|---|---|
< 5% | π’ Excellent | Easy to accept | Very easy |
5-10% | π‘ Good | Acceptable | Easy |
10-20% | π Warning | Psychological pressure | Takes time |
> 20% | π΄ Dangerous | Hard to bear | Very difficult |
Why Drawdown is Important?
Required Return to Recover:
10% drawdown β Need 11.1% gain to break even
20% drawdown β Need 25% gain to break even
50% drawdown β Need 100% gain to break even
Conclusion: The larger the drawdown, the harder to recover, the higher the risk.
Drawdown Duration
Time from highest point to lowest point, then back to highest point.
Example:
2025-09-15: Equity peak $1,200
2025-09-22: Dropped to lowest $1,080 (drawdown starts)
2025-10-10: Recovered to $1,200 (drawdown ends)
Drawdown Duration: 25 days
Impact of Long Drawdown Duration:
- Capital cannot grow for extended periods
- Increased psychological pressure
- May miss other opportunities
Sharpe Ratio / Sortino Ratio
Sharpe Ratio
Risk-adjusted return, measuring how much excess return is obtained per unit of risk taken.
Calculation Formula:
Sharpe Ratio = (Strategy Return - Risk-Free Rate) / Standard Deviation of Returns
Interpretation Standards:
Sharpe > 3.0 π’ Excellent - Excellent risk-return ratio
Sharpe 2.0-3.0 π‘ Good - Acceptable risk-return ratio
Sharpe 1.0-2.0 π Fair - Slightly high risk
Sharpe < 1.0 π΄ Poor - Risk too high
Sharpe < 0 β Loss - Worse than risk-free investment
Example Comparison:
Strategy A: Return 10%, Standard Deviation 5%, Sharpe = 2.0
Strategy B: Return 15%, Standard Deviation 10%, Sharpe = 1.5
Conclusion: Strategy A is better (higher risk-adjusted return)
Sortino Ratio
Sharpe Ratio that only considers downside risk (more reasonable).
Difference:
- Sharpe: Penalizes all volatility (including upward volatility)
- Sortino: Only penalizes downward volatility (more aligned with investor concerns)
Interpretation:
Sortino > Sharpe β Strategy has more upward than downward volatility (good)
Sortino β Sharpe β Strategy has symmetric up-down volatility
Sortino < Sharpe β Strategy has more severe downward volatility (bad)
6.2 Trade Count Analysis
Impact of Trading Frequency
Trade Count | Frequency | Advantages | Disadvantages |
---|---|---|---|
> 100/month | Ultra-high frequency | Full capital utilization | High fees, large slippage |
30-100/month | High frequency | Many opportunities | Significant fees |
10-30/month | Medium frequency | Balanced β | Requires patience |
< 10/month | Low frequency | High signal quality | Low capital utilization |
Fee Cost Calculation
Fee Model
# Binance spot trading fees (no discounts)
maker_fee = 0.1% # Maker fee
taker_fee = 0.1% # Taker fee
# One complete trade (buy + sell)
round_trip_fee = 0.1% + 0.1% = 0.2%
Impact of Fees on Returns
Case 1: High-frequency Strategy
Trade Count: 100/month
Average Profit per Trade: +0.5%
Fees: 0.2% Γ 100 = 20%
Net Profit = 50% - 20% = 30% (fees consume 40% of profit)
Case 2: Low-frequency Strategy
Trade Count: 10/month
Average Profit per Trade: +2%
Fees: 0.2% Γ 10 = 2%
Net Profit = 20% - 2% = 18% (fees consume only 10% of profit)
Break-even Point
To be profitable, average profit per trade must exceed fees:
Minimum profit requirement > 0.2% (one complete trade)
If average profit is 0.5%:
Net profit = 0.5% - 0.2% = 0.3% (acceptable)
If average profit is 0.3%:
Net profit = 0.3% - 0.2% = 0.1% (barely)
If average profit is 0.15%:
Net profit = 0.15% - 0.2% = -0.05% (loss!)
Risks of Over-trading
Signs of Over-trading:
- β Trade count > 100/month (5m timeframe)
- β Average profit per trade < 0.3%
- β Fees > 30% of total profit
- β Many small profit/loss trades
Consequences:
- Fees erode profits
- Increased slippage losses
- Risk of strategy overfitting
- Exchange risk control risks
6.3 Exit Reason Statistics
Freqtrade backtesting reports show exit reasons for each trade:
Exit Reason Types
Exit Reason | Description | Ideal Percentage |
---|---|---|
roi | ROI take profit exit | 30-50% |
exit_signal | Sell signal triggered | 20-40% |
trailing_stop_loss | Trailing stop loss | 10-20% |
stop_loss | Fixed stop loss | < 20% |
force_exit | Forced close (backtest end) | 0-5% |
Exit Reason Analysis
Example Report
EXIT REASON STATS
βββββββββββββββββββββββ³βββββββββ³ββββββββββββ³βββββββββββββββ
β Exit Reason β Exits β Wins β Avg Profit % β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β roi β 45 β 45 β 2.1% β
β exit_signal β 28 β 25 β 0.8% β
β trailing_stop_loss β 15 β 15 β 3.5% β
β stop_loss β 12 β 0 β -5.0% β
ββββββββββββββββββββββββ΄βββββββββ΄ββββββββββββ΄βββββββββββββββ
Interpretation
ROI Take Profit (45 times, 100% win rate):
- β Strategy can quickly reach profit targets
- β Average 2.1% return, good performance
- 45% proportion, shows strategy captures trends accurately
Exit Signal (28 times, 89% win rate):
- β Most exit signals are profitable
- β οΈ 3 losing exits, signals may be too early
- Average 0.8% return, lower than ROI
Trailing Stop Loss (15 times, 100% win rate):
- β All profitable, trailing stop loss set reasonably
- β Average 3.5% return, highest exit method
- Successfully locked in most profits
Fixed Stop Loss (12 times, 0% win rate):
- β All losses, average -5%
- β οΈ 12% proportion, acceptable
- If proportion > 30%, need to adjust strategy
Problem Diagnosis
Problem 1: Stop Loss Proportion Too High (> 30%)
Causes:
- Stop loss set too tight
- Poor entry timing
- Market volatility too high
Solutions:
- Widen stop loss range (e.g., -5% β -7%)
- Add entry confirmation conditions
- Enable trailing stop loss
Problem 2: Force Exit Proportion High (> 10%)
Causes:
- Strategy holding time too long
- Lack of clear exit signals
- ROI set too high
Solutions:
- Add exit signals
- Adjust ROI gradient
- Set maximum holding time
Problem 3: ROI Proportion Too Low (< 20%)
Causes:
- ROI set too high, hard to reach
- Strategy cannot capture big trends
- Exit signals triggered too early
Solutions:
- Lower ROI targets
- Optimize entry timing
- Adjust exit signal logic
6.4 Holding Time Analysis
Average Holding Time
Example:
Avg. holding time: 4h 35m
Classification:
- < 1h: Ultra-short term
- 1-6h: Short term
- 6-24h: Intraday
- > 24h: Swing
Relationship Between Holding Time and Returns
Ideal Curve
Return β
β βββββββββββ (ROI take profit zone)
β β±
β β±
β β±
β β±
βββββΌβββββββββββββββββββ Holding Time
β
β (Profit growth)
Problem Curve 1: Time Drag
Return β
β βββββ
β β± β²
ββ± β²___ (Profit giveback)
βββββΌββββββββββββββββ Holding Time
Problem: Holding too long, profit giveback
Solution: Shorten ROI gradient time
Problem Curve 2: Early Exit
Return β
β
β β β β β (Frequent small profits)
βββββΌββ΄ββ΄ββ΄ββ΄ββββββββ Holding Time
Problem: Failed to capture big trends
Solution: Relax exit conditions, use trailing stop loss
Holding Time Distribution
Ideal Distribution:
ββββββββββββββ³βββββββββ³βββββββββββββ
β Duration β Trades β Avg Profit β
β‘βββββββββββββββββββββββββββββββββββ©
β < 1h β 15 β 0.5% β
β 1-4h β 40 β 1.2% β
β 4-12h β 30 β 2.5% β
β > 12h β 15 β 3.8% β
ββββββββββββββ΄βββββββββ΄βββββββββββββ
Analysis:
- Longer holding time, higher returns (normal)
- Most trades in 1-4h (strategy's main battlefield)
- Few long-term trades contribute high returns
Overnight Risk
If strategy holds positions over 24 hours, consider:
Risk Factors:
- US stock market close impact
- Asian opening volatility
- Sudden news events
- Weekend gaps
Countermeasures:
# Avoid overnight holding (advanced feature)
def custom_exit(self, pair, trade, current_time, **kwargs):
# Force exit if holding over 20 hours
if (current_time - trade.open_date_utc).seconds > 72000:
return 'holding_too_long'
π‘ Practical Tasks
Task 1: Backtest Three Strategies
# Backtest Strategy001
freqtrade backtesting -c config.json --strategy Strategy001 --timerange 20250901-20250930
# Backtest Strategy002
freqtrade backtesting -c config.json --strategy Strategy002 --timerange 20250901-20250930
# Backtest Strategy003
freqtrade backtesting -c config.json --strategy Strategy003 --timerange 20250901-20250930
Task 2: Create Strategy Comparison Table
Create Excel or Google Sheets, record the following metrics:
Metric | Strategy001 | Strategy002 | Strategy003 |
---|---|---|---|
Trade Count | ? | ? | ? |
Win Rate | ? | ? | ? |
Total Profit % | ? | ? | ? |
Avg Profit % | ? | ? | ? |
Max Drawdown % | ? | ? | ? |
Sharpe Ratio | ? | ? | ? |
ROI Exit % | ? | ? | ? |
Stop Loss Exit % | ? | ? | ? |
Avg Holding Time | ? | ? | ? |
Task 3: Analyze Pros and Cons of Each Strategy
Strategy001:
- Advantages:
- Disadvantages:
- Suitable Market:
Strategy002:
- Advantages:
- Disadvantages:
- Suitable Market:
Strategy003:
- Advantages:
- Disadvantages:
- Suitable Market:
Task 4: Select the Best Strategy
Choose the best strategy based on the following criteria:
Scoring Criteria (100 points):
- Total Profit (30 points)
- Win Rate (20 points)
- Max Drawdown (20 points)
- Sharpe Ratio (15 points)
- Trade Count Reasonableness (15 points)
My Choice: ___________
Reason: ___________
π Knowledge Check
Basic Questions
- Win rate 80%, average profit 1%, average loss -1%, what is expected return?
- Maximum drawdown 20%, how much gain is needed to break even?
- What does Sharpe Ratio > 3.0 indicate?
- What does high ROI exit proportion indicate?
Answers
- 0.6% (0.80 Γ 1% + 0.20 Γ -1%)
- 25% (1 / (1 - 0.20) - 1)
- Excellent risk-return ratio, strategy quality is very high
- Strategy can quickly reach profit targets, trend capture is accurate
Advanced Questions
- A strategy has 40% win rate, average profit 5%, average loss -1%, is this strategy good?
- If two strategies have same returns, but one has 5% drawdown, another has 15% drawdown, which do you choose?
- What does negative Sharpe Ratio mean?
Thought Questions
- Why is average profit per trade more important than total profit?
- Are high win rate strategies always good?
- How to determine if a strategy is over-trading?
π Reference Materials
Supporting Documentation
- π STRATEGY_SELECTION_GUIDE.md - Strategy scoring criteria
- π TESTING_GUIDE.md - Backtesting report interpretation
Recommended Reading
π Key Points Summary
- Average Profit per Trade > Total Profit: Better reflects strategy quality
- Win Rate and Profit Factor Need Balance: Don't just look at win rate
- Maximum Drawdown < 10%: Standard for controllable risk
- Sharpe Ratio > 2.0: Threshold for excellent strategies
- Exit Reason Statistics: Key to diagnosing strategy problems
- Fee Costs: Biggest enemy of high-frequency strategies
β‘οΈ Next Lesson Preview
Lesson 7: Multi-Timeframe Backtesting
In the next lesson, we will:
- Test the same strategy's performance on different timeframes
- Understand the impact of timeframes on strategies
- Find the most suitable timeframe for the strategy
- Learn timeframe selection principles
Preparation:
- β Download BTC/USDT multiple timeframe data (5m, 15m, 1h, 1d)
- β Select a strategy for testing
- β Prepare to record test results from different timeframes
π― Learning Check Standards:
- β Can independently interpret all key metrics in backtesting reports
- β Can compare multiple strategies and select the best
- β Understand the trade-off between win rate and profit factor
- β Can diagnose problems based on exit reason statistics
After completing these tasks, you have professional strategy analysis capabilities! π―
Top comments (0)