Building a Multi-Agent System for Investment Research: An Engineering Practice

    This article walks through the engineering practice of building a multi-agent system for investment research. It explains why single-turn LLM Q&A falls short in leveraged markets, then breaks down a six-role architecture with execution isolation, task orchestration from a single instruction to a full report, explainable confidence scoring and position sizing, five tracking thresholds that turn views into testable hypotheses, scheduled and event-driven proactive delivery, extension from futures to equities, and the risk and governance constraints required to keep the system auditable.

    1. Why Single-Turn Q&A Cannot Support Investment Research

    Early “LLM plus prompt” research assistants were essentially one-shot Q&A: the user asks a question, and the model returns a passage that looks like a complete analysis. This approach has clear weaknesses in information density, traceability, and consistency of conclusions. Applying it directly to leverage-sensitive scenarios such as futures and equities concentrates the risk in three areas:

    1. Mixed context: market data, positions, macro signals, and supply-chain information are crammed into the same context window, so the model can easily mix data points from different timestamps.
    2. No cross-validation: a single role acts as both player and referee, so conclusions face no second-opinion constraint.
    3. Not reproducible: running the same question twice produces different output structures, which cannot be accumulated into comparable research assets.

    The value of multi-agent collaboration is precisely to split “one-shot generation” into an engineering pipeline of division of labor, isolation, aggregation, and review, so that conclusions carry structure, confidence, and observable thresholds.

    2. Overall Architecture: Division of Labor Across Six Roles

    A deployable investment research orchestration is typically composed of the following roles, and the number of roles can scale with asset complexity:

    • Data acquisition role: pulls raw data such as quotes, basis, inventory, and operating rates. It only fetches and cleans data; it makes no judgments.
    • Technical role: analyzes trend, volatility, and volume structure, and outputs key price levels.
    • Fundamental role: maps supply and demand, capacity, margins, and seasonality.
    • Macro and capital flow role: focuses on interest rates, exchange rates, risk appetite, and position structure.
    • Risk role: calculates maximum drawdown tolerance, correlation exposure, and extreme scenarios.
    • Chief investment officer role (aggregator): adds no new facts; it only weights, detects conflicts among, and makes the final call on the conclusions of the previous five roles.

    The key design principle is execution isolation: each role runs in its own context and receives only the data slice it needs plus intermediate artifacts in a unified format, preventing cross-contamination.

    3. Task Orchestration: From One Instruction to a Ten-Minute Report

    The user enters a single natural-language intent, and the orchestration layer compiles it into an execution plan. Illustrative pseudocode:

    1. plan = {
    2. "target": "methanol_futures",
    3. "roles": ["data", "technical", "fundamental",
    4. "macro", "risk", "chief"],
    5. "contract": {
    6. "fields": ["view", "confidence", "position",
    7. "thresholds", "risk_notes"],
    8. "confidence_range": [0, 1]
    9. },
    10. "timeout_sec": 600
    11. }
    12. result = orchestrator.run(plan) # parallel execution + aggregation

    There are three engineering priorities. First, parallelism first: roles with no dependencies run at the same time, compressing end-to-end latency to minutes. Second, a unified intermediate artifact contract: every role outputs the same set of fields so the aggregator can compare them programmatically. Third, timeout and degradation: when a role fails, the result is labeled “insufficient data” rather than a fabricated conclusion.

    4. How Confidence Scores and Position Recommendations Are Generated

    Confidence should not come from the model’s “feeling”; it should be synthesized from explainable factors such as data completeness, agreement across roles, and the hit rate of similar historical judgments. The position recommendation is a constrained mapping: the higher the confidence and the greater the tolerance given by the risk role, the higher the recommended position cap, with a hard stop-loss always retained.

    1. confidence = w1*data_completeness + w2*role_agreement + w3*hit_rate
    2. position_cap = min(risk_tolerance, k * confidence)

    The point of writing it this way is that any recommendation can be traced back to specific factors, which makes post-hoc attribution easy instead of relying on a black-box output.

    5. Five Tracking Thresholds: Making Conclusions Trackable

    Attaching thresholds to the end of the report is the key to turning an “opinion” into a “verifiable hypothesis.” Thresholds should cover five dimensions: price, basis, inventory, margin, and positions, and should specify the action triggered when each is breached (review, reduce position, exit). When an actual value crosses a threshold, the system can automatically re-trigger an analysis, closing the loop.

    6. Proactive Delivery: From People Seeking Information to Information Finding People

    The second stage of evolution introduces scheduled and event-driven execution: a scheduler starts the orchestration on a cycle or on a threshold event, the aggregator decides “whether it is worth an alert,” and the conclusion is delivered to IM through a message queue and push channels. This requires generic cloud capability categories: a container platform to host the runtime, a message queue for peak shaving, object storage to archive reports, and logging plus monitoring and alerting for observability. If you build on Baidu AI Cloud, you can combine the generic categories above and avoid binding to specific interfaces.

    7. Extending to Equities: Reuse and Differences

    The multi-role skeleton can be reused directly; the differences lie mainly in data dimensions (financial statements, industry conditions, shareholder structure) and trading rules (price limits, T+1). The recommendation is to keep the role contracts unchanged and replace only the data adapter layer and threshold templates, which keeps migration costs lowest.

    8. Risk and Governance

    The system must be positioned as a research aid, not investment advice; all outputs must retain data sources and timestamps; a hard constraint of “no data, no conclusion” must be set against model hallucination; and the intermediate artifacts of every run must be recorded for audit. Meeting these three points gives multi-agent investment research a foundation for sustainable evolution.