diff --git a/frontend/src/components/signals/BacktestPanel.tsx b/frontend/src/components/signals/BacktestPanel.tsx index 264533f..58f2808 100644 --- a/frontend/src/components/signals/BacktestPanel.tsx +++ b/frontend/src/components/signals/BacktestPanel.tsx @@ -181,7 +181,10 @@ export function BacktestPanel() { - {report.sweep && report.sweep.length > 0 && ( + {/* Guard on the new field so a stale cached report (pre-momentum, + with min_expected_value rows) hides the sweep instead of crashing + the whole page. Re-running the backtest repopulates it. */} + {report.sweep && report.sweep.length > 0 && report.sweep[0].min_momentum_percentile != null && (
Momentum-percentile sweep