Summary
EventFeatures.calculate sets all three output columns (days_to_earnings, days_to_fomc, days_to_opex) to single scalar constants across the entire date range. The final standardization loop then calls minmax on each constant column: (x - min) / (max - min) = 0 / 0 = NaN. All three event feature columns become all-NaN, infecting 3 of the 48 dimensions fed to RegimeDetector.
Evidence
src/features/regime_features.py lines 574-580: constants 30.0, 21.0, 10.0 assigned to all rows.
src/features/regime_features.py lines 583-584:
for col in features.columns:
features[col] = self.standardize(features[col], method='minmax')
minmax on constant series → division by zero → NaN for every row.
Fix
Skip standardization for constant columns (check series.nunique() <= 1), or return the raw values without standardizing. The real fix is to implement actual event detection (earnings calendar, FOMC dates) so the columns are not constant.
Summary
EventFeatures.calculatesets all three output columns (days_to_earnings,days_to_fomc,days_to_opex) to single scalar constants across the entire date range. The final standardization loop then callsminmaxon each constant column:(x - min) / (max - min)=0 / 0=NaN. All three event feature columns become all-NaN, infecting 3 of the 48 dimensions fed toRegimeDetector.Evidence
src/features/regime_features.pylines 574-580: constants30.0,21.0,10.0assigned to all rows.src/features/regime_features.pylines 583-584:minmaxon constant series → division by zero → NaN for every row.Fix
Skip standardization for constant columns (check
series.nunique() <= 1), or return the raw values without standardizing. The real fix is to implement actual event detection (earnings calendar, FOMC dates) so the columns are not constant.