work on clean up and switched all to use eodSearchCode
This commit is contained in:
parent
d68268b722
commit
e341cc0226
19 changed files with 206 additions and 127 deletions
|
|
@ -161,7 +161,20 @@ export class PerformanceAnalyzer {
|
|||
sortinoRatio,
|
||||
calmarRatio,
|
||||
informationRatio,
|
||||
...tradeStats,
|
||||
totalTrades: tradeStats.totalTrades ?? 0,
|
||||
winRate: tradeStats.winRate ?? 0,
|
||||
avgWin: tradeStats.avgWin ?? 0,
|
||||
avgLoss: tradeStats.avgLoss ?? 0,
|
||||
avgWinLoss: tradeStats.avgWinLoss ?? 0,
|
||||
profitFactor: tradeStats.profitFactor ?? 0,
|
||||
expectancy: tradeStats.expectancy ?? 0,
|
||||
payoffRatio: tradeStats.payoffRatio ?? 0,
|
||||
avgHoldingPeriod: tradeStats.avgHoldingPeriod ?? 0,
|
||||
avgTradesPerDay: tradeStats.avgTradesPerDay ?? 0,
|
||||
maxConsecutiveWins: tradeStats.maxConsecutiveWins ?? 0,
|
||||
maxConsecutiveLosses: tradeStats.maxConsecutiveLosses ?? 0,
|
||||
largestWin: tradeStats.largestWin ?? 0,
|
||||
largestLoss: tradeStats.largestLoss ?? 0,
|
||||
skewness,
|
||||
kurtosis,
|
||||
tailRatio,
|
||||
|
|
@ -178,9 +191,8 @@ export class PerformanceAnalyzer {
|
|||
if (this.equityCurve.length === 0) {
|
||||
return {
|
||||
maxDrawdown: 0,
|
||||
averageDrawdown: 0,
|
||||
maxDrawdownDuration: 0,
|
||||
underwaterTime: 0,
|
||||
underwaterCurve: [],
|
||||
drawdownPeriods: [],
|
||||
currentDrawdown: 0
|
||||
};
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ export class BacktestEngine extends EventEmitter {
|
|||
private lastProcessTime = 0;
|
||||
private dataManager: DataManager;
|
||||
private marketSimulator: MarketSimulator;
|
||||
private performanceAnalyzer: PerformanceAnalyzer;
|
||||
private performanceAnalyzer!: PerformanceAnalyzer;
|
||||
private microstructures: Map<string, MarketMicrostructure> = new Map();
|
||||
private container: IServiceContainer;
|
||||
private runId: string | null = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue