feat(strategy): GNews guardrail — clamp news-only shifts to prior±0.25
Post-mortem NVIDIA 631181: one uncorroborated high-weight signal (legacy Manifold 0.13 at weight 0.6) flipped a 0.845 market to 0.431 and lost. With Manifold observational-only and macro signals gated behind is_non_price, GNews (weight 1.5) is the only live signal able to move politics markets 20-30 pp against the order-book consensus. This adds a catastrophic fuse, not a fine calibration: - apply_news_guardrail(): when |news_lo| >= NEWS_MATERIAL_LOGODDS_THRESHOLD (0.10) and every other signal (fg, mom, btc_dom, mfld) is below it, clamp the posterior to prior ± MAX_NEWS_ONLY_PROB_SHIFT (0.25). Any corroborating material signal disables the clamp. Config via env (NEWS_GUARDRAIL_ENABLED=true by default). - edge_gross/edge_net computed from the clamped posterior; raw_final_prob preserved in reasoning (persisted via trades.reasoning — no schema migration) and in the NEWS_MATERIAL log line. - guardrail_changed_trade_decision: raw edge crossed the regime gate but the clamped edge no longer does (fuse prevented a trade). Note: with the default 0.25 band the clamped edge_net is 0.21, above every regime minimum, so the flag only fires with a tighter configured band. - Observability gated on materiality: NEWS_MATERIAL per-market line and a compact NEWS SUMMARY cycle line, only when with_news > 0 — no flood from the ~145 news-less markets per cycle. - 9 deterministic tests (extreme clamp, in-band passthrough, corroboration, inclusive threshold, disabled, changed_decision). No changes to NEWS_LOGODDS_WEIGHT, Manifold flags, edge thresholds, sizing, payout, resolution, or historical trades. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
9e21ecac21
commit
7f84bc3ec7
+14
@@ -277,6 +277,20 @@ async def run_trading_loop(
|
||||
manifold_summary,
|
||||
)
|
||||
|
||||
# NEWS SUMMARY — one compact line, only on cycles where at least
|
||||
# one market had a material GNews contribution (never an empty
|
||||
# section on news-less cycles).
|
||||
if stats["news_with_material"] > 0:
|
||||
log.info(
|
||||
"NEWS SUMMARY | with_news=%d | avg_shift=%+.2f | "
|
||||
"max_shift=%+.2f | guardrail_applied=%d | changed_decisions=%d",
|
||||
stats["news_with_material"],
|
||||
stats["news_avg_shift"],
|
||||
stats["news_max_shift"],
|
||||
stats["news_guardrail_applied"],
|
||||
stats["news_changed_decisions"],
|
||||
)
|
||||
|
||||
# 9. Update daily metrics
|
||||
await metrics.update_daily_summary()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user