Click to copy
SURFACE. Claude Code, started in an empty folder you made for this. If this is a chat app, STOP
and say it is a Claude Code job; point me to prompt 05 (the by hand path). Model: /model, Claude Opus 5.5.
You WRITE files and RUN commands in this session. You do not describe them and you do not ask me to
type what you can run. Show me the real output of every command. Nothing here places a trade.
COST WARNING, say it before step 1. This calls the Anthropic API with my ANTHROPIC_API_KEY and
bills per token on my account. It does not use my Claude Code subscription. The repo states no
price per run, so neither do I. I read the cost in the Anthropic Console after the first run.
STEP 1. Preflight. Run: uv --version, git --version, python3 --version (3.11 or later is
required). Check my key WITHOUT printing it: echo "${ANTHROPIC_API_KEY:+key is set}". If it prints
nothing, STOP: tell me to export ANTHROPIC_API_KEY in my own terminal and restart Claude Code.
Never ask me to paste the key here. Warn me once: a key exported in the shell that starts Claude
Code may be used by Claude Code itself instead of my subscription (unverified), so check /status
after this run.
STEP 2. Ask me for ONE ticker (a US ticker such as NVDA is the simplest) and ONE analysis date in
the past, format YYYY-MM-DD (this pack's own rule: pick one at least 10 trading days back so the outcome has settled). Wait for both.
STEP 3. Clone and install. Run these exactly, from the folder we are in:
git clone https://github.com/TauricResearch/TradingAgents.git
cd TradingAgents
uv venv --python 3.13
source .venv/bin/activate
uv pip install .
Run the cd, the activation and the checks below in ONE shell call (a venv does not persist between
separate calls), or call .venv/bin/tradingagents directly. Then run: tradingagents --help
Pass: the help text lists --ticker, --date, --analysts and --save. Also run: git log -1 --format=%h
and python -c "import tradingagents; print(tradingagents.__version__)" and write both to RUN-LOG.md.
STEP 4. Write run_one.sh one folder up (outside the clone) with exactly this content, filling in
my ticker and date. It must not contain the API key:
source "$(dirname "$0")/TradingAgents/.venv/bin/activate"
export SEC_EDGAR_USER_AGENT="<my name and email, ask me>"
export TRADINGAGENTS_LLM_PROVIDER=anthropic TRADINGAGENTS_QUICK_THINK_LLM=claude-opus-5-5 TRADINGAGENTS_DEEP_THINK_LLM=claude-opus-5-5
export TRADINGAGENTS_OUTPUT_LANGUAGE=English TRADINGAGENTS_MAX_DEBATE_ROUNDS=1 TRADINGAGENTS_MAX_RISK_ROUNDS=1
tradingagents --ticker <TICKER> --date <DATE> --analysts market,news,fundamentals --save --no-show
This is the first, cheaper run: three analysts, one debate round, one risk round. The repo's own
README example uses the same flags. Run it with bash, show me the output, and note the time taken.
STEP 5. Pass condition. The run PASSES only if ALL of these are true, and you check each one with a
command, not from memory:
a. The command exited 0 and printed a "Report saved to:" line (with --no-show the decision is not
printed; it is in the saved files).
b. A new complete_report.md exists for my ticker and date. The "Report saved to:" line gives the
path; saved reports sit under ~/.tradingagents/logs/reports/<TICKER>_<timestamp>/ (check that
path with ls -t) and the folder holds 1_analysts, 2_research, 3_trading, 4_risk and
5_portfolio. Run ls -R on it.
c. 5_portfolio/decision.md names exactly one rating from Buy, Overweight, Hold, Underweight, Sell.
d. The ticker and the analysis date in the report header are the ones I asked for.
e. No analyst report is thin: each of the analysts you ran has a real section. grep the whole report folder AND the message_tool.log in the run folder
(~/.tradingagents/logs/<TICKER>/<date>/message_tool.log) for NO_DATA_AVAILABLE and DATA_UNAVAILABLE. NO_DATA_AVAILABLE means
an analyst had no price data. DATA_UNAVAILABLE on price, news or fundamentals means a vendor
could not serve it. Either one is NOT a pass, even if a decision printed: name the analyst and
go to the failure modes. DATA_UNAVAILABLE on an optional category (macro, prediction markets)
is noted in RUN-LOG.md and is not a fail.
Print a table with one row per check: PASS or FAIL and the evidence line.
STEP 6. Second run, only after step 5 passes: the same command with
--analysts market,sentiment,news,fundamentals so all four analysts run. The Sentiment Analyst reads
StockTwits and Reddit, so treat it as the least stable input. Compare the two decisions and say
plainly if they differ. Two runs of the same input can differ: the README says LLM sampling is not
deterministic.
FAILURE MODES. Match the symptom, name the cause, apply the fix, re-run step 5.
1. Symptom: an analyst report says data is unavailable, or says the ticker may be invalid or
delisted, or the run stops with YFRateLimitError / "Too Many Requests". Cause: Yahoo Finance is
rate limiting this network (reported on data center and some non US networks, repo issues 1386
and 1425). Fix: wait and retry, run from a home network without a VPN, run fewer analysts. The
free Alpha Vantage tier (25 requests a day, ALPHA_VANTAGE_API_KEY) does not survive a full run.
Never fill the gap by writing numbers yourself.
2. Symptom: an analyst report is thin or says it wrote from what it had gathered. Cause: a model kept
calling tools; since the fix for repo issue 1420 (in 0.5.2 and later, so in this clone) the
analyst is cut off after TRADINGAGENTS_MAX_TOOL_ROUNDS rounds (default 20) and writes its report
from what it has, and the run goes on. Fix: read that analyst's report before trusting the
decision, lower the setting or run fewer analysts, and re-run with --checkpoint so a crashed run
resumes from the last good step.
3. Symptom: the API rejects a request as too large. Cause: the news payload is too big for the
model context; seen when Alpha Vantage news is switched on (repo issue 1625, open; reported on a local llama.cpp model, not confirmed on Claude). Fix: keep
the default news source (yfinance) and do not switch news_data to alpha_vantage.
4. Symptom: an authentication error, a model not found error, or HTTP 400 "This model does not
support the effort parameter". Cause: the key is not set in the shell that ran the command, or
a model name was typed by hand. Fix: re-check the key as in step 1, use only claude-opus-5-5
(or claude-sonnet-5) as the model names, and unset TRADINGAGENTS_ANTHROPIC_EFFORT.
BUILD TRAPS. Tell me all four before I run on any other date.
1. Lookahead. The analysis date must be in the past, but a past date is not a clean test. The
README says news and social sources "still reflect now" for a past date. Statements from outside
SEC EDGAR and insider trades are withheld for a past date, so those analysts may report less. A
good-looking decision on a past date proves nothing about the future.
2. Truncated data. If a data call is rate limited, the report is built on less than it appears.
Check 5e every time.
3. Cost. One run is one full pipeline. tradingagents backtest NVDA,AAPL --start 2026-06-01 --end
2026-08-01 --every 7 is 2 tickers by 9 dates, 18 full runs. Do not run a backtest without
telling me the number of runs first and getting my yes.
4. Memory. Every completed run appends to ~/.tradingagents/memory/trading_memory.md, and later runs
read it. A test run changes what the next run sees. Set TRADINGAGENTS_MEMORY_LOG_PATH to a
scratch file for experiments.
OUTPUT. Write RUN-LOG.md in the project folder: version, command, date asked, time taken, the
step 5 table, the rating, the cost I read from the Console (leave blank, I fill it), and any failure
mode hit. Then print: what was read, what ran, what passed, open items, next step (prompts 05 to 08 to run the seats by hand on the same ticker, or stop). The Portfolio Manager rating is an input to my decision. It is
not an order. A named human signs, and this is not financial advice.
<trap>A printed decision is not a passed run. An analyst with no data still lets the pipeline finish, so check 5e every time before you trust the rating.</trap>
Stop: if checks 5a to 5e do not all pass, do not run step 6, do not change the ticker, and do not run a backtest. Report the failing check and its failure mode, fix that one cause, and re-run step 5.