Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:24mlight A Share investment Agent Portfolio Decision Synthesis

From Leeroopedia
Knowledge Sources
Domains Finance, Portfolio_Management, Decision_Making
Last Updated 2026-10-10 14:00 GMT

Overview

A weighted multi-signal decision synthesis approach that aggregates outputs from technical, fundamental, sentiment, valuation, risk, and macro analysis agents into a final portfolio trading action (buy, sell, hold) with quantity and confidence.

Description

Portfolio decision synthesis is the terminal node of the investment analysis pipeline. It collects messages from all upstream agents, deduplicates by agent name (keeping the latest), and feeds them into an LLM with a system prompt defining signal weights and risk constraints. The LLM generates a JSON decision containing:

  • action: buy, sell, or hold
  • quantity: number of shares to trade
  • confidence: decision confidence level (0 to 1)
  • agent_signals: summary of each agent's signal and confidence
  • reasoning: detailed investment rationale

The system prompt encodes signal weights: valuation (30%), fundamentals (25%), technicals (20%), macro (15%), sentiment (10%), plus hard risk constraints from the risk management agent.

Usage

Use this principle when:

  • Synthesizing multiple independent analysis signals into a single actionable trading decision
  • Applying weighted importance to different analysis dimensions (e.g., valuation > sentiment)
  • Generating LLM-driven investment decisions with structured JSON output and fallback handling

Theoretical Basis

The decision synthesis model uses weighted signal aggregation:

Decision=f(wv⋅Svaluation+wf⋅Sfundamental+wt⋅Stechnical+wm⋅Smacro+ws⋅Ssentiment,Rrisk)

Where w values are signal weights and Rrisk represents hard risk constraints.

Signal weights (from system prompt):

  • Valuation: 30%
  • Fundamentals: 25%
  • Technicals: 20%
  • Macro: 15%
  • Sentiment: 10%

Risk constraints override: If risk_score ≥ 9, force hold regardless of other signals.

Fallback behavior: If the LLM returns None or unparseable JSON, default to a conservative hold action with 0.7 confidence.

Related Pages

Implemented By

Uses Heuristics

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment