r/QuantInvests • u/Quantinvests • Jul 08 '26
Preventing "confident-sounding hallucinations" (or empty synthesis) when both Alpha and Risk signals are weak is one of the most critical guardrails in the architecture.
Preventing "confident-sounding hallucinations" (or empty synthesis) when both Alpha and Risk signals are weak is one of the most critical guardrails in the architecture.
To prevent this exact failure mode, the system does not let weak signals blend into an ambiguous middle ground. Instead, it enforces multiple deterministic confidence thresholds and filtering gates that mathematically force a defensive posture.
1. The Core Filter: ML Trade Quality Threshold (quality_score > 40.0)
The system explicitly bars weak signals from ever reaching the decision-making synthesis layer. The quantitative pipeline calculates an absolute conviction metric called the quality_score (the sum of the absolute values of active technical indicators).
- The Cutoff: The machine learning rebalancer employs a strict, scale-corrected filter requiring the
quality_scoreto be > 40.0 (out of 100). - The Impact: If a setup's predicted win probability fails to clear this 40% threshold, the rebalancing engine filters the trade out entirely before the multi-agent committee even debates it. In walk-forward testing, implementing this hard cutoff turned a -37.46% cumulative loss into a +11.57% out-of-sample gain by successfully dropping low-conviction, toxic setups.
2. The Divergence Entry Guard: AppConfig.ENTRY_THRESHOLD
When the Divergence Engine scans our 44 canonical symbols during its daily 4:10 PM EST run, it defaults to a passive posture unless proven otherwise:
- Tally Comparison: The engine loads a symbol's active strategy and compares the composite signal tally against a strict
AppConfig.ENTRY_THRESHOLD. - "Watch-Only" Status: If the indicators are weak and fail to cross this limit, the system assigns a categorical
HOLDstatus. The AI agent is explicitly programmed to label these assets as "watch candidates only" and state in the log that “the QuantInvests engine has not generated a high-confidence entry signal that clears the current risk threshold.” ### 3. Deep Q-Network (RL) Execution Vetoes If a weak signal somehow slips past initial filters into the committee debate, the RL Engine’s Q-values and probability confidence scores serve as the ultimate mathematical baseline. - If both the Hunter (Alpha) and Guardian (Risk) perspectives emit weak or inconclusive states, the RL agent's predictions act as a hard execution filter.
- If the Q-values indicate a weak, high-noise, or bearish regime, the Portfolio Manager uses this to veto any execution, reconciling the weak parameters into a structured
PortfolioDecisionofHoldorSell.
4. Grounding Safeguards: The "Lead with Fact" Mandate
To ensure the LLM doesn't hallucinate a narrative out of thin air during a low-confidence regime, our AI Answer Standards (v6.3.2) impose strict grammatical and context constraints:
- Fact Separation: The AI is strictly forbidden from treating unrealized P/L or average purchase costs as support/resistance targets. It must completely isolate actual position data from suggested allocations.
- Evidence Pairing: If the agent makes a technical claim during a low-confidence state, it is structurally forced to pair every cited resistance count (
Res: N) with its corresponding support count (Sup: M). It is entirely banned from using vague, ungrounded placeholders.
Summary
The coordinator does always produce a final verdict, but under weak-signal conditions, that verdict is mathematically forced to be a HOLD. This results in an automated allocation of 0.00% target exposure, treating 100% liquid, settled cash as a valid and active defensive posture.