Lean
$LEAN_TAG$
PerformanceMetrics.cs
1
/*
2
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
namespace
QuantConnect.Statistics
17
{
18
/// <summary>
19
/// PerformanceMetrics contains the names of the various performance metrics used for evaluation purposes.
20
/// </summary>
21
public
static
class
PerformanceMetrics
22
{
23
/// <summary>
24
/// Algorithm "Alpha" statistic - abnormal returns over the risk free rate and the relationshio (beta) with the benchmark returns.
25
/// </summary>
26
public
const
string
Alpha
=
"Alpha"
;
27
28
/// <summary>
29
/// Annualized standard deviation
30
/// </summary>
31
public
const
string
AnnualStandardDeviation
=
"Annual Standard Deviation"
;
32
33
/// <summary>
34
/// Annualized variance statistic calculation using the daily performance variance and trading days per year.
35
/// </summary>
36
public
const
string
AnnualVariance
=
"Annual Variance"
;
37
38
/// <summary>
39
/// The average rate of return for losing trades
40
/// </summary>
41
public
const
string
AverageLoss
=
"Average Loss"
;
42
43
/// <summary>
44
/// The average rate of return for winning trades
45
/// </summary>
46
public
const
string
AverageWin
=
"Average Win"
;
47
48
/// <summary>
49
/// Algorithm "beta" statistic - the covariance between the algorithm and benchmark performance, divided by benchmark's variance
50
/// </summary>
51
public
const
string
Beta
=
"Beta"
;
52
53
/// <summary>
54
/// Annual compounded returns statistic based on the final-starting capital and years.
55
/// </summary>
56
public
const
string
CompoundingAnnualReturn
=
"Compounding Annual Return"
;
57
58
/// <summary>
59
/// Drawdown maximum percentage.
60
/// </summary>
61
public
const
string
Drawdown
=
"Drawdown"
;
62
63
/// <summary>
64
/// Total capacity of the algorithm
65
/// </summary>
66
public
const
string
EstimatedStrategyCapacity
=
"Estimated Strategy Capacity"
;
67
68
/// <summary>
69
/// The expected value of the rate of return
70
/// </summary>
71
public
const
string
Expectancy
=
"Expectancy"
;
72
73
/// <summary>
74
/// Initial Equity Total Value
75
/// </summary>
76
public
const
string
StartEquity
=
"Start Equity"
;
77
78
/// <summary>
79
/// Final Equity Total Value
80
/// </summary>
81
public
const
string
EndEquity
=
"End Equity"
;
82
83
/// <summary>
84
/// Information ratio - risk adjusted return
85
/// </summary>
86
public
const
string
InformationRatio
=
"Information Ratio"
;
87
88
/// <summary>
89
/// The ratio of the number of losing trades to the total number of trades
90
/// </summary>
91
public
const
string
LossRate
=
"Loss Rate"
;
92
93
/// <summary>
94
/// Total net profit percentage
95
/// </summary>
96
public
const
string
NetProfit
=
"Net Profit"
;
97
98
/// <summary>
99
/// Probabilistic Sharpe Ratio is a probability measure associated with the Sharpe ratio.
100
/// It informs us of the probability that the estimated Sharpe ratio is greater than a chosen benchmark
101
/// </summary>
102
/// <remarks>See https://www.quantconnect.com/forum/discussion/6483/probabilistic-sharpe-ratio/p1</remarks>
103
public
const
string
ProbabilisticSharpeRatio
=
"Probabilistic Sharpe Ratio"
;
104
105
/// <summary>
106
/// The ratio of the average win rate to the average loss rate
107
/// </summary>
108
/// <remarks>If the average loss rate is zero, ProfitLossRatio is set to 0</remarks>
109
public
const
string
ProfitLossRatio
=
"Profit-Loss Ratio"
;
110
111
/// <summary>
112
/// Sharpe ratio with respect to risk free rate: measures excess of return per unit of risk.
113
/// </summary>
114
/// <remarks>With risk defined as the algorithm's volatility</remarks>
115
public
const
string
SharpeRatio
=
"Sharpe Ratio"
;
116
117
/// <summary>
118
/// Sortino ratio with respect to risk free rate: measures excess of return per unit of downside risk.
119
/// </summary>
120
/// <remarks>With risk defined as the algorithm's volatility</remarks>
121
public
const
string
SortinoRatio
=
"Sortino Ratio"
;
122
123
/// <summary>
124
/// Total amount of fees in the account currency
125
/// </summary>
126
public
const
string
TotalFees
=
"Total Fees"
;
127
128
/// <summary>
129
/// Total amount of orders in the algorithm
130
/// </summary>
131
public
const
string
TotalOrders
=
"Total Orders"
;
132
133
/// <summary>
134
/// Tracking error volatility (TEV) statistic - a measure of how closely a portfolio follows the index to which it is benchmarked
135
/// </summary>
136
/// <remarks>If algo = benchmark, TEV = 0</remarks>
137
public
const
string
TrackingError
=
"Tracking Error"
;
138
139
/// <summary>
140
/// Treynor ratio statistic is a measurement of the returns earned in excess of that which could have been earned on an investment that has no diversifiable risk
141
/// </summary>
142
public
const
string
TreynorRatio
=
"Treynor Ratio"
;
143
144
/// <summary>
145
/// The ratio of the number of winning trades to the total number of trades
146
/// </summary>
147
/// <remarks>If the total number of trades is zero, WinRate is set to zero</remarks>
148
public
const
string
WinRate
=
"Win Rate"
;
149
150
/// <summary>
151
/// Provide a reference to the lowest capacity symbol used in scaling down the capacity for debugging.
152
/// </summary>
153
public
const
string
LowestCapacityAsset
=
"Lowest Capacity Asset"
;
154
155
/// <summary>
156
/// The average Portfolio Turnover
157
/// </summary>
158
public
const
string
PortfolioTurnover
=
"Portfolio Turnover"
;
159
}
160
}
Common
Statistics
PerformanceMetrics.cs
Generated by
1.8.17