Multi-ticker historical backtests: ticker filter + per-coin grouping
- Historical cards now deduplicated by strategy+ticker (28 entries: 7×4) - Ticker filter bar: ALL | BTC | ETH | HYPE | VVV - Coin badge on each card - BacktestSummary.coin now required string field - fetchHistorical groups by strategy · coin composite key
This commit is contained in:
@@ -82,7 +82,8 @@ export async function fetchHistorical(): Promise<Record<string, import("./types"
|
||||
const list: import("./types").BacktestSummary[] = await res.json();
|
||||
const byStrat: Record<string, import("./types").BacktestSummary> = {};
|
||||
for (const b of list) {
|
||||
if (!byStrat[b.strategy]) byStrat[b.strategy] = b;
|
||||
const key = `${b.strategy} · ${b.coin ?? "?"}`;
|
||||
if (!byStrat[key]) byStrat[key] = b;
|
||||
}
|
||||
return byStrat;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ export interface BacktestSummary {
|
||||
max_dd: number;
|
||||
win_rate: number;
|
||||
total_trades: number;
|
||||
coin?: string;
|
||||
coin: string;
|
||||
}
|
||||
|
||||
export interface BacktestFull {
|
||||
|
||||
Reference in New Issue
Block a user