It’s late, you’ve had a long day, and the last thing you want to think about is the chaotic, noisy mess of the stock market. But what if the reason the market looks like noise is simply because we’re reading the "spreadsheet" of data the wrong way?
In a new paper titled FToken, researchers from Harvard and Duke Kunshan University suggest that to predict stock returns, we shouldn't just look at stocks—we should look at the factors that drive them as the primary units of information.
TL;DR
FToken is a Transformer-based model that treats market "factors" (like volatility or momentum) as individual tokens, allowing the model to learn how these factors interact across the entire market. By combining this "factor-first" view with a traditional "stock-first" view through a smart, market-aware gate, the researchers achieved significantly higher prediction accuracy and portfolio returns across major indices like the NASDAQ and S&P 500.
What Problem Does This Paper Address?
Imagine a giant grid representing a single trading day. Each row is a stock (Apple, Tesla, etc.), and each column is a factor (Price-to-Earnings ratio, 10-day momentum, etc.).
Most modern AI models in finance are "row-readers." They treat each stock as a token and try to figure out how one stock relates to another. While powerful, this makes it surprisingly hard for the model to see the "big picture" of a specific factor. If "Volatility" is behaving weirdly across the whole market, a row-reading model has to piece that together from thousands of individual stock profiles.
The authors ask: What if we read the columns instead? By treating an entire column—the values of one factor across all stocks—as a single token, can we capture a different, complementary signal about where the market is headed?
Methods
The core of the paper is the FToken architecture, which uses a "dual-axis" approach.
- The Factor Branch (The Novelty): This branch transposes the data. It embeds each factor column into a token. It then uses self-attention to let these factors "talk" to each other. Finally, a learned decoder maps these factor-level insights back down to individual stock predictions.
- The Stock Branch (The Standard): A traditional Transformer branch that attends across stocks in the same panel.
- The Regime Gate: This is the "brain" that combines the two branches. It doesn't just average them; it looks at the Trailing Market State—things like 60-day factor covariance (how factors are moving together) and 20-day market volatility. If the market is in a specific "regime," the gate might decide to trust the factor branch more than the stock branch.
Datasets
The researchers put FToken through its paces on three major US benchmarks:
- NASDAQ, NYSE, and S&P 500.
- They tested two "tiers" of data:
- Native 5-feature tier: Basic price and volume data.
- 158-factor tier: A more complex set of engineered features (Alpha158 from the Qlib library), including various moving averages and price-volume ratios.
Key Insights and Ideas
- The "Diversity" Benefit: The most striking finding is that the errors made by the factor branch are very different from those made by the stock branch. Their "residual correlation" is only 0.54, whereas two different stock-axis models have a correlation of 0.82. In ensemble learning, diversity is king—combining two models that fail in different ways leads to a much stronger whole.
- Factors as Market "Subspaces": The factor branch effectively learns the geometry of the market. It sees how the "space" of factors is stretching or compressing, which provides a "macro" view that individual stock tokens often miss.
- Regime Sensitivity: The gate isn't just a gimmick. The authors found that when a few factors start dominating the market's variance (high covariance concentration), the gate correctly shifts more weight to the factor branch.
Key Results
FToken consistently outperformed strong baselines (like DoubleEnsemble and StockMixer) in terms of the Information Coefficient (IC)—a standard measure of how well predicted returns correlate with actual returns.
- NASDAQ (158-factor): The gated FToken reached an IC of 0.0443, significantly higher than the strongest external baseline of 0.0392.
- Profitability: On the NASDAQ, the gated model delivered an annualized excess return of 8.42% after transaction costs.
- Risk-Adjusted Returns: While the gated model had the highest raw returns, an equal-weight version of the two branches actually provided the best Information Ratio (1.34), suggesting a smoother ride for investors.
Limitations and Future Work
- Fixed Universes: The "dense" version of the factor decoder requires a fixed list of stocks. If you want to add a new stock that just went public, the current implementation would struggle without re-training or using a more flexible "stock-query" readout (which the authors did test, but found slightly less performant).
- Survivorship Bias: The benchmarks used are "pre-filtered" for stocks with long histories. Real-world performance might vary when dealing with the "messier" reality of stocks that delist or IPO frequently.
- Execution Costs: While they included a 5-basis-point transaction cost, real-world "slippage" (the price moving against you as you try to buy) can be much higher for smaller stocks, which might eat into those excess returns.
In short, FToken suggests that in the high-stakes game of market prediction, it pays to look at the world from a different angle—literally. By transposing the data and treating factors as the primary tokens, we can find signals that were hidden in plain sight.
Summary updated