/** * Enhanced arb history statistics: exchange pair performance, * time-of-day analysis, and optimal hold time calculation. */ export interface ArbTradeForStats { symbol: string; exchanges: string; entryDate: string; exitDate: string | null; holdDurationMs: number; entrySpread: number | null; exitSpread: number | null; netReturn: number; status: "completed" | "open" | "failed"; } export interface ExchangePairPerf { pair: string; trades: number; winRate: number; avgNetPnl: number; avgHoldTime: string; avgHoldTimeMs: number; } export interface TimeOfDayPerf { bucket: string; trades: number; winRate: number; avgNetPnl: number; } export interface EnhancedHistoryStats { avgEntrySpread: number; avgExitSpread: number; avgSpreadDecay: number; byExchangePair: ExchangePairPerf[]; byTimeOfDay: TimeOfDayPerf[]; optimalHoldTime: string | null; optimalHoldTimeMs: number | null; } /** Normalize exchange pair string to a short abbreviation like "HL/PAC" */ export declare function normalizeExchangePair(exchanges: string): string; /** Get 4-hour UTC time bucket for a timestamp */ export declare function getTimeBucket(isoTimestamp: string): string; /** Compute enhanced statistics from a list of trades */ export declare function computeEnhancedStats(trades: ArbTradeForStats[]): EnhancedHistoryStats;