mech.app

The mech.app newsletter

Agentic AI, minus the noise.

Get practical field notes on AI agents, automation, developer tools and security delivered to your inbox.

No spam. Unsubscribe anytime.

Financial

DSA: Evidence-Aware Orchestration for Multi-Market Stock Research Agents

How DSA coordinates heterogeneous evidence gathering, exposes data boundaries, and controls opinion propagation in production financial research pipelines.

Source: arxiv.org
DSA: Evidence-Aware Orchestration for Multi-Market Stock Research Agents

LLMs can summarize financial documents. Building a production stock-research system that assembles evidence from six regional markets, exposes missing data to downstream agents, and prevents early opinions from contaminating final reports is a different problem. DSA (Evidence-Aware LLM-Agent Orchestration for Multi-Market Stock Research) is a framework that addresses the operational gap between summarization demos and coordinated research pipelines.

The paper ships a reference implementation with six regional market paths, fifteen bundled strategy skills, and 1,457 portable backend contract tests. The authors froze a software snapshot and mapped 596 test cases to six contract families that validate the orchestration architecture. This is not a claim about forecasting accuracy or investment returns. It is a claim about implementation conformance for a specific set of software contracts.

The Orchestration Problem

A multi-market stock research system must:

  • Query heterogeneous evidence sources (financial statements, news, sentiment, technical indicators) across different regional markets.
  • Expose unavailable data or missing model capabilities to downstream agents without breaking the pipeline.
  • Control how intermediate agent opinions propagate to the final report.

Most LLM agent demos chain tool calls in sequence. DSA introduces evidence-aware orchestration, which means the system knows what evidence exists, what is missing, and how to route analysis tasks to the right models and agents based on data availability.

Architecture: Evidence Acquisition to Report Generation

DSA organizes the workflow into five stages:

  1. Evidence acquisition: Gather raw data from regional market APIs, news feeds, and internal databases.
  2. Structured context construction: Transform raw evidence into typed contexts (financial metrics, sentiment scores, technical signals).
  3. Model-routed analysis: Route analysis tasks to hosted or local LLMs based on task type and model capability.
  4. Optional role and strategy skill reasoning: Run specialized agents (fundamental analyst, technical analyst, sentiment analyst) and strategy skills (momentum, value, growth).
  5. Report generation: Assemble final report with selected context, diagnostics, and explicit disagreement signals.

The system supports two execution profiles:

  • Default profile: Deterministic report generation with fixed validation rules.
  • Agentic profile: Role-specific parsers, signal-eligibility partitioning, and conservative risk overrides.

Evidence-Aware Routing

The orchestration layer decides which evidence sources to query based on:

  • Market context: A US equity research request queries SEC filings, US news, and US sentiment feeds. A Hong Kong equity request queries HKEX filings, regional news, and Asia-Pacific sentiment.
  • Data availability: If a company has no recent earnings call transcript, the system skips transcript sentiment analysis and marks that evidence as unavailable in the context.
  • Model capability: If a local model cannot handle multi-lingual sentiment analysis, the system routes that task to a hosted model or skips it.

The routing logic is explicit. The system does not retry failed evidence queries indefinitely. It exposes missing data to downstream agents so they can adjust their analysis or flag uncertainty in the final report.

Controlling Opinion Propagation

In the agentic profile, role agents (fundamental, technical, sentiment) generate intermediate opinions. Strategy skills (momentum, value, growth) generate buy/sell/hold signals. The system must prevent early opinions from contaminating later analysis or the final report.

DSA uses three mechanisms:

  1. Role-specific parsers: Each role agent outputs structured JSON. Parsers validate schema and extract only the fields needed for downstream tasks.
  2. Signal-eligibility partition: Strategy skill outputs undergo a partition step that filters signals based on confidence thresholds and data quality. Low-confidence signals are excluded from synthesis.
  3. Explicit disagreement supply: If role agents or strategy skills disagree, the system supplies the disagreement explicitly to the decision agent. The decision agent does not see a blended average. It sees conflicting opinions and must reconcile them.

After the decision agent produces a recommendation, a conservative risk override checks for edge cases (extreme volatility, missing critical data, regulatory flags). If the override triggers, the system downgrades the recommendation or flags it for human review.

Implementation Shape

The reference implementation includes:

  • Six regional market paths: US, Europe, Asia-Pacific, China, Hong Kong, Japan.
  • Fifteen bundled strategy skills: Momentum, value, growth, quality, low volatility, dividend yield, earnings surprise, analyst revision, short interest, insider trading, ESG, sector rotation, pairs trading, mean reversion, breakout.
  • Hosted and local model routes: OpenAI GPT-4, Anthropic Claude, local Llama 3.1 70B.
  • Multiple execution surfaces: CLI, REST API, scheduled batch jobs.

The system is not a monolith. Each regional market path is a separate orchestration graph. Strategy skills are pluggable modules. Model routes are configuration entries.

Contract Testing and Conformance

The authors froze a software snapshot and ran 1,457 portable offline backend contract tests. 596 cases were retrospectively mapped to six contract families:

Contract FamilyTest CasesPurpose
Evidence acquisition142Validate data source queries and error handling
Context construction118Validate typed context schemas and transformations
Model routing97Validate task-to-model assignments and fallback logic
Role agent parsing103Validate role-specific output schemas and field extraction
Signal partitioning86Validate signal-eligibility filters and confidence thresholds
Risk override50Validate conservative risk checks and downgrade logic

The tests do not measure report quality, forecasting accuracy, or investment returns. They measure implementation conformance for the orchestration contracts. If a test passes, the system behaves as specified for that contract. If a test fails, the system does not.

Failure Modes

DSA is designed to handle missing data and model failures, but it has failure modes:

  • Evidence acquisition timeout: If a regional market API is down, the system skips that evidence source. Downstream agents see incomplete context.
  • Model routing fallback exhaustion: If all hosted models are unavailable and the local model cannot handle a task, the system skips that task. The final report flags missing analysis.
  • Signal partitioning over-filtering: If confidence thresholds are too high, the system excludes all strategy skill signals. The decision agent has no signals to synthesize.
  • Risk override false positive: If the conservative risk override is too aggressive, the system downgrades valid recommendations. Human review becomes a bottleneck.

The system does not retry indefinitely. It exposes failures to downstream agents and flags them in the final report.

Code Example: Evidence Acquisition with Availability Tracking

from typing import Dict, Optional
from dataclasses import dataclass

@dataclass
class EvidenceResult:
    data: Optional[Dict]
    available: bool
    error: Optional[str]

class EvidenceAcquisition:
    def __init__(self, market: str, timeout: int = 10):
        self.market = market
        self.timeout = timeout
    
    def acquire_earnings_transcript(self, ticker: str) -> EvidenceResult:
        """
        Query earnings transcript API with explicit availability tracking.
        Returns EvidenceResult with data=None and available=False if missing.
        """
        try:
            response = self._query_api(f"/transcripts/{ticker}", timeout=self.timeout)
            if response.status == 404:
                return EvidenceResult(data=None, available=False, error="No transcript")
            return EvidenceResult(data=response.json(), available=True, error=None)
        except TimeoutError:
            return EvidenceResult(data=None, available=False, error="API timeout")
        except Exception as e:
            return EvidenceResult(data=None, available=False, error=str(e))
    
    def build_context(self, ticker: str) -> Dict:
        """
        Assemble structured context with explicit unavailable markers.
        Downstream agents see which evidence is missing.
        """
        transcript = self.acquire_earnings_transcript(ticker)
        context = {
            "ticker": ticker,
            "market": self.market,
            "evidence": {
                "earnings_transcript": {
                    "available": transcript.available,
                    "data": transcript.data,
                    "error": transcript.error
                }
            }
        }
        return context

The key is the available flag. Downstream agents check this flag before attempting analysis. If available=False, they skip transcript sentiment analysis and flag the missing evidence in their output.

Technical Verdict

Use DSA-style evidence-aware orchestration when:

  • You need to assemble heterogeneous evidence from multiple regional markets or data domains.
  • Missing data or model failures should not break the pipeline. Downstream agents must see what is unavailable.
  • Intermediate agent opinions must not contaminate final reports. You need explicit disagreement signals and conservative risk overrides.
  • You can afford the complexity of role-specific parsers, signal-eligibility partitioning, and multi-profile execution.

Avoid it when:

  • You have a single data source and a single model. The orchestration overhead is not justified.
  • You need real-time execution with sub-second latency. Evidence acquisition and model routing add latency.
  • You cannot maintain 1,400+ contract tests. The system is only as reliable as its test coverage.
  • You need guaranteed forecasting accuracy or investment returns. The paper makes no such claims.

DSA is not a forecasting model. It is an orchestration framework that exposes the plumbing of multi-market stock research: evidence acquisition, data boundaries, model routing, opinion propagation, and risk overrides. If your production system needs these controls, the architecture is worth studying.

Tags

agentic-ai orchestration infrastructure

Primary Source

arxiv.org