Add scoring message
This commit is contained in:
@@ -157,7 +157,8 @@ public class BacktestRepository : IBacktestRepository
|
||||
MaxDrawdown = b.Statistics?.MaxDrawdown,
|
||||
Fees = b.Fees,
|
||||
SharpeRatio = b.Statistics?.SharpeRatio != null ? (double)b.Statistics.SharpeRatio : null,
|
||||
Score = b.Score
|
||||
Score = b.Score,
|
||||
ScoreMessage = b.ScoreMessage ?? string.Empty
|
||||
});
|
||||
|
||||
return (mappedBacktests, (int)totalCount);
|
||||
@@ -284,7 +285,8 @@ public class BacktestRepository : IBacktestRepository
|
||||
MaxDrawdown = b.Statistics?.MaxDrawdown,
|
||||
Fees = b.Fees,
|
||||
SharpeRatio = b.Statistics?.SharpeRatio != null ? (double)b.Statistics.SharpeRatio : null,
|
||||
Score = b.Score
|
||||
Score = b.Score,
|
||||
ScoreMessage = b.ScoreMessage ?? string.Empty
|
||||
});
|
||||
|
||||
return (mappedBacktests, (int)totalCount);
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Managing.Infrastructure.Databases.MongoDb.Collections
|
||||
[BsonRepresentation(BsonType.Decimal128)]
|
||||
public decimal Fees { get; set; }
|
||||
public double Score { get; set; }
|
||||
public string ScoreMessage { get; set; } = string.Empty;
|
||||
public string Identifier { get; set; }
|
||||
public string RequestId { get; set; }
|
||||
public string? Metadata { get; set; }
|
||||
|
||||
@@ -150,6 +150,7 @@ public static class MongoMappers
|
||||
StartDate = b.StartDate,
|
||||
EndDate = b.EndDate,
|
||||
Score = b.Score,
|
||||
ScoreMessage = b.ScoreMessage ?? string.Empty,
|
||||
RequestId = b.RequestId,
|
||||
Metadata = string.IsNullOrEmpty(b.Metadata) ? null : JsonSerializer.Deserialize<object>(b.Metadata)
|
||||
};
|
||||
@@ -179,6 +180,7 @@ public static class MongoMappers
|
||||
StartDate = result.StartDate,
|
||||
EndDate = result.EndDate,
|
||||
Score = result.Score,
|
||||
ScoreMessage = result.ScoreMessage ?? string.Empty,
|
||||
RequestId = result.RequestId,
|
||||
Metadata = result.Metadata == null ? null : JsonSerializer.Serialize(result.Metadata)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user