Skip to content

Commit 779a7c0

Browse files
authored
Fix PortfolioStatistics WinRate/LossRate documentation (#9431)
* Fix PortfolioStatistics win/loss inconsistency * Update regression algorithms * Revert changes * Fix PortfolioStatistics win rate XML documentation
1 parent 870f96d commit 779a7c0

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

Common/Api/Backtest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public class BacktestSummary : BasicBacktest
239239
public decimal? Drawdown { get; set; }
240240

241241
/// <summary>
242-
/// The ratio of the number of losing trades to the total number of trades
242+
/// The ratio of the number of trades with zero or negative profit loss to the total number of trades
243243
/// </summary>
244244
public decimal? LossRate { get; set; }
245245

@@ -279,7 +279,7 @@ public class BacktestSummary : BasicBacktest
279279
public decimal? TreynorRatio { get; set; }
280280

281281
/// <summary>
282-
/// The ratio of the number of winning trades to the total number of trades
282+
/// The ratio of the number of trades with positive profit loss to the total number of trades
283283
/// </summary>
284284
public decimal? WinRate { get; set; }
285285

Common/Statistics/PerformanceMetrics.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ public static class PerformanceMetrics
3636
public const string AnnualVariance = "Annual Variance";
3737

3838
/// <summary>
39-
/// The average rate of return for losing trades
39+
/// The average rate of return for trades with zero or negative profit loss
4040
/// </summary>
4141
public const string AverageLoss = "Average Loss";
4242

4343
/// <summary>
44-
/// The average rate of return for winning trades
44+
/// The average rate of return for trades with positive profit loss
4545
/// </summary>
4646
public const string AverageWin = "Average Win";
4747

@@ -86,7 +86,7 @@ public static class PerformanceMetrics
8686
public const string InformationRatio = "Information Ratio";
8787

8888
/// <summary>
89-
/// The ratio of the number of losing trades to the total number of trades
89+
/// The ratio of the number of trades with zero or negative profit loss to the total number of trades
9090
/// </summary>
9191
public const string LossRate = "Loss Rate";
9292

@@ -142,7 +142,7 @@ public static class PerformanceMetrics
142142
public const string TreynorRatio = "Treynor Ratio";
143143

144144
/// <summary>
145-
/// The ratio of the number of winning trades to the total number of trades
145+
/// The ratio of the number of trades with positive profit loss to the total number of trades
146146
/// </summary>
147147
/// <remarks>If the total number of trades is zero, WinRate is set to zero</remarks>
148148
public const string WinRate = "Win Rate";

Common/Statistics/PortfolioStatistics.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ namespace QuantConnect.Statistics
3030
public class PortfolioStatistics
3131
{
3232
/// <summary>
33-
/// The average rate of return for winning trades
33+
/// The average rate of return for trades with positive profit loss
3434
/// </summary>
3535
[JsonConverter(typeof(JsonRoundingConverter))]
3636
public decimal AverageWinRate { get; set; }
3737

3838
/// <summary>
39-
/// The average rate of return for losing trades
39+
/// The average rate of return for trades with zero or negative profit loss
4040
/// </summary>
4141
[JsonConverter(typeof(JsonRoundingConverter))]
4242
public decimal AverageLossRate { get; set; }
@@ -49,14 +49,14 @@ public class PortfolioStatistics
4949
public decimal ProfitLossRatio { get; set; }
5050

5151
/// <summary>
52-
/// The ratio of the number of winning trades to the total number of trades
52+
/// The ratio of the number of trades with positive profit loss to the total number of trades
5353
/// </summary>
5454
/// <remarks>If the total number of trades is zero, WinRate is set to zero</remarks>
5555
[JsonConverter(typeof(JsonRoundingConverter))]
5656
public decimal WinRate { get; set; }
5757

5858
/// <summary>
59-
/// The ratio of the number of losing trades to the total number of trades
59+
/// The ratio of the number of trades with zero or negative profit loss to the total number of trades
6060
/// </summary>
6161
/// <remarks>If the total number of trades is zero, LossRate is set to zero</remarks>
6262
[JsonConverter(typeof(JsonRoundingConverter))]

Common/Statistics/TradeStatistics.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ public class TradeStatistics
154154
public decimal WinLossRatio { get; set; }
155155

156156
/// <summary>
157-
/// The ratio of the number of winning trades to the total number of trades
157+
/// The ratio of the number of trades with positive profit loss to the total number of trades
158158
/// </summary>
159159
/// <remarks>If the total number of trades is zero, WinRate is set to zero</remarks>
160160
[JsonConverter(typeof(JsonRoundingConverter))]
161161
public decimal WinRate { get; set; }
162162

163163
/// <summary>
164-
/// The ratio of the number of losing trades to the total number of trades
164+
/// The ratio of the number of trades with zero or negative profit loss to the total number of trades
165165
/// </summary>
166166
/// <remarks>If the total number of trades is zero, LossRate is set to zero</remarks>
167167
[JsonConverter(typeof(JsonRoundingConverter))]

0 commit comments

Comments
 (0)