research: sector residual, earnings gap/SUE, history-depth scaffolding

Tier-1 alpha research (local only, no production deploy):

Sector residual momentum: two-factor SPY+sector residual and sector demean signals, IC harness + A/B. Sector resid clears pre-registered bars narrowly (PROMOTE for human wire design only). Sector demean fails t vs market resid.

Earnings: earnings_events backfill (FMP bulk paid; FMP/AV per-symbol), 2a gap diagnostic report-only, 2b SUE IC (PARK; incomplete 48/506 coverage).

History-depth: pre-registered doc + runner for MacBook deep rebuild/harness.

Do not ship production residual or filters from this branch.
This commit is contained in:
2026-07-19 09:33:34 +02:00
parent 8f285acb00
commit fa25b6ee68
18 changed files with 6093 additions and 25 deletions
@@ -0,0 +1,412 @@
{
"generated_at": "2026-07-19T08:33:56.651229",
"snapshot_guard": {
"snapshot": "C:\\Workspace\\signal-platform\\backtest_snapshots\\prod.sqlite",
"manifest": null,
"manifest_ok": null,
"note": "No completion manifest (prod.sqlite is expected without one). Bar-count sanity still applied.",
"ticker_count": 506,
"ohlcv_row_count": 629263,
"bars_min_avg_max": {
"min": 14,
"avg": 1246.1,
"max": 1261
},
"ohlcv_date_range": {
"min": "2021-06-24",
"max": "2026-07-02"
},
"benchmark_prices": [
{
"symbol": "SPY",
"n": 1516,
"min": "2020-07-06",
"max": "2026-07-17"
},
{
"symbol": "XLB",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
},
{
"symbol": "XLC",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
},
{
"symbol": "XLE",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
},
{
"symbol": "XLF",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
},
{
"symbol": "XLI",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
},
{
"symbol": "XLK",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
},
{
"symbol": "XLP",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
},
{
"symbol": "XLRE",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
},
{
"symbol": "XLU",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
},
{
"symbol": "XLV",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
},
{
"symbol": "XLY",
"n": 1512,
"min": "2020-07-10",
"max": "2026-07-17"
}
],
"missing_sector_etfs": []
},
"sector_coverage": {
"universe": 506,
"mapped": 505,
"mapped_pct": 99.8,
"with_etf": 505,
"missing": [
"RHM"
],
"by_sector": {
"Industrials": 81,
"Financials": 75,
"Information Technology": 72,
"Health Care": 58,
"Consumer Discretionary": 47,
"Consumer Staples": 34,
"Real Estate": 31,
"Utilities": 31,
"Materials": 26,
"Communication Services": 23,
"Energy": 22,
"Consumer Defensive": 2,
"Technology": 2,
"Financial Services": 1
}
},
"sector_map_path": "C:\\Workspace\\signal-platform\\data\\research\\ticker_sector_map.json",
"signal_eval": [
{
"signal": "vol_6m",
"weeks": 39,
"avg_cross_section": 498.2,
"mean_ic": 0.0609,
"ic_t_stat": 1.48,
"ic_positive_pct": 64.1,
"mean_quintile_spread": 0.0337,
"reliable": true
},
{
"signal": "mom_12_1_sector_resid",
"weeks": 35,
"avg_cross_section": 497.7,
"mean_ic": 0.0578,
"ic_t_stat": 2.34,
"ic_positive_pct": 65.7,
"mean_quintile_spread": 0.0245,
"reliable": true
},
{
"signal": "mom_12_1_resid",
"weeks": 35,
"avg_cross_section": 497.7,
"mean_ic": 0.0552,
"ic_t_stat": 1.98,
"ic_positive_pct": 60.0,
"mean_quintile_spread": 0.0207,
"reliable": true
},
{
"signal": "mom_12_1",
"weeks": 35,
"avg_cross_section": 497.7,
"mean_ic": 0.0531,
"ic_t_stat": 1.61,
"ic_positive_pct": 65.7,
"mean_quintile_spread": 0.0206,
"reliable": true
},
{
"signal": "mom_12_1_sector_demeaned",
"weeks": 35,
"avg_cross_section": 496.7,
"mean_ic": 0.034,
"ic_t_stat": 1.32,
"ic_positive_pct": 62.9,
"mean_quintile_spread": 0.0154,
"reliable": true
},
{
"signal": "trend_200",
"weeks": 37,
"avg_cross_section": 497.9,
"mean_ic": 0.0161,
"ic_t_stat": 0.44,
"ic_positive_pct": 59.5,
"mean_quintile_spread": 0.006,
"reliable": true
},
{
"signal": "reversal_1m",
"weeks": 43,
"avg_cross_section": 498.7,
"mean_ic": 0.0059,
"ic_t_stat": 0.22,
"ic_positive_pct": 53.5,
"mean_quintile_spread": 0.0053,
"reliable": true
},
{
"signal": "mom_6_1",
"weeks": 39,
"avg_cross_section": 498.2,
"mean_ic": 0.0051,
"ic_t_stat": 0.21,
"ic_positive_pct": 56.4,
"mean_quintile_spread": 0.0087,
"reliable": true
},
{
"signal": "mom_3_1",
"weeks": 42,
"avg_cross_section": 498.5,
"mean_ic": -0.0064,
"ic_t_stat": -0.25,
"ic_positive_pct": 50.0,
"mean_quintile_spread": 0.0046,
"reliable": true
},
{
"signal": "high_52w",
"weeks": 35,
"avg_cross_section": 497.7,
"mean_ic": -0.0086,
"ic_t_stat": -0.26,
"ic_positive_pct": 54.3,
"mean_quintile_spread": -0.0088,
"reliable": true
},
{
"signal": "fip_id",
"weeks": 35,
"avg_cross_section": 497.7,
"mean_ic": -0.045,
"ic_t_stat": -2.91,
"ic_positive_pct": 25.7,
"mean_quintile_spread": -0.0168,
"reliable": true
}
],
"ic_grades": {
"mom_12_1_sector_resid": {
"promote_to_ab": true,
"checks": {
"sign_ok": true,
"abs_mean_ic_ge_0_03": true,
"reliable": true,
"t_ge_resid": true,
"mean_ic": 0.0578,
"ic_t_stat": 2.34,
"resid_ic_t_stat": 1.98,
"weeks": 35
},
"reason": "clears iron rule and t \u2265 mom_12_1_resid \u2014 authorized for A/B only",
"row": {
"signal": "mom_12_1_sector_resid",
"weeks": 35,
"avg_cross_section": 497.7,
"mean_ic": 0.0578,
"ic_t_stat": 2.34,
"ic_positive_pct": 65.7,
"mean_quintile_spread": 0.0245,
"reliable": true
}
},
"mom_12_1_sector_demeaned": {
"promote_to_ab": false,
"checks": {
"sign_ok": true,
"abs_mean_ic_ge_0_03": true,
"reliable": true,
"t_ge_resid": false,
"mean_ic": 0.034,
"ic_t_stat": 1.32,
"resid_ic_t_stat": 1.98,
"weeks": 35
},
"reason": "does not clear pre-registered IC promotion bar",
"row": {
"signal": "mom_12_1_sector_demeaned",
"weeks": 35,
"avg_cross_section": 496.7,
"mean_ic": 0.034,
"ic_t_stat": 1.32,
"ic_positive_pct": 62.9,
"mean_quintile_spread": 0.0154,
"reliable": true
}
}
},
"portfolio_ab": {
"signal": "mom_12_1_sector_resid",
"ranking_key": "residual_high_vol_blend_80_20_score",
"fill_mode": "close",
"validation_split": "2024-07-01",
"control": {
"label": "control_mom_12_1_resid",
"n_qualified_longs": 1086,
"windows": {
"train": {
"sharpe": 1.3,
"sharpe_se": 0.685,
"cagr_pct": 29.2,
"max_drawdown_pct": 21.4,
"total_return_pct": 70.9,
"trades": 176,
"win_rate_pct": null,
"avg_r": null,
"n_returns": 525,
"return_skew": 0.3722,
"return_kurtosis": 4.6208,
"psr": 0.971
},
"validation": {
"sharpe": 2.92,
"sharpe_se": 0.709,
"cagr_pct": 76.3,
"max_drawdown_pct": 11.7,
"total_return_pct": 210.7,
"trades": 150,
"win_rate_pct": null,
"avg_r": null,
"n_returns": 501,
"return_skew": 0.1734,
"return_kurtosis": 4.4625,
"psr": 1.0
},
"full": {
"sharpe": 2.09,
"sharpe_se": 0.497,
"cagr_pct": 51.6,
"max_drawdown_pct": 21.4,
"total_return_pct": 424.6,
"trades": 322,
"win_rate_pct": null,
"avg_r": null,
"n_returns": 1000,
"return_skew": 0.2686,
"return_kurtosis": 4.5653,
"psr": 1.0
}
}
},
"treatment": {
"label": "treatment_mom_12_1_sector_resid",
"n_qualified_longs": 1210,
"windows": {
"train": {
"sharpe": 1.57,
"sharpe_se": 0.677,
"cagr_pct": 35.5,
"max_drawdown_pct": 19.8,
"total_return_pct": 90.0,
"trades": 176,
"win_rate_pct": null,
"avg_r": null,
"n_returns": 530,
"return_skew": 0.466,
"return_kurtosis": 4.4413,
"psr": 0.99
},
"validation": {
"sharpe": 2.57,
"sharpe_se": 0.701,
"cagr_pct": 66.3,
"max_drawdown_pct": 14.8,
"total_return_pct": 176.4,
"trades": 163,
"win_rate_pct": null,
"avg_r": null,
"n_returns": 501,
"return_skew": 0.3003,
"return_kurtosis": 4.4305,
"psr": 0.9999
},
"full": {
"sharpe": 2.09,
"sharpe_se": 0.491,
"cagr_pct": 51.0,
"max_drawdown_pct": 19.8,
"total_return_pct": 421.3,
"trades": 337,
"win_rate_pct": null,
"avg_r": null,
"n_returns": 1005,
"return_skew": 0.4066,
"return_kurtosis": 4.3627,
"psr": 1.0
}
}
},
"promotion": {
"promote": true,
"checks": {
"validation_sharpe_ge_control_minus_half_se": true,
"full_sharpe_not_worse": true,
"full_maxdd_not_worse": true,
"control_validation_sharpe": 2.92,
"treatment_validation_sharpe": 2.57,
"se_used": 0.701,
"control_full_sharpe": 2.09,
"treatment_full_sharpe": 2.09,
"control_full_maxdd": 21.4,
"treatment_full_maxdd": 19.8
},
"reason": "clears pre-registered A/B bar \u2014 human decides wire-in"
}
},
"verdict": "PROMOTE",
"verdict_detail": "mom_12_1_sector_resid cleared IC + A/B bars. Human must design wire-in; do not ship from this branch.",
"human_next": "- Approve or reject production residual swap vs dual-signal design.\n- If sector-cap arm ran, review tail-trim diagnostics before any cap.",
"report_path": "reports/sector-residual-20260719-083356.json",
"pre_registration": {
"iron_ic_bar": 0.03,
"validation_split": "2024-07-01",
"fill_mode": "close",
"cost_per_side": 0.001,
"ab_rule": "val Sharpe >= control - 0.5*SE; full Sharpe & maxDD not worse"
}
}