In portfolio-management reinforcement learning, the representation layer turns financial-news sentences into the numeric news block of an agent’s state. A numerical agent cannot use a sentence directly; a fine-tuned language model produces its signal representation. section 12.5
A fixed signal contract makes the conversion usable across modules:
- It defines thirteen named fields with bounded ranges: twelve directional or risk signals from −1 to 1, and confidence from 0 to 1. section 12.5
- A stable, versioned, validated interface lets rule-based, off-the-shelf language-model, and fine-tuned language-model producers be swapped without changing the environment or agent. section 12.5
- Training the fine-tuned extractor requires news paired with high-quality signals, prepared through collection, curation, labeling, cleaning, and building. section 12.5
Listing 12.6 The signal schema: thirteen named fields
@dataclass
class MarketSignal:
market_sentiment: float = 0.0 #A
risk_on_signal: float = 0.0
rates_pressure: float = 0.0
inflation_pressure: float = 0.0
growth_signal: float = 0.0
tech_signal: float = 0.0 #B
energy_signal: float = 0.0
financials_signal: float = 0.0
defensive_signal: float = 0.0
volatility_risk: float = 0.0
liquidity_risk: float = 0.0
geopolitical_risk: float = 0.0
confidence: float = 0.0 #C
def to_vector(self) -> np.ndarray:
return np.asarray([getattr(self, f) for f in self.FIELDS],
➥ dtype=np.float32) #DInspect the thirteen-field MarketSignal schema and its conversion to a NumPy vector. section 12.5
