Skip to content

FOMC-RoBERTa stance scoring, point-in-time market pairing, dashboard filters - #1

Open
N041M wants to merge 1 commit into
mainfrom
stance-scoring-and-market-pairing
Open

FOMC-RoBERTa stance scoring, point-in-time market pairing, dashboard filters#1
N041M wants to merge 1 commit into
mainfrom
stance-scoring-and-market-pairing

Conversation

@N041M

@N041M N041M commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary of this branch:

NLP / stance scoring

  • Fix a silent FOMC-RoBERTa label inversion: the published model ships generic LABEL_0/1/2; indices are now resolved from the config with a documented fallback (label_0=dovish, label_1=hawkish). The old hardcoded order was backwards and would have flipped the sign of every stance score.
  • Score long speeches by chunking + token-weighted aggregation (like analyze_documents) instead of only the opening 512 tokens.
  • rescore_hawkish.py: snapshot the lexicon baseline, backfill sentiment_signal, print a lexicon-vs-model comparison.
  • analyze_hawkish_aggregation.py: report-only diagnostic over document-aggregation schemes.

Market pairing (replaces retired event_context)

  • features/market_response.py: relevance-aware, point-in-time pairing of each in-domain speech with the next-day move of the one market its speaker affects (no geography-blind 16x replication, no look-ahead).
  • Phase 1 Results tab migrated off the stale event_context window-attribution (fixes the spurious ±1 strips).
  • Scheduler no longer builds event_context.

Dashboard

  • Independent hide-neutral toggles (sentiment / stance) on both scatter charts and the Speech Browser; FOMC stance columns surfaced in the browser.

Tests: +test_market_response.py, +FOMC label-resolver tests. ruff clean, 118 passing.

…filters

NLP / stance scoring:
- pipeline.py: fix FOMC-RoBERTa label order — resolve hawk/dove indices from the
  model config with a documented fallback (the published config ships generic
  LABEL_0/1/2; the hardcoded order was inverted, which would have flipped the sign
  of every stance score). Chunk long speeches and token-weighted aggregate, like
  analyze_documents, instead of scoring only the opening 512 tokens.
- rescore_hawkish.py: snapshot the lexicon baseline before overwriting, backfill
  sentiment_signal.hawkish_score, and print a lexicon-vs-model comparison report.
- analyze_hawkish_aggregation.py: report-only diagnostic comparing document
  aggregation schemes (mean / stance-weighted / drop-neutral / max-abs / net-label).

Market pairing (replaces retired event_context):
- features/market_response.py: relevance-aware, point-in-time pairing of each
  in-domain speech with the next-day move of the one market its speaker affects
  (no geography-blind 16x replication, no look-ahead). Pure helpers unit-tested.
- analyze_habituation.py: share the abnormal-return computation (one source of truth).
- features/sequence.py: carry sentiment/hawkish labels through the event sequence.
- scheduler/jobs.py: stop building event_context (step9) on a schedule.

Dashboard:
- Migrate the Phase 1 Results tab off the stale event_context window-attribution
  onto the point-in-time pairing (fixes the spurious +/-1 strips).
- Independent hide-neutral toggles (by sentiment and by stance) on the Phase 1
  scatter, the Sentiment-over-time scatter, and the Speech Browser; surface the
  FOMC stance score/label columns in the browser.

Tests: +tests/test_market_response.py, +FOMC label-resolver tests. 118 passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant