{"id":"e2f7aa1a-f924-4796-a224-21d40cc0cb9a","entityType":"agent","slug":"crewai-alanhsieh2000-trading-agents","name":"trading_agents","canonicalUrl":"https://www.xpersona.co/agent/crewai-alanhsieh2000-trading-agents","canonicalPath":"/agent/crewai-alanhsieh2000-trading-agents","generatedAt":"2026-10-09T21:15:01.144Z","source":"GITHUB_REPOS","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T13:16:28.497Z","emptyReason":null},"description":"This is a replicate of https://github.com/TauricResearch/TradingAgents using CrewAI framework. TradingAgents This project is a CrewAI-based reimplementation/replication of $1, the multi-agent LLM financial trading framework proposed in the paper *TradingAgents: Multi-Agents LLM Financial Trading Framework*. Project Goal This project aims to reproduce the core ideas of $1 using the $1 framework. The original TradingAgents framework is a multi-agent LLM system for financial trading research. It is inspired by th","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. Last updated 10/9/2026.","installCommand":null,"sourceUrl":"https://github.com/alanhsieh2000/trading_agents","homepage":null,"primaryLinks":[{"label":"View Source","url":"https://github.com/alanhsieh2000/trading_agents","kind":"source"}],"safetyScore":66,"overallRank":27,"popularityScore":0,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"This is a replicate of https://github.com/TauricResearch/TradingAgents using CrewAI framework. TradingAgents This project is a CrewAI-based reimplementation/rep"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T13:16:28.497Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[{"label":"crewai","status":"self-declared"},{"label":"multi-agent","status":"self-declared"}],"verifiedCount":0,"selfDeclaredCount":3,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"},{"key":"crewai","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"multi-agent","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile capability:crewai|supported|profile capability:multi-agent|supported|profile"}},"adoption":{"evidence":{"source":"no-adoption-signals","verified":false,"confidence":"low","updatedAt":"2026-10-09T13:16:28.497Z","emptyReason":"No source adoption metrics were available."},"stars":0,"forks":0,"downloads":null,"packageName":null,"latestVersion":null,"tractionLabel":null},"release":{"evidence":{"source":"agent-index","verified":false,"confidence":"medium","updatedAt":"2026-10-09T13:16:28.489Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T13:16:28.497Z","lastCrawledAt":"2026-10-09T13:16:28.489Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-16T13:16:28.489Z","lastVerifiedAt":null,"highlights":[]},"execution":{"evidence":{"source":"GITHUB REPOS","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":null,"setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/crewai-alanhsieh2000-trading-agents/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/crewai-alanhsieh2000-trading-agents/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/crewai-alanhsieh2000-trading-agents/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/crewai-alanhsieh2000-trading-agents/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/crewai-alanhsieh2000-trading-agents/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/crewai-alanhsieh2000-trading-agents/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"GITHUB_REPOS","generatedAt":"2026-10-09T21:15:01.143Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/crewai-alanhsieh2000-trading-agents/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/crewai-alanhsieh2000-trading-agents/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/crewai-alanhsieh2000-trading-agents/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/crewai-alanhsieh2000-trading-agents/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"GITHUB REPOS","verified":false,"confidence":"high","updatedAt":"2026-10-09T13:16:28.497Z","emptyReason":null},"readme":"# TradingAgents\n\nThis project is a CrewAI-based reimplementation/replication of\n[TradingAgents](https://github.com/TauricResearch/TradingAgents), the multi-agent\nLLM financial trading framework proposed in the paper\n*TradingAgents: Multi-Agents LLM Financial Trading Framework*.\n\n# Project Goal\n\nThis project aims to reproduce the core ideas of\n[TauricResearch/TradingAgents](https://github.com/TauricResearch/TradingAgents)\nusing the [CrewAI](https://github.com/crewAIInc/crewAI) framework.\n\nThe original TradingAgents framework is a multi-agent LLM system for financial\ntrading research. It is inspired by the workflow of a real-world trading firm:\nspecialized analysts collect and interpret market information, researchers debate\nbullish and bearish cases, a trader proposes an action, risk managers evaluate\nthe proposal, and a portfolio manager makes the final decision.\n\nThis repository is not a line-by-line port of the original implementation.\nInstead, it maps the TradingAgents architecture into CrewAI concepts:\n\n- **Agents**: role-specific LLM workers such as analysts, researchers, trader,\n  risk managers, and portfolio manager.\n- **Tasks**: concrete work items assigned to agents, such as generating a\n  technical report, debating a bullish thesis, or validating portfolio risk.\n- **Crews / Flows**: ordered collaboration pipelines that pass information from\n  market analysis to final trade decision.\n- **Tools**: data-retrieval and analysis utilities for prices, fundamentals,\n  news, sentiment, technical indicators, and portfolio state.\n\n# Conceptual Architecture\n\nTradingAgents decomposes the trading decision process into several stages:\n\nMarket Data\n   |\n   v\nAnalyst Team\n   |\n   v\nResearch Team Debate\n   |\n   v\nTrader Agent\n   |\n   v\nRisk Management Team\n   |\n   v\nPortfolio Manager\n   |\n   v\nFinal Decision\n\n# Agents\n\nAgents are implemented as Agent instances within respective crew classes, which are decorated by @CrewBase. Their roles, goals, and backstories are defined in a separate agents.yaml file placed under the src/trading_agents/crews/[crew name]/config folder. This is the folder for the crew that the agent belongs to.\n\nThe Analyst Crew is the exception to the one-upstream-agent-to-one-CrewAI-agent mapping. It now follows PROMPTS.md: one shared `analyst` agent performs the four analyst tasks sequentially, and tools are attached to tasks rather than to the agent. The upstream analyst URLs below are still prompt source material for the task descriptions and tool choices.\n\n## 1. Analyst Team\n\nThe Analyst Team performs the first stage of information gathering and market\ninterpretation. In this CrewAI implementation, one shared Analyst agent produces\nfocused reports from four task-specific perspectives.\n\n### Fundamentals Analyst\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/analysts/fundamentals_analyst.py\"\n\n### Sentiment Analyst\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/analysts/sentiment_analyst.py\"\n\n### News Analyst\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/analysts/news_analyst.py\"\n\n### Market Analyst\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/analysts/market_analyst.py\"\n\n## 2. Research Team\n\nThe Research Team consumes the Analyst Team reports and turns them into an\nexplicit debate. The goal is to prevent the system from blindly accepting one\ninterpretation of the data.\n\n### Bull Researcher\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/researchers/bull_researcher.py\"\n\n### Bear Researcher\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/researchers/bear_researcher.py\"\n\n### Research Manager\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/managers/research_manager.py\"\n\n## 3. Trader Agent\n\nThe Trader Agent synthesizes all prior reports and proposes a concrete trading\naction.\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/trader/trader.py\"\n\n## 4. Risk Management Team\n\nThe Risk Management Team evaluates the Trader Agent's proposal from multiple\nrisk perspectives. Its purpose is to prevent attractive narratives from becoming\nuncontrolled portfolio exposure.\n\n### Aggressive Risk Debator\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/risk_mgmt/aggressive_debator.py\"\n\n### Conservative Risk Debator\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/risk_mgmt/conservative_debator.py\"\n\n### Neutral Risk Debator\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/risk_mgmt/neutral_debator.py\"\n\n## 5. Portfolio Manager\n\nThe Portfolio Manager makes the final decision. This agent should not simply\nrepeat the Trader Agent's proposal. It synthesizes the risk analysts' debate and\ndelivers a final position rating (Buy / Overweight / Hold / Underweight / Sell)\ngrounded in the full chain of analysis and risk review.\n\nThe Portfolio Manager also plays a second role as a self-reflection analyst: it\nreviews its own past decisions once the outcomes are known and records concise\nlessons that inform future decisions on the same instrument.\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/managers/portfolio_manager.py\"\n\n## 6. Translator\n\nThe Translator is a presentation-only agent with no analytical role: it never\nrevisits the decision. Given the finished decision and a target language, it\nrenders the same recommendation in that language so a reader who does not read\nEnglish sees exactly what the Portfolio Manager concluded.\n\nIts one hard constraint is fidelity of figures. Numbers, ticker symbols,\ncurrency amounts, percentages, dates, and technical indicator names are copied\ncharacter for character, never localized, rounded, or converted. The price\ntarget is not even sent to the model: it is copied verbatim from the original\ndecision when the translated file is rendered.\n\nThis agent runs only when `--language` is supplied.\n\n# Tasks\n\nTasks are implemented as Task instances within respective crew classes, which are decorated by @CrewBase. Their description, expected output, and bound agent are defined in a separate tasks.yaml file placed under the src/trading_agents/crews/[crew name]/config folder. This is the folder for the crew that the task belongs to.\n\nFor the Analyst Crew, all four tasks bind to the same `analyst` agent. Tool access is configured in `analyst_crew.py` on each Task constructor so the shared agent can use different tools for market, sentiment, news, and fundamentals work.\n\n## 1. Analyst Team\n\nThe Analyst Team performs the first stage of information gathering and market\ninterpretation. Four tasks are processed sequentially by one shared Analyst agent.\n\n### Market Analysis\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/analysts/market_analyst.py\"\n\nThe output of this task is market report.\n\n### Sentiment Analysis\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/analysts/sentiment_analyst.py\"\n\nThe output of this task is sentiment report.\n\n### News Analysis\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/analysts/news_analyst.py\"\n\nThe output of this task is news report.\n\n### Fundamentals Analysis\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/analysts/fundamentals_analyst.py\"\n\nThe output of this task is fundamentals report.\n\n## 2. Research Team\n\nThe Research Team consumes the Analyst Team reports and turns them into an\nexplicit discussion. The bull research focused on bullish thesis, the bear research focused on bearish thesis take turn to convince the research manager, who is focused on the balance of both researches.  \n\n### Bull Research\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/researchers/bull_researcher.py\"\n\nThe output of this task is bull response.\n\n### Bear Research\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/researchers/bear_researcher.py\"\n\nThe output of this task is bear response.\n\n### Research Management\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/managers/research_manager.py\"\n\nThe output of this task is investment plan.\n\n## 3. Trader Agent - Transaction Proposal\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/trader/trader.py\"\n\nThe output of this task is a trader plan structured as `TraderProposal`.\n\n## 4. Risk Management Team\n\nThe Risk Management Team evaluates the Trader Agent's proposal from multiple\nrisk perspectives. The aggressive risk opinion focuses on opportunity cost and upside capture, the conservative risk opinion focuses on capital preservation, and the neutral risk opinion focuses on the balance. The debate takes turn to produce the whole debate history in all aspects.\n\n### Aggressive Risk Opinions\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/risk_mgmt/aggressive_debator.py\"\n\nThe output of this task is aggressive response.\n\n### Conservative Risk Opinions\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/risk_mgmt/conservative_debator.py\"\n\nThe output of this task is conservative response.\n\n### Neutral Risk Opinions\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/risk_mgmt/neutral_debator.py\"\n\nThe output of this task is neutral response.\n\n## 5. Portfolio Manager\n\n### Self Reflection\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/managers/portfolio_manager.py\"\n\nThe output of this task is a short self-reflection (2-4 sentences) on a past\ndecision, written back into the corresponding lesson record. The self-reflection\nruns once per just-updated lesson record before the final decision.\n\n### Final Decision\n\nRead \"https://github.com/TauricResearch/TradingAgents/blob/main/tradingagents/agents/managers/portfolio_manager.py\"\n\nThe output of this task is final trade decision.\n\n## 6. Translator\n\n### Decision Translation\n\nThe input to this task is the ticker, the target language name, and the rating,\nexecutive summary, investment thesis, and time horizon of the finished decision.\nThe price target is deliberately withheld.\n\nThe output of this task is a `TranslatedDecision`: the four translated field\nvalues plus the five translated section headings. The markdown file itself is\nrendered from that object in `main.py`, not by the agent, so the translated file\nalways carries the same five sections in the same order as the English original.\n\n# Crews\n\nCrews are implemented as crew classes, which are decorated by @CrewBase. All agents and tasks are defined as member functions, one function decorated with @agent for one agent and one function decorated with @task for one task. The crew itself is also defined as a member function decorated with @crew. Besides, two separate agents.yaml and tasks.yaml files placed under the src/trading_agents/crews/[crew name]/config folder defines the actual prompts and other information. \n\nThe generated content_crew reference has been removed. Use the implemented src/trading_agents/crews/analyst_crew package as the current CrewAI wiring reference for this project.\n\n## 1. Analyst Crew\n\nThis crew consists of one Analyst agent and four tasks, run sequentially:\n- Analyst for Market Analysis\n- Analyst for Sentiment Analysis\n- Analyst for News Analysis\n- Analyst for Fundamentals Analysis\n\nTools are bound to tasks rather than to the shared agent. Market Analysis gets price and indicator tools, Sentiment Analysis uses pre-fetched prompt blocks and no tools, News Analysis gets news tools, and Fundamentals Analysis gets fundamentals and financial-statement tools.\n\nThe input to this crew is:\n- stock ticker\n- current date\n\nThe Analyst Crew YAML uses `{current_date}` as the prompt date. The current flow trigger still accepts `trade_date` for compatibility and maps it to `current_date` before kicking off the crew. The crew derives `{end_date}` from `{current_date}` and derives `{start_date}` and `{sentiment_start_date}` as seven calendar days before `{current_date}`, matching the past-week language in the analyst prompts.\n\nThe outputs of this crew are:\n- market report\n- sentiment report\n- news report\n- fundamentals report\n\n## 2. Research Crew\n\nThis crew consists of three agents and three tasks:\n- Bull Researcher for Bull Research\n- Bear Researcher for Bear Research\n- Research Manager for Research Management\n\nThe research stage runs a fixed number of debate rounds. The default is one\nround, configured by `research_stage.max_rounds` in runtime settings and\noverridable with `TRADING_AGENTS_RESEARCH_STAGE__MAX_ROUNDS`.\n\nFor each debate round, the stage executes:\n- bull research\n- bear research\n\nAfter all configured debate rounds are complete, the stage executes research\nmanagement once. The research manager receives the ticker and the final debate\nhistory, but not the original analyst reports or the latest `current_response`,\nand that single manager output becomes the stage investment plan. There is no\n`HAS_MORE` stop signal; the debate ends when the configured round count is\nreached.\n\nThe input to this crew is:\n- ticker\n- trade date\n- fundamentals report\n- sentiment report\n- news report\n- market report\n\nThe outputs of this crew are:\n- debate history\n- investment plan\n\nThe investment plan is structured with:\n- recommendation\n- rationale\n- strategic actions\n\nFor each discussion iteration, the current discussion history and the previous\nresearcher's response are added to the bull or bear research input. The flow\nprefixes researcher turns as `Bull Analyst:` and `Bear Analyst:` before\nappending them to the debate history. The main flow saves the research outputs\nto the run output directory as `debate_history.md` and `investment_plan.md`,\nalongside the four analyst reports.\n\n## 3. Trader Crew\n\nThis crew consists of one agent and one task:\n- Trader Agent for `trader_decision`\n\nThe input to this crew is:\n- ticker\n- investment plan\n\nThe ticker must be used exactly as provided in every prompt, report, and\nrecommendation, preserving any exchange suffix such as `.TO`, `.L`, `.HK`, `.T`,\nor `-USD`.\n\nThe outputs of this crew are:\n- trader plan\n\nThe trader plan is structured as `TraderProposal` with:\n- action: exactly one of `Buy`, `Hold`, or `Sell`\n- reasoning: two to four sentences anchored in the analyst reports and research plan\n- entry_price: optional entry target in the instrument's quote currency\n- stop_loss: optional stop-loss price in the instrument's quote currency\n- position_sizing: optional sizing guidance\n\nThe `trader_decision` task should use `output_pydantic=TraderProposal`.\n\n## 4. Risk Management Crew\n\nThis crew consists of three agents and three tasks:\n- Aggressive Risk Analyst for Aggressive Risk Opinions\n- Conservative Risk Analyst for Conservative Risk Opinions\n- Neutral Risk Analyst for Neutral Risk Opinions\n\nThe risk stage runs a fixed number of debate rounds. The default is one round,\nconfigured by `risk_stage.max_rounds` in runtime settings and overridable with\n`TRADING_AGENTS_RISK_STAGE__MAX_ROUNDS`. There is no `HAS_MORE` stop signal and\nno per-agent skip rule; the debate ends only when the configured round count is\nreached.\n\nFor each debate round, the stage executes:\n- Aggressive Risk Opinions\n- Conservative Risk Opinions\n- Neutral Risk Opinions\n\nThe input to this crew is:\n- fundamentals report\n- sentiment report\n- news report\n- market report\n- trader plan\n\nThe outputs of this crew are:\n- risk debate history, including all risk debate opinions in sequence\n\nFor each debate iteration, the current debate history is added to the input. That is to say, within any debate iteration, the previous agent's output is added to the debate history and provided as input for the next agent's task.\n\n## 5. Portfolio Crew\n\nThis crew consists of two agents and two tasks, even though it represents a\none-person team. The Portfolio Manager plays two roles:\n- Portfolio Manager for `final_decision`, who makes the final decision\n- Portfolio Manager for `self_reflection`, who reflects on past decisions to\n  make better decisions in the future\n\nEach time the Portfolio Manager makes a decision, the relevant information is\nstored alongside the decision as a lesson record. The next time the Portfolio\nManager decides on the same instrument, the stage:\n- updates the lesson records of that instrument with real returns (raw return,\n  alpha return versus the benchmark, and holding days),\n- self-reflects on each just-updated lesson record, one by one, and writes the\n  reflection back into the record,\n- retrieves up to `max_lessons` lesson records (default 30) as past lessons,\n  which form `{lessons_line}`. When there is no prior lesson record,\n  `{lessons_line}` becomes \"You have not invested this instrument in the past\n  yet.\", and\n- makes the final decision using the investment plan, trader plan, risk debate\n  history, and `{lessons_line}`.\n\nA lesson record contains the ticker, the trade date, the final decision, the raw\nreturn (formatted as `+.1%`), the alpha return (formatted as `+.1%`), the holding\ndays, and the reflection.\n\nThe benchmark used for the alpha return is resolved from the ticker's exchange\nsuffix (for example `.HK` -> `^HSI`, `.L` -> `^FTSE`, and no suffix -> `SPY`).\nHolding days is capped at `max_holding_days` (default 5): it is the smaller of\nthe ticker's and the benchmark's available transaction days since the trade date,\nor `max_holding_days` when both already exceed it. The end date is the trade date\nadvanced by the holding days in transaction days; the raw return is the\nclose-to-close return of the ticker between the trade date and the end date, and\nthe alpha return is that raw return minus the benchmark's close-to-close return\nover the same window.\n\nThe self-reflection step uses the quick LLM, while the final decision uses the\ndeep LLM.\n\nThe input to this crew is:\n- ticker\n- investment plan\n- trader plan\n- risk debate history, including all risk debate opinions in sequence\n\nThe outputs of this crew are:\n- final trade decision, structured as `PortfolioDecision`\n- updated lesson records, carrying the real returns and reflections\n\nThe final trade decision is structured as `PortfolioDecision` with:\n- rating: exactly one of `Buy`, `Overweight`, `Hold`, `Underweight`, or `Sell`\n  (the `PortfolioRating` scale shared with the Research Manager)\n- executive_summary: a concise action plan covering entry strategy, position\n  sizing, key risk levels, and time horizon (two to four sentences)\n- investment_thesis: detailed reasoning anchored in specific evidence from the\n  analysts' debate\n- price_target: optional target price in the instrument's quote currency\n- time_horizon: optional recommended holding period, e.g. `3-6 months`\n\nThe `final_decision` task should use `output_pydantic=PortfolioDecision`. The\nlesson record and the list of retrieved lessons are backed by their own Pydantic\ntypes defined in the implementation.\n\n## 6. Translation Crew\n\nThis crew consists of one agent and one task, and it runs only when a language\nis requested. It translates the finished trade decision so the recommendation is\nreadable by someone who does not read English.\n\nThe input to this crew is:\n- ticker\n- language name, for example `Traditional Chinese`\n- the finished decision's rating, executive summary, investment thesis, and time\n  horizon\n\nThe output of this crew is a `TranslatedDecision` with:\n- rating, executive_summary, investment_thesis, time_horizon: the translated\n  field values\n- rating_heading, executive_summary_heading, investment_thesis_heading,\n  price_target_heading, time_horizon_heading: the translated section headings\n\nThe `translate_decision` task should use `output_pydantic=TranslatedDecision`.\nStructuring the output this way, rather than asking for a translated markdown\ndocument, is what makes the result verifiable: the five sections and their order\nare produced by the renderer in `main.py`, and `price_target` is copied straight\nfrom the original decision because it is never sent to the model at all. The\nEnglish rating is appended in parentheses after the translated rating, for\nexample `增持 (Overweight)`, so the translated file can be audited against the\noriginal.\n\nThis crew uses the quick LLM. Translation is a mechanical transform, and\ntranslation quality is guarded by the structured contract rather than by\nspending deep-LLM tokens.\n\n# Flow\n\nThe flow consists of five crews in sequence, followed by an optional sixth and\nan optional PDF export step:\n\n- Analyst Crew\n- Research Crew\n- Trader Crew\n- Risk Management Crew\n- Portfolio Crew\n- Translation Crew, only when `--language` is supplied\n- PDF export, only when `--pdf` is supplied (this is regular Python code, not a crew)\n\nThe output of the flow is the Portfolio Crew's final trade decision: a\n`PortfolioDecision` carrying the final position rating and its supporting thesis.\nWhen a language is requested, the Translation Crew then writes that same decision\nin the requested language as a second file; a translation failure is reported but\nnever discards the completed analysis.\nWhen PDF export is requested, it runs after translation so both final decisions\nare available to render.\n\n# Evaluation\n\nFollowing the performance comparison presented in the paper, section 6.1 and Table 1, we use the same stocks - AAPL, GOOGL, AMZN, and the same backtest period - from 2024/01/01 to 2024/03/29, for the evaluation data set. The metric we use is cumulative return (CR), calculated from the capital ledger described in the Backtest section.\n\n## Dataset Preparation\n\nThe only crew relying on external data is the analyst crew. The following tools are used by the crew:\n- fetch_reddit_posts,\n- fetch_stocktwits_messages,\n- get_balance_sheet,\n- get_cashflow,\n- get_fundamentals,\n- get_global_news,\n- get_income_statement,\n- get_indicators,\n- get_news,\n- get_stock_data\n\nThere are 61 transaction days during the backtest period. On each transaction day, the TradingAgents needs to make decisions for all three stocks. Therefore, the above tools need to know they are called in the evaluation mode, and they need to retrieve data from the prepared dataset rather than external data sources in this mode.\n\n## Backtest\n\nDecisions made by the TradingAgents are exactly one of: Buy, Overweight, Hold, Underweight, Sell. To simulate the exchange, we follow these rules:\n- The position of the stock ranges from 0 to (1 + weight_over).\n- The weight associated with Overweight is the constant weight_over defined in settings with default value 0.5.\n- The weight associated with Underweight is the constant weight_under defined in settings with default value 0.5.\n- The transaction price is the close price of the transaction day.\n- The initial position is 0.\n- For Hold decisions, remain the current stock position.\n- For Buy decisions, raise the stock position to 1 if the current position is less than 1. Otherwise, Buy is equivalent to Hold. \n- For Overweight decisions, raise the stock position to (1 + weight_over) if the current position is less than (1 + weight_over). Otherwise, Overweight is equivalent to Hold.\n- For Underweight decisions, reduce the stock position to (1 - weight_under) if the current position is more than (1 - weight_under). Otherwise, Underweight is equivalent to Hold.\n- For Sell decisions, reduce the stock position to 0 if the current position is more than 0. Otherwise, Sell is equivalent to Hold.\n- The initial capital is 0.\n- When the stock position is raised, the capital will be decreased by the amount of (raised position) * (transaction price).\n- When the stock position is reduced, the capital will be increased by the amount of (reduced position) * (transaction price). \n- V_start is the minimal capital needed. It is equal to - min(capital of every trade date).\n- At the end of the backtest, there is always an additional Sell decision on the last transaction day to clear the stock position.\n- The cumulative return is equal to (the capital on the last transaction day after clearing the stock position) / V_start * 100%.\n- If V_start is 0 because no capital was deployed, the cumulative return is 0%.\n\nThe evaluation replays each ticker's decisions with three weight pairs: 0.5, 1.0, and 1.5 times the configured `(weight_over, weight_under)` pair. The scaled weights must remain at or below 1.0. The summary in `evaluation_report.md` reports the effective pair, V_start, cumulative return, and final capital for every scenario. The decision ledger in `evaluation_results.csv` contains `capital_0_5x`, `capital_1_0x`, and `capital_1_5x` columns for the three simulations.\n\n# Installation\n\nPDF export uses WeasyPrint. The Python dependency is installed by `uv sync`.\nOn Debian-based hosts its native Pango and HarfBuzz libraries and the Noto CJK\nfonts must also be installed; the project `Dockerfile` lists the exact packages.\n\n# Customizing\n\n**Add your `OPENAI_API_KEY` into the `.env` file**\n\n- Modify `src/trading_agents/main.py` to add custom inputs for your agents and tasks\n\n# Running the Project\n\nRun the default analyst flow with the default ticker and the current UTC trade date:\n\n```bash\nuv run analyze\n```\n\nRun the analyst flow for a specific ticker and save the reports under `output/<TICKER>_<TRADE_DATE>/`:\n\n```bash\nuv run analyze --ticker AAPL --trade-date 2026-05-25\n```\n\nIf you omit `--trade-date`, the flow uses the current UTC date:\n\n```bash\nuv run analyze --ticker AAPL\n```\n\nThe generated markdown reports are saved in the matching output directory, for example `output/AAPL_2026-05-25/`.\n\n## Translating the final trade decision\n\n`--language` adds a translated copy of the final trade decision next to the\nEnglish original, which is never modified:\n\n```bash\nuv run analyze --ticker AAPL --language zh-TW\n```\n\nThat writes `output/AAPL_<trade_date>/final_trade_decision.zh-TW.md` alongside\n`final_trade_decision.md`. Only the final trade decision is translated; the\nanalyst reports and debate histories stay in English.\n\n`--language` accepts either a language tag or a language name, so all three of\nthese are equivalent:\n\n```bash\nuv run analyze --ticker AAPL --language zh-TW\nuv run analyze --ticker AAPL --language zh_tw\nuv run analyze --ticker AAPL --language \"Traditional Chinese\"\n```\n\nThe recognized tags are `zh-TW`, `zh-CN`, `ja`, `ko`, `de`, `fr`, `es`, `pt`,\n`it`, `hi`, `th`, `vi`, and `id`. Any other value is treated as a free-form\nlanguage name and slugified for the filename, so `--language \"Swiss German\"`\nwrites `final_trade_decision.swiss-german.md`. A name written in its own script,\nsuch as `--language 日本語`, is translated as asked and saved as\n`final_trade_decision.translated.md`, since the filename suffix is restricted to\nASCII.\n\nA value is validated before any model is called, so a mistake costs nothing.\nNote that argparse needs `--language=-x` for a value starting with a hyphen.\n\nTo make a language the default for every run, set the environment variable\ninstead; `--language` on the command line always wins:\n\n```bash\nTRADING_AGENTS_TRANSLATION_STAGE__LANGUAGE=ja uv run analyze --ticker AAPL\n```\n\nIf translation fails, the run still succeeds: the nine English reports are\nalready written, the error is printed to stderr, and `translation_error` appears\nin the JSON result.\n\nFor compatibility, you can still pass a raw JSON trigger payload, including the\nlanguage:\n\n```bash\nuv run run_with_trigger '{\"ticker\":\"AAPL\",\"trade_date\":\"2026-05-25\"}'\nuv run run_with_trigger '{\"ticker\":\"AAPL\",\"language\":\"zh-TW\"}'\n```\n\n## Exporting the final trade decision as PDF\n\nAdd `--pdf` to render the English final trade decision and, when `--language`\nis used, its translated copy as A4 PDFs:\n\n```bash\nuv run analyze --ticker PFFA --language zh-TW --pdf\n```\n\nThe command writes these files beside their Markdown sources:\n\n```text\noutput/PFFA_<trade_date>/final_trade_decision.pdf\noutput/PFFA_<trade_date>/final_trade_decision.zh-TW.pdf\n```\n\nOnly final trade decisions are exported. Analyst reports and debate histories\nremain Markdown. Omitting `--pdf` skips PDF export.\n\nUse the standalone command to render decisions that already exist without\nrunning the crews or making any model calls. It accepts one or more run\ndirectories or final-decision Markdown files:\n\n```bash\nuv run md2pdf output/PFFA_2026-09-13\nuv run md2pdf output/PFFA_2026-09-13/final_trade_decision.zh-TW.md\nuv run md2pdf output/8035.T_2026-07-29 output/PFFA_2026-09-13\n```\n\nThe standalone command infers the ticker and trade date from a directory named\n`<TICKER>_<YYYY-MM-DD>`. For files elsewhere, optional `--ticker` and\n`--trade-date` values control the title and subtitle. Existing PDFs are\noverwritten after a successful render.\n\nIf rendering fails during `analyze`, the completed Markdown reports are kept,\nthe run still succeeds, the error is printed to stderr, and `pdf_error` appears\nin the JSON result. The standalone command instead exits with a nonzero status\nafter reporting any failed targets.\n\n# Acknowledgements and Citation\n\nThe original TradingAgents project was developed by Tauric Research and is\ndescribed in the following paper:\n\n@misc{xiao2024tradingagents,\n    title={TradingAgents: Multi-Agents LLM Financial Trading Framework},\n    author={Yijia Xiao and Edward Sun and Di Luo and Wei Wang},\n    year={2024},\n    eprint={2412.20138},\n    archivePrefix={arXiv},\n    primaryClass={q-fin.TR}\n}\n","readmeExcerpt":"TradingAgents This project is a CrewAI-based reimplementation/replication of $1, the multi-agent LLM financial trading framework proposed in the paper *TradingAgents: Multi-Agents LLM Financial Trading Framework*. Project Goal This project aims to reproduce the core ideas of $1 using the $1 framework. The original TradingAgents framework is a multi-agent LLM system for financial trading research. It is inspired by th","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"uv run analyze"},{"language":"bash","snippet":"uv run analyze --ticker AAPL --trade-date 2026-05-25"},{"language":"bash","snippet":"uv run analyze --ticker AAPL"},{"language":"bash","snippet":"uv run analyze --ticker AAPL --language zh-TW"},{"language":"bash","snippet":"uv run analyze --ticker AAPL --language zh-TW\nuv run analyze --ticker AAPL --language zh_tw\nuv run analyze --ticker AAPL --language \"Traditional Chinese\""},{"language":"bash","snippet":"TRADING_AGENTS_TRANSLATION_STAGE__LANGUAGE=ja uv run analyze --ticker AAPL"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[],"languages":["python"],"docsSourceLabel":"GITHUB REPOS","editorialOverview":"This is a replicate of https://github.com/TauricResearch/TradingAgents using CrewAI framework. TradingAgents This project is a CrewAI-based reimplementation/replication of $1, the multi-agent LLM financial trading framework proposed in the paper *TradingAgents: Multi-Agents LLM Financial Trading Framework*. Project Goal This project aims to reproduce the core ideas of $1 using the $1 framework. The original TradingAgents framework is a multi-agent LLM system for financial trading research. It is inspired by th","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":374,"uniquenessScore":64,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T13:16:28.497Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T13:16:28.497Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:15:01.144Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/github_repos","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}