This is your key results table — let's read it carefully.
Group Mean Spread Std Dev Count Normal months (Flag=0) +0.008 (0.8%) 0.106 44 Surprise months (Flag=1) −0.031 (−3.1%) 0.120 11
This is the opposite of what your hypothesis predicted.
Your original question expected: when CPI surprises to the upside, XLE should outperform XLK (positive spread). Instead, you're finding:
In normal months, XLE slightly beats XLK on average (+0.8%)
In surprise months (hot CPI), XLE actually underperforms XLK by 3.1% on average
This is a genuinely interesting finding — it contradicts the simple "inflation surprise → rotate into energy" story. A few honest possible explanations to discuss in your report:
Small sample — only 11 surprise months out of 55. One or two extreme observations could be swinging this a lot.
Tech resilience — in 2021–2025, mega-cap tech (driving XLK) may have been resilient to rate fears due to strong earnings, especially AI-driven names.
Energy-specific drivers — oil price swings (OPEC decisions, geopolitical shocks) may dominate XLE more than CPI surprises do.