News-article impact model · experimental

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 significance○ Direction · significant reactions
0.00.10.20.30.40.50.60.70.80.91.0Chance · 0.5005 min30 min2 hours1 day
5 min: impact 0.663 · direction 0.522

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.

Reported chronological test set · 30,947 examples; available labels vary by horizon
HorizonImpact ROC-AUCDirection ROC-AUC
5 min0.6630.522
30 min0.6470.527
2 hours0.6160.483
1 day0.5800.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.

Dataset construction · article to supervised example
  1. News article + targetNormalize article text, identify the target company, retain publication time and time precision.
  2. Pre-publication contextAdjusted stock and SPY prices supply backward returns and trailing abnormal volatility.
  3. Reaction windowsMeasure stock-minus-SPY log returns over 5m, 30m, 2h, and 1d where timestamps and prices permit.
  4. Scale and maskScale returns by prior expected volatility. Mask contaminated or unavailable horizon labels.
  5. Chronological splitsTrain → validation → test. Build the asset map and feature normalization from training rows only.
  6. 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.

Current label-window rules
Publication timingAvailable targetsReturn window
Exact time during regular hours5m / 30m / 2h / 1d, subject to price availabilityIntraday windows start at publication; 1d ends at the same Eastern clock time on the next trading day.
Exact premarket time1d onlyThat trading session’s open to close.
After hours, weekend, or date only1d onlyNext 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,h

Horizon 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.

-1σ0σ1σ
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.

Six tensors consumed by model.forward
TensorDtypeShapeMeaning
input_idsint64[B, L]Tokenized target company, symbol, time precision, title, and article content; L ≤ 1,024 in the reported experiment.
attention_maskbool[B, L]True for non-padding tokens; also used for masked mean pooling.
asset_idint64[B]Training-set asset index. Index 0 is reserved for assets unseen during training.
event_type_idint64[B]Event-category embedding index; news = 1 in the current vocabulary.
market_featuresfloat32[B, 5]Five pre-event features, normalized with training-set means and standard deviations. Missing values become zero.
market_feature_maskbool[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

  1. pre_event_abnormal_return_5m
  2. pre_event_abnormal_return_30m
  3. pre_event_abnormal_return_2h
  4. pre_event_abnormal_return_1d
  5. pre_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.

Combined model · tensor flow
Article tokens[B, L]ModernBERT-large[B, L, 1024]Masked mean pooling[B, 1024]
Asset index[B]Asset embedding[B, 64]
Event category[B]Event embedding[B, 16]
Market values + mask[B, 10]LayerNorm → Linear → GELU[B, 32]
Concatenate [B, 1136]LayerNorm → Linear(1136, 256) → GELU → Dropout(0.1)Shared representation [B, 256]
impact_significanceLinear(256, 4) → [B, 4]
directionLinear(256, 4) → [B, 4]
magnitudeLinear(256, 4) → [B, 4]
Three output tensors · floating point, exported as float32 at inference
TensorShapeInterpretation
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 targetDtype / shapeUse
targetsfloat32 [B, 4]Signed realized scaled abnormal returns z.
target_maskbool [B, 4]Available, retained horizons.
impact_significancebool [B, 4]|z| ≥ 1; class-weighted binary cross-entropy with logits.
direction / direction_maskbool [B, 4] eachz > 0 / available AND significant. Binary cross-entropy only on this subset.
magnitudefloat32 [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_magnitude

ModernBERT-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.

Reported test loss · lower is better
Input modeLoss
Combined1.268
Structured only1.276
Text only1.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.