Skip to content

References: The risk gate

For education only. Not investment, financial, or trading advice.

Primary source (open-source, Apache-2.0):
- TradingAgents, an open-source multi-agent LLM framework
Authors: Yijia Xiao, Edward Sun, Di Luo, Wei Wang
Organization: TauricResearch
Repository: https://github.com/TauricResearch/TradingAgents
Paper: "TradingAgents: Multi-Agents LLM Financial Trading Framework",
arXiv:2412.20138 (https://arxiv.org/abs/2412.20138)
License: Apache-2.0
Pinned snapshot for this course: 7e9e7b8 (the framework as of 2026-05-01)
All code shown in this lesson is quoted from the framework at the pinned
snapshot above, under the Apache-2.0 license, with attribution. Clawdemy's
lesson prose is original. We teach the architecture only; we make no
investment, financial, or trading claims, and we report no performance results.

The framework is public and free to read. You do not need a GitHub account, the tool called Git, or any programming knowledge: open the link below in your browser and read the files like ordinary web pages.

At the pinned snapshot:

  • tradingagents/agents/risk_mgmt/aggressive_debator.py: the risk-seeker, prompted to back bold, big-payoff bets.
  • tradingagents/agents/risk_mgmt/conservative_debator.py: the guardian, prompted to defend the portfolio and limit losses.
  • tradingagents/agents/risk_mgmt/neutral_debator.py: the balancer, told to weigh both sides.
  • tradingagents/graph/conditional_logic.py: should_continue_risk_analysis, the check that rotates the three seats and then routes to the gate.
  • tradingagents/agents/managers/portfolio_manager.py: the Portfolio Manager, the separate gate that reads the review, issues the final trade decision, and runs on the deep model.

Where this sits inside this track.

  • The trader. The previous lesson: the concrete proposal that this lesson’s risk layer stress-tests.
  • Orchestration and shared state. The next lesson: the orchestrator that has been deciding who goes next, and the shared state that has carried each agent’s output to the one after it.
  • The bull and the bear. Lesson 3 introduced the first judgment point (the Research Manager); this lesson is the second (the Portfolio Manager), and both run on the deep model.