When Valid Signals Fail: Regime Boundaries Between LLM Features and RL Trading Policies
Organizations: Independent Researcher
Abstract
Can large language models (LLMs) generate continuous numerical features that improve reinforcement learning (RL) trading agents? We build a modular pipeline where a frozen LLM serves as a stateless feature extractor, transforming unstructured daily news and filings into a fixed-dimensional vector consumed by a downstream PPO agent. We introduce an automated prompt-optimization loop that treats the extraction prompt as a discrete hyperparameter and tunes it directly against the Information Coefficient - the Spearman rank correlation between predicted and realized returns - rather than NLP losses. The optimized prompt discovers genuinely predictive features (IC above 0.15 on held-out data). However, these valid intermediate representations do not automatically translate into downstream task performance: during a distribution shift caused by a macroeconomic shock, LLM-derived features add noise, and the augmented agent under-performs a price-only baseline. In a calmer test regime the agent recovers, yet macroeconomic state variables remain the most robust driver of policy improvement. Our findings highlight a gap between feature-level validity and policy-level robustness that parallels known challenges in transfer learning under distribution shift.
Figures & tables
| Feature | Group | Mean | Std | Min | Max | % Non-zero | Scale |
|---|---|---|---|---|---|---|---|
| sentiment | LLM News | -0.007 | 0.290 | -1.000 | 0.900 | 71.8% | [-1, 1] |
| impact | LLM News | 0.292 | 0.233 | 0.000 | 1.000 | 71.9% | [0, 1] |
| conflicting_signals | LLM News | 0.076 | 0.182 | 0.000 | 1.000 | 18.5% | [0, 1] |
| news_novelty | LLM News | 0.737 | 0.424 | 0.000 | 1.000 | 77.9% | [0, 1] |
| market_sentiment | Market Regime | 0.175 | 0.405 | -1.000 | 0.800 | 98.7% | [-1, 1] |
| macro_event_flag | Market Regime | 0.481 | 0.500 | 0.000 | 1.000 | 48.1% | {0, 1} |
| Metric | Gate Threshold | Value | Status |
|---|---|---|---|
| signal_coverage | 0.408 | PASS | |
| ic_ir_5d | +0.104 | PASS | |
| quintile_spread | +0.002 | PASS | |
| hit_rate | 0.714 | PASS |
| Feature | Group | IC Mean | IC IR | -stat | % Pos | |
|---|---|---|---|---|---|---|
| sentiment | LLM News | 0.016 | 0.093 | 1.00 | 0.5 | 117 |
| impact | LLM News | 0.029 | 0.177 | 1.91 | 0.6 | 117 |
| conflicting_signals | LLM News | 0.040 | 0.233 | 2.52 | 0.6 | 117 |
| news_novelty | LLM News | 0.011 | 0.065 | 0.70 | 0.5 | 117 |
| Config | N Feats | Sharpe | Return% | Max DD% | Sharpe |
|---|---|---|---|---|---|
| Baseline (OHLCV + Tech) | 0 | 0.010 0.618 | -5.03 18.00 | 34.91 6.01 | — |
| LLM Signals Only † | 6 | -0.411 0.690 | -16.42 18.81 | 42.12 8.11 | -0.421 |
| Macro Only ‡ | 5 | -0.007 0.355 | -6.16 9.74 | 34.78 9.28 | -0.017 |
| LLM + Macro (Full) | 10 | -0.267 0.284 | -13.91 7.41 | 38.66 6.34 | -0.276 |
| Config | N Feats | Sharpe | Return% | Max DD% | Sharpe |
|---|---|---|---|---|---|
| Baseline (OHLCV + Tech) | 0 | 0.809 0.333 | 11.29 6.21 | 14.96 4.04 | — |
| LLM Signals Only † | 5 | 1.001 0.853 | 12.98 8.93 | 16.27 6.59 | +0.192 |
| Macro Only ‡ | 5 | 1.099 0.695 | 16.04 9.53 | 15.30 3.15 | +0.290 |
| LLM + Macro (Full) | 10 | 1.038 0.424 | 15.14 6.19 | 17.27 2.18 | +0.229 |
| SPY buy-and-hold § | — | 1.756 § | 11.87 § | 5.07 § | +0.947 |
| Paired -test (LLM+Macro vs. Baseline): , | |||||
| Cost (bp) | Cost (%) | Baseline Sharpe | LLM+Macro Sharpe | Sharpe | LLM Win? |
|---|---|---|---|---|---|
| 0 | 0.00% | 1.231 | 0.753 | -0.478 | × |
| 5 | 0.05% | 1.202 | 0.730 | -0.472 | × |
| 10 | 0.10% | 1.156 | 0.674 | -0.482 | × |
| 20 | 0.20% | 1.108 | 0.549 | -0.559 | × |
| 50 | 0.50% | 0.929 | 0.580 | -0.349 | × |
LLM-Guided RL
Large language model-guided reinforcement learning uses language models to shape rewards, exploration, planning, and policy learning.
See all 140 papers