01 / PROBLEM STATEMENT
Why this work exists
Market discussion is noisy, high-dimensional, and weakly labelled. This case study investigates unusual StockTwits language and activity around the GameStop event without presenting anomalies as trading signals.
Data and source material
- Up to 100 GME posts from a Kaggle dataset with StockTwits API fallback
- GME prices from Yahoo Finance for January–February 2021
- Text plus sentiment, extreme-term, length, and posting-hour metadata
02 / SOLUTION OVERVIEW
From input to usable output
Normalize text, combine 768D embeddings with metadata, reduce dimensions and score anomalies.
- 01
Normalize financial social text
- 02
Generate 768-dimensional BERTweet embeddings
- 03
Append four metadata signals into a 772-dimensional representation
- 04
Reduce to 50 principal components
- 05
Score posts with Isolation Forest and aggregate daily diagnostics
03 / TECHNICAL ARCHITECTURE
Implemented components
Messages + prices → preprocessing → 772D representation → PCA(50) → anomalies
04 / METHODOLOGY & IMPLEMENTATION
Decisions that shape the system
- The first-token hidden state from vinai/bertweet-base supplies contextual embeddings.
- PCA reduces the combined representation before Isolation Forest scoring.
- The entry point uses 200 trees and 0.1 contamination; the notebook uses 0.05, exposing sensitivity to that assumption.
- Four selected GameStop dates provide a heuristic comparison rather than true labels.
Implemented capabilities
- Kaggle/API fallback
- Financial-text normalization
- BERTweet embeddings
- PCA + Isolation Forest
- Daily diagnostics
05 / RESULTS & EVIDENCE
What the source supports
- The repository provides a reproducible six-stage GME investigation and daily anomaly visualizations.
- No causal, predictive, or trading-performance result is claimed.
Results preserve the repository’s units, evaluation framing, and stated limitations. Missing evidence is not converted into a claim.
06 / CHALLENGES & LIMITATIONS
Where the evidence stops
- Four hand-selected dates are not a rigorously labelled anomaly dataset.
- The executable case study is fixed to GME and a small 100-post run.
- Contamination sets the expected anomaly share; outliers do not establish causality or forecast returns.
07 / WHAT THIS DEMONSTRATES
Engineering signal
Transformer inference, mixed text/metadata representations, dimensionality reduction, unsupervised detection, and explicit separation between anomaly and prediction.
08 / SOURCE & RELATED WORK
Trace the evidence
28431a121324b2d71d31d0d465fd519695a2df58 ↗README.md · notebooks/anomaly_detection.ipynb · src/