<code-root>/fundamentals_nq.py:182: RuntimeWarning: divide by zero encountered in matmul
  se = np.sqrt((resid @ resid / (n - 2)) / sxx)
<code-root>/fundamentals_nq.py:182: RuntimeWarning: overflow encountered in matmul
  se = np.sqrt((resid @ resid / (n - 2)) / sxx)
<code-root>/fundamentals_nq.py:182: RuntimeWarning: invalid value encountered in matmul
  se = np.sqrt((resid @ resid / (n - 2)) / sxx)
<code-root>/fundamentals_nq.py:237: UserWarning: This pattern is interpreted as a regular expression, and has match groups. To actually get the groups, use str.extract.
  t1 = cal[cal["event"].str.contains(TIER1, case=False, regex=True, na=False)]
Loading calendar and NQ price history...
calendar rows: 42089   NQ sessions: 4033  (2010-06-07 -> 2026-08-25)
classified pre-open events w/ est+act: 1755 across 1068 dates
sessions with a composite surprise: 909

==========================================================================================
PRIMARY — OLS ret_rth ~ signed_z (pre-open composite), 2016-2026, bar |t| > 3.0
==========================================================================================
  n = 909   slope = -10.20 bps per 1sd surprise   t = -3.03
  >>> PRIMARY PASS
        ret_5m: slope   -0.53 bps  t  -0.80  n 909
       ret_15m: slope   -0.55 bps  t  -0.53  n 908
       ret_rth: slope  -10.20 bps  t  -3.03  n 909
  robustness (full-sample sigma, as shipped script): slope -9.77 t -2.66

==========================================================================================
SECONDARY 4 — is it tradable? sign(signed_z) traded at the open, exit 15:59
==========================================================================================
  n=797  hit=48.2%  gross=-1.88 bps t=-0.45
  net of 1.0 pt: -2.82 bps  t=-0.67  (cost avg 0.94 bps)

==========================================================================================
SECONDARY 1 — event-day effect (Savor-Wilson analogue), 2016-2026
==========================================================================================
   ret_rth: event n= 728 mean=  +0.41 | non-event n=1923 mean=  +4.13 | diff=  -3.72 t=-0.76
   ret_c2c: event n= 728 mean=  +4.14 | non-event n=1923 mean=  +9.38 | diff=  -5.24 t=-0.83
  (event days = 728 of 2651 sessions)

==========================================================================================
SECONDARY 2 — pre-announcement drift: overnight into a tier-1 release
==========================================================================================
  ret_preopen on event days n= 477 mean= +6.99 bps t=+1.76
  ret_preopen other days   n=1634 mean= +4.42 bps t=+2.40
  difference +2.57 bps  t=+0.58
  FOMC-day pre-open (Lucca-Moench window analogue): n=82 mean=+26.02 t=+3.59

==========================================================================================
SECONDARY 3 — per-family slope on ret_rth (which single release moves the session)
==========================================================================================
        family     n     slope       t
  core_cpi_mom   112    +14.14   +1.61   econSign=-1
       cpi_mom   153     +7.34   +1.36   econSign=-1
  core_pce_mom    84    -10.68   -0.98   econSign=-1
       pce_mom    67    -10.43   -0.64   econSign=-1
       ppi_mom   133     -3.22   -0.56   econSign=-1
    retail_mom   135    -12.98   -2.47   econSign=+1
   durable_mom   101    +17.90   +1.63   econSign=+1
        claims   502     +2.51   +4.20 *   econSign=-1
           nfp   101     +4.21   +1.65   econSign=+0
         unemp   143     -7.20   -2.02   econSign=+0

==========================================================================================
SECONDARY 5 — ADMINISTRATION (descriptive only; n=4 regimes, fully confounded)
==========================================================================================
     admin  sessions   meanRTH       t  evDayRTH    slope       t  nSurp
  Obama-II      1645     +2.23   +1.06     +4.33    +6.84   +1.72     58
   Trump-I       992     +3.54   +1.05     +2.82   -15.25   -4.32    352
     Biden       998     +2.52   +0.67     +2.89    -7.09   -0.16    364
  Trump-II       398     +2.77   +0.47    -11.21    +1.50   +0.07    135
  NOTE: administration is collinear with the Fed cycle, inflation regime, COVID and the
        mega-cap AI trend. These are era descriptions, not causal estimates.

==========================================================================================
SECONDARY 6 — stability of the primary
==========================================================================================
  IS  (<2020): n=  313 slope=  -0.13 t= -0.04
  OOS (>=2020): n=  596 slope= -25.09 t= -4.28
    2016: n=  53 slope=   +6.53 t= +1.51
    2017: n=  86 slope=   +0.07 t= +0.02
    2018: n=  88 slope=   +1.16 t= +0.11
    2019: n=  86 slope=  -12.22 t= -2.13
    2020: n=  93 slope=  -26.60 t= -4.12
    2021: n=  95 slope=  +28.84 t= +0.59
    2022: n=  92 slope=  -55.57 t= -0.38
    2023: n=  89 slope=  -65.95 t= -0.71
    2024: n=  87 slope=  -26.65 t= -0.29
    2025: n=  78 slope=  +60.52 t= +0.77
    2026: n=  62 slope=   -2.21 t= -0.09
  years with positive slope: 5/11

==========================================================================================
VERDICT
==========================================================================================
  H1 primary |t|>3.0 ............ PASS  (t=-3.03)
  H1 tradable after cost ....... FAIL  (t=-0.67)
