Nowadays it is pretty easy to generate backtesting reports, given portfolio
returns. One of the popular packages in Python
is the quantstats
package.
For example by using quantstats.reports.metrics(returns)
, one might get a ton
of stats such as
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
Strategy
------------------------- ----------
Start Period 1997-01-02
End Period 2021-03-29
Risk-Free Rate 0.0%
Time in Market 63.0%
Cumulative Return 27,109.20%
CAGR 26.01%
Sharpe 0.87
Prob. Sharpe Ratio 100.0%
Smart Sharpe 0.83
Sortino 1.32
Smart Sortino 1.26
Sortino/√2 0.94
Smart Sortino/√2 0.89
Omega 1.22
Max Drawdown -68.87%
Longest DD Days 1686
Volatility (ann.) 32.93%
Calmar 0.38
Skew 0.83
Kurtosis 15.15
Expected Daily % 0.09%
Expected Monthly % 1.95%
Expected Yearly % 25.14%
Kelly Criterion 9.56%
Risk of Ruin 0.0%
Daily Value-at-Risk -3.3%
Expected Shortfall (cVaR) -3.3%
Max Consecutive Wins 9
Max Consecutive Losses 7
Gain/Pain Ratio 0.22
Gain/Pain (1M) 1.14
Payoff Ratio 1.06
Profit Factor 1.22
Common Sense Ratio 1.31
CPC Index 0.69
Tail Ratio 1.07
Outlier Win Ratio 6.92
Outlier Loss Ratio 3.35
MTD -5.79%
3M -15.16%
6M 0.61%
YTD -12.67%
1Y 56.73%
3Y (ann.) 27.99%
5Y (ann.) 22.92%
10Y (ann.) 16.78%
All-time (ann.) 26.01%
Best Day 31.88%
Worst Day -15.47%
Best Month 34.55%
Worst Month -21.14%
Best Year 171.03%
Worst Year -27.47%
Avg. Drawdown -5.38%
Avg. Drawdown Days 43
Recovery Factor 393.61
Ulcer Index 0.24
Serenity Index 53.65
Avg. Up Month 8.92%
Avg. Down Month -5.94%
Win Days % 53.43%
Win Month % 58.23%
Win Quarter % 67.39%
Win Year % 64.0%
|
What do each of these metrics stand for ? Some of them are pretty obvious but a
few might need an explanation
- Start Period
- End Period
- Risk-Free Rate
- Time in Market
- Cumulative Return
- CAGR
- Sharpe
- Prob. Sharpe Ratio
- Smart Sharpe
- Sortino
- Smart Sortino
- Sortino/√2
- Smart Sortino/√2
- Omega
- Max Drawdown
- Longest DD Days
- Volatility (ann.)
- Calmar
- Skew
- Kurtosis
- Expected Daily %
- Expected Monthly %
- Expected Yearly %
- Kelly Criterion
- Risk of Ruin
- Daily Value-at-Risk
- Expected Shortfall (cVaR)
- Max Consecutive Wins
- Max Consecutive Losses
- Gain/Pain Ratio
- Gain/Pain (1M)
- Payoff Ratio
- Profit Factor
- Common Sense Ratio
- CPC Index
- Tail Ratio
- Outlier Win Ratio
- Outlier Loss Ratio
- MTD
- 3M
- 6M
- YTD
- 1Y
- 3Y (ann.)
- 5Y (ann.)
- 10Y (ann.)
- All-time (ann.)
- Best Day
- Worst Day
- Best Month
- Worst Month
- Best Year
- Worst Year
- Avg. Drawdown
- Avg. Drawdown Days
- Recovery Factor
- Ulcer Index
- Serenity Index
- Avg. Up Month
- Avg. Down Month
- Win Days %
- Win Month %
- Win Quarter %
- Win Year %