1. High-Frequency Text as Event Alpha
Financial news streams (Bloomberg/Reuters) and curated institutional social feeds impact intraday price discovery within milliseconds. Institutional quant desks process millions of headlines per second via streaming transformer pipelines.
2. Event Entity Recognition & Sentiment Scoring
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
class InstitutionalNewsSentimentScorer:
"""
Real-Time FinBERT News & Headline Sentiment Scorer.
"""
def __init__(self, model_id: str = "ProsusAI/finbert"):
self.tokenizer = AutoTokenizer.from_pretrained(model_id)
self.model = AutoModelForSequenceClassification.from_pretrained(model_id)
self.model.eval()
@torch.no_grad()
def score_headline(self, headline: str) -> float:
inputs = self.tokenizer(headline, return_tensors="pt", truncation=True, max_length=64)
logits = self.model(**inputs).logits
probs = torch.softmax(logits, dim=-1)[0]
# net polarity = P(pos) - P(neg)
return float(probs[0] - probs[1])
3. Institutional Summary
- Exponential Decay Weighting: Headline sentiment alpha exhibits a 15-minute half-life; apply strict exponential time decay weighting $\exp(-\lambda \Delta t)$ when aggregating into trading signals.