Unify analytics calculations and fail closed on unavailable data
This commit is contained in:
parent
783b619846
commit
ccce401f72
31 changed files with 1978 additions and 1553 deletions
|
|
@ -27,7 +27,7 @@ export interface BacktestRunConfiguration {
|
|||
/** Return, drawdown, and win-rate metrics are fractions (0.10 = 10%). */
|
||||
export interface BacktestRunMetrics {
|
||||
totalReturn: number;
|
||||
sharpeRatio: number;
|
||||
sharpeRatio: number | null;
|
||||
maxDrawdown: number;
|
||||
winRate: number;
|
||||
/** Completed round trips; trades[] can contain fills or closed trades, identified by kind. */
|
||||
|
|
@ -87,7 +87,7 @@ export interface BacktestRunResult {
|
|||
drawdownSeries?: { timestamp: number; value: number }[];
|
||||
dailyReturns?: number[];
|
||||
monthlyReturns?: Record<string, number>;
|
||||
riskMetrics?: Record<string, number>;
|
||||
riskMetrics?: Record<string, number | null>;
|
||||
};
|
||||
executionTime: number;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue