add backtest report UI to the Track Record tab
Deploy / lint (push) Successful in 5s
Deploy / test (push) Successful in 36s
Deploy / deploy (push) Successful in 23s

New BacktestPanel: shows qualified hit-rate/expectancy vs the all-setups baseline,
a by-direction breakdown, and the probability calibration table (predicted vs
realized, over-confident buckets flagged amber). Includes a "Run backtest" button
that triggers the job and a plain explanation of the method and its limits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 20:16:12 +02:00
parent 6df67ad7ae
commit b00e482258
6 changed files with 256 additions and 2 deletions
+30
View File
@@ -179,6 +179,36 @@ export interface SentimentProviderConfig {
custom_base_url_providers: string[];
}
export interface BacktestBucket {
total: number;
wins: number;
losses: number;
expired: number;
hit_rate: number | null;
avg_r: number | null;
total_r: number | null;
}
export interface BacktestCalibrationRow {
bucket: string;
n: number;
predicted_avg: number;
realized_hit_rate: number;
}
export interface BacktestReport {
generated_at: string;
tickers: number;
candidates: number;
qualified: number;
params: { step_days: number; horizon_days: number; min_lookback: number };
overall_qualified: BacktestBucket;
overall_all: BacktestBucket;
by_direction: Record<string, BacktestBucket>;
calibration: BacktestCalibrationRow[];
note: string;
}
export interface MarketRegime {
label: 'bullish' | 'bearish' | 'neutral' | 'unknown';
benchmark?: string;