CatalystBERT-v1
A model that reads a news article about a specific company and estimates the significance, direction, and magnitude of the subsequent stock-price reaction relative to SPY.
V1 uses news articles. Its text input is the target company, article title, and article body, paired with market context available before publication. It is not a generic sentiment classifier. The broader platform also collects SEC filings, but the results below are a news experiment, not evidence of filing-model performance.
Test results by reaction horizon
Impact significance ranks whether a reaction is large relative to expected volatility. Direction ranks positive versus negative returns among significant reactions. These are separate tasks.
Impact AUC is 0.163 above the chance reference. Direction is 0.022 relative to chance. AUC measures ranking, not the percentage of correct predictions or a trading return.
| Horizon | Impact ROC-AUC | Direction ROC-AUC |
|---|---|---|
| 5 min | 0.663 | 0.522 |
| 30 min | 0.647 | 0.527 |
| 2 hours | 0.616 | 0.483 |
| 1 day | 0.580 | 0.496 |
Impact ranking is strongest at shorter horizons; direction remains near chance. The aggregate scores do not show calibration, confidence intervals, or subgroup performance.
Data & methodology
One example represents an article–target-company pair. The same article can have different implications for different companies. Publication timing determines which return windows can be labeled; future prices create training targets and are never inference inputs.
- News article + targetNormalize article text, identify the target company, retain publication time and time precision.
- Pre-publication contextAdjusted stock and SPY prices supply backward returns and trailing abnormal volatility.
- Reaction windowsMeasure stock-minus-SPY log returns over 5m, 30m, 2h, and 1d where timestamps and prices permit.
- Scale and maskScale returns by prior expected volatility. Mask contaminated or unavailable horizon labels.
- Chronological splitsTrain → validation → test. Build the asset map and feature normalization from training rows only.
- Batch and trainPreserve target/title tokens; pad variable article lengths. Optimize three masked prediction tasks.
Article sources and timing
The current builder defaults to Benzinga, Finnhub, and Yahoo. Historical Google News is opt-in because manual review found false target matches for common-word tickers.
| Publication timing | Available targets | Return window |
|---|---|---|
| Exact time during regular hours | 5m / 30m / 2h / 1d, subject to price availability | Intraday windows start at publication; 1d ends at the same Eastern clock time on the next trading day. |
| Exact premarket time | 1d only | That trading session’s open to close. |
| After hours, weekend, or date only | 1d only | Next shared stock/SPY trading session’s open to close. Unknown times are not assigned intraday labels. |
Intraday endpoints use the latest completed minute-bar close, rejecting endpoint prices more than five minutes stale. Daily volatility is the sample standard deviation of up to 20 prior daily stock-minus-SPY log returns, requiring at least 10 valid observations.
Connecting article labels to market returns
r_abnormal,h = ln(P_stock,end / P_stock,start) − ln(P_SPY,end / P_SPY,start)σ_expected,h = σ_prior daily abnormal × √(minutes_h / 390)z_h = r_abnormal,h / σ_expected,hHorizon minutes are [5, 30, 120, 390]. A scaled return of +1 means a positive abnormal move of one expected volatility, not a 1% price return. Missing or nonpositive expected volatility makes a target unavailable. SPY adjustment removes its observed log return; this is not a beta-adjusted asset-pricing alpha estimate.
Return-to-label illustration
Hypothetical inputs, not a real article or model prediction. Adjust interval returns and prior daily volatility to see how the target for one horizon is constructed. The 1d illustration uses a 390-minute volatility scale.
- Abnormal log return
- 0.795%
- Expected horizon volatility
- 0.555%
- Scaled target z
- 1.434
- Significance target
- 1 · significant
- Direction target
- 1 · positive
- Magnitude loss target
- 0.889
The green region is |z| < 1. Classification targets describe realized reactions; they do not demonstrate that the article caused the move or that it could have been traded profitably.
Label quality and leakage controls
- Mask a horizon if another article for the same asset falls inside its reaction window.
- Mask 1d targets crossing a material price-adjustment factor change.
- By default, exclude 09:30–10:00 ET publications from impact training and mask horizons whose prior move reaches three expected volatilities.
- Carry a separate target mask per horizon. Missing targets are zero-filled for batching but excluded from losses and evaluation.
- Use chronological splits and an asset map derived only from final training rows. Unseen validation, test, and inference assets map to 0.
These controls reduce contamination; they do not prove causal attribution to an article. The cleaned pipeline has evolved since the reported experiment and still needs controlled reproduction.
Input and output tensors
The tables document the current combined-mode implementation associated with this v1 research. B is batch size; L is padded token length; F = 5 market features; the four horizon columns always follow [5m, 30m, 2h, 1d]. The reported experiment used batch size 1 and maximum L = 1,024. An archived checkpoint’s own configuration remains authoritative.
| Tensor | Dtype | Shape | Meaning |
|---|---|---|---|
input_ids | int64 | [B, L] | Tokenized target company, symbol, time precision, title, and article content; L ≤ 1,024 in the reported experiment. |
attention_mask | bool | [B, L] | True for non-padding tokens; also used for masked mean pooling. |
asset_id | int64 | [B] | Training-set asset index. Index 0 is reserved for assets unseen during training. |
event_type_id | int64 | [B] | Event-category embedding index; news = 1 in the current vocabulary. |
market_features | float32 | [B, 5] | Five pre-event features, normalized with training-set means and standard deviations. Missing values become zero. |
market_feature_mask | bool | [B, 5] | Availability mask distinguishes missing values from true normalized zeros. |
Text serialization
[TARGET] Target Company (SYMBOL) [TIME] datetime | date [TITLE] Article headline [CONTENT] Article body…
The prefix and article body are tokenized as a pair. Truncation applies only to the content sequence, preserving target and title. Four section tokens are added to the tokenizer and the encoder embedding vocabulary is resized accordingly. No token_type_ids tensor is passed.
Market-feature order
pre_event_abnormal_return_5mpre_event_abnormal_return_30mpre_event_abnormal_return_2hpre_event_abnormal_return_1dpre_event_volatility_20d
The 1d pre-event feature uses the prior market close; date-only articles use strictly prior daily context and have no intraday context. The feature vector and its availability mask are concatenated to [B, 10] before the market encoder.
[B, L]ModernBERT-large[B, L, 1024]Masked mean pooling[B, 1024][B]Asset embedding[B, 64][B]Event embedding[B, 16][B, 10]LayerNorm → Linear → GELU[B, 32]Shared representation [B, 256]Linear(256, 4) → [B, 4]Linear(256, 4) → [B, 4]Linear(256, 4) → [B, 4]| Tensor | Shape | Interpretation |
|---|---|---|
impact_significance | [B, 4] | Binary logits for |z| ≥ 1. Apply sigmoid to obtain significance scores. |
direction | [B, 4] | Binary positive-return logits; loss and reported direction metrics use significant, available reactions only. |
magnitude | [B, 4] | Unconstrained regression output trained against log(1 + |z|). Inference decodes expm1(max(output, 0)) into volatility units. |
Forward computation can use mixed precision; the inference adapter explicitly casts outputs to float32 before sigmoid and magnitude decoding. Sigmoid scores are not established calibrated probabilities. Magnitude is an absolute reaction in volatility units, not a direct price forecast.
Training targets and losses
| Batch target | Dtype / shape | Use |
|---|---|---|
targets | float32 [B, 4] | Signed realized scaled abnormal returns z. |
target_mask | bool [B, 4] | Available, retained horizons. |
impact_significance | bool [B, 4] | |z| ≥ 1; class-weighted binary cross-entropy with logits. |
direction / direction_mask | bool [B, 4] each | z > 0 / available AND significant. Binary cross-entropy only on this subset. |
magnitude | float32 [B, 4] | Batch stores |z|; loss transforms it to log1p(|z|) and applies Smooth L1 on available targets. |
L = L_significance + L_direction + 0.25 × L_magnitudeModernBERT-large
A bidirectional, encoder-only Transformer used here to encode article text, rather than generate text. ModernBERT-large has 395 million parameters and 28 layers, with a native context window up to 8,192 tokens. It uses rotary positional embeddings, alternating local/global attention, and unpadding; this implementation requests FlashAttention 2. Official model card.
The encoder configuration specifies a hidden width of 1,024. CatalystBERT mean-pools non-padding token embeddings and adds its own structured inputs and prediction heads. The experiment’s 1,024-token cap is substantially shorter than the encoder’s supported context window. These are distinct limits.
Reported experiment and limitations
catalystbert-expanded-v1-combined: 95,001 training, 30,445 validation, and 30,947 test examples. Three epochs; batch size 1; eight gradient-accumulation steps; learning rate 2e-5; seed 17. The checkpoint with lowest validation loss was evaluated on the chronological test split.
| Input mode | Loss |
|---|---|
| Combined | 1.268 |
| Structured only | 1.276 |
| Text only | 1.300 |
These aggregate ablations suggest a small combined-input improvement in the documented experiment; no confidence interval or significance test is available. The model’s direction scores do not support a directional trading claim. Magnitude quality, calibration, and downstream strategy value are not established by the available results.