Back to Blog
Product Updates

How We Use Claude to Adjust Signals (Without Letting AI Decide)

QFQuantForge Team·April 3, 2026·8 min read

When a strategy generates a trading signal, we have a choice. Execute it as-is based on pure technical analysis, or add context before execution. The first approach is simpler and more predictable. The second might improve outcomes by incorporating information the technical indicators miss: recent news sentiment, market regime context, and patterns from recent trade history.

We chose the second approach, but with strict boundaries. Claude receives the signal and its context, and produces a confidence adjustment bounded between negative 0.2 and positive 0.2. This means AI can shift a signal's confidence by at most 20 percentage points in either direction. It cannot reverse the signal direction, create new signals, bypass any risk check, or increase position sizes beyond the risk framework's limits.

This is what bounded AI enrichment looks like in practice.

The Enrichment Pipeline

The pipeline starts after a strategy generates a TradingSignal. The signal contains a direction (long, short, or close), a confidence score between 0.0 and 1.0, reasoning text from the strategy, and optionally a suggested stop-loss and take-profit.

Before the signal reaches the risk gates, it passes through the AI enrichment stage. The enricher packages the signal with its full context: the symbol, the current market regime label from our quantitative regime detector, the latest sentiment score for that symbol, and the last five completed trades for context on recent performance.

This package is sent to Claude with a system prompt that instructs the model to evaluate the signal and produce a structured JSON response. The response must include a confidence adjustment (a float between negative 0.2 and positive 0.2), a reasoning string explaining the adjustment, a list of identified risk factors, and a list of supporting factors.

The enricher parses the JSON response, validates the adjustment is within bounds (clamping if necessary), applies the adjustment to the original confidence, and clamps the final result to the 0.0 to 1.0 range. The enriched signal then proceeds to the risk gates with the adjusted confidence and the AI's reasoning appended to the signal metadata.

What Claude Sees

The context provided to Claude is deliberately limited to information that complements the technical signal. The strategy has already analyzed price action, indicators, and patterns. Claude does not need to repeat that analysis. Instead, it receives:

The signal direction and confidence, so it understands what the strategy wants to do and how confident it is. The current market regime, so it can evaluate whether the signal makes sense in the current environment. A mean reversion long signal during a trending down regime might deserve reduced confidence. The same signal during a ranging regime might deserve a boost.

The sentiment score for the symbol, aggregated from recent news using a time-weighted average over a 4-hour window. If the strategy is generating a long signal but recent news is heavily bearish (sentiment below negative 0.15), Claude might reduce confidence. If sentiment aligns with the signal direction, it might increase confidence.

The last five closed trades, including their PnL, duration, and the signal reasoning at entry. This gives Claude context on recent performance. If the last five trades were all losses, Claude might be more cautious about the current signal. If recent trades show a consistent pattern (for example, entries are too early in a trend), Claude might flag this as a risk factor.

The 0.2 Bound: Why It Matters

The maximum adjustment of 0.2 is the most important design decision in the enrichment system. A strategy generates a signal with confidence 0.6. Claude can adjust this to anywhere between 0.4 and 0.8. It cannot reduce it to 0.0 (effectively vetoing the signal) or increase it to 1.0 (maximum conviction).

This bound means AI cannot fundamentally alter the strategy's behavior. A strategy that generates a long signal with 0.6 confidence is going to produce a long entry at somewhere between 0.4 and 0.8 confidence. The direction does not change. The position sizing varies by at most 20 percent in either direction (since sizing scales with confidence). The risk gates evaluate the adjusted confidence, but the core trading logic remains the strategy's.

We considered wider bounds during development. A plus or minus 0.5 range would give Claude more influence, potentially capturing more of the contextual information. We rejected this because it would make the AI too powerful relative to the underlying strategy. If Claude can halve or double a signal's confidence, the system's behavior becomes unpredictable from the strategy's perspective. With a 0.2 bound, the strategy remains the primary driver and AI is a second opinion.

We also considered allowing Claude to reverse signal direction (turning a long into a short). We rejected this immediately. The strategy has analyzed the technical data and reached a directional conclusion. Claude has not seen the raw candle data, indicators, or any of the quantitative analysis. Allowing it to reverse the direction based on a text summary of the signal would give a language model authority over decisions it is not qualified to make.

Caching and Cost

Signal enrichment uses fresh calls by default rather than cached results. Unlike sentiment analysis (which queries the same news data repeatedly), each trading signal has a unique combination of confidence, regime, sentiment, and recent trade history. Caching would rarely produce hits and could return stale context.

The rate limiter at 30 requests per minute protects against cost spikes. In practice, our 45 bots generate a handful of enrichable signals per day. Most strategy ticks produce no signal (the strategy sees no opportunity), and only signals that pass the initial confidence threshold reach the enrichment stage. Daily API costs for enrichment are negligible.

When the Claude API is unavailable (network issues, rate limit exhaustion, API outage), enrichment is skipped entirely. The raw signal proceeds to the risk gates with its original confidence. The system logs that enrichment was skipped and continues operating. No positions are held or delayed waiting for AI assessment.

Measuring Enrichment Impact

We track whether the AI adjustment improved or degraded outcomes by comparing the adjusted confidence to the eventual trade result. For each enriched trade, we record: the original confidence, the AI adjustment, the final confidence, and the trade PnL.

Over time, this data reveals whether Claude's adjustments are additive. If trades where Claude reduced confidence tend to be losers, and trades where Claude increased confidence tend to be winners, the enrichment is adding value. If there is no correlation between the adjustment direction and outcome, the enrichment is noise and should be disabled.

This measurement is why we store the full enrichment metadata (adjustment, reasoning, risk factors, supporting factors) alongside the trade record. Post-trade analysis by Claude (a separate module) can review whether its own enrichment recommendations were correct, creating a feedback loop. The post-trade module scores each completed trade from 1 to 10, identifies what went well and what could improve, and can specifically evaluate whether the confidence adjustment was directionally correct.

Sentiment as an Input

The sentiment score that Claude receives during enrichment comes from a separate pipeline that runs on a schedule. News is fetched every few hours, scored in batches of 20 headlines, and aggregated using a time-weighted average where more recent news receives higher weight.

The aggregation uses an exponential decay formula. A headline from 1 hour ago receives a weight of approximately 0.5. A headline from 4 hours ago receives approximately 0.2. A headline from 12 hours ago receives approximately 0.08. This ensures the sentiment score reflects current conditions rather than stale news.

Sentiment scores above 0.15 are labeled bullish. Below negative 0.15, bearish. The neutral zone between negative 0.15 and positive 0.15 avoids false labeling on mixed or low-signal news flows. The confidence of the sentiment score itself accounts for the number of data points: fewer than 10 news items in the window produces lower sentiment confidence, which Claude factors into its enrichment reasoning.

The Regime Narrator

A related AI module generates narrative descriptions of market regimes. When our quantitative regime detector identifies a regime change (from ranging to trending, or from low volatility to high volatility), Claude receives the quantitative indicators (ADX, ATR percentile, Bollinger Band width, price relative to 50-period SMA, volume trend) and produces a narrative explanation with a position size multiplier.

The multiplier ranges from 0.0 (do not trade in chaotic conditions) to 1.5 (increase sizes in clear, favorable conditions). This is separate from signal enrichment — it applies at the regime level, not the individual signal level. When the regime is unfavorable, all signals receive reduced sizing regardless of their individual enrichment adjustments.

When Claude is unavailable, fallback multipliers based on the quantitative regime label are used: 1.2 for trending up, 0.8 for ranging tight, 0.3 for high volatility chaos. These are hardcoded conservative defaults that keep the system running safely without AI.

The Principle: Bounded Advisory

Every AI integration in our system follows the same principle. AI receives information, produces a bounded recommendation, and the rules-based system decides how to act on it. AI never has direct access to the order execution system. AI never has the ability to bypass risk checks. AI failures default to the system continuing with rules-based logic.

This principle means our system is AI-enhanced, not AI-dependent. The distinction matters because it determines the failure mode. An AI-dependent system fails when AI fails. An AI-enhanced system continues operating at baseline when AI fails. For a system managing capital, the second failure mode is the only acceptable one.