254 Commits
Author SHA1 Message Date
Yijia-Xiao f72382414c fix(tools): send a start date that is not a date back to the model (#1476)
- get_news and get_stock_data answer an unreadable start_date with the form to use, instead of passing it to a vendor
2026-10-03 21:27:43 +00:00
Yijia-Xiao b3ca569c4c feat(fred): name the euro-area macro series (#1465)
- get_macro_indicators accepts ecb_deposit_rate, ecb_main_refi_rate, euro_hicp, euro_core_hicp, euro_real_gdp, germany_10y, france_10y and eur_usd
2026-10-03 21:27:43 +00:00
Yijia-Xiao c925f60328 feat(sentiment): search crypto communities on Reddit for a crypto ticker (#1461)
- a crypto pair is searched in r/CryptoCurrency and r/CryptoMarkets, plus r/Bitcoin, r/ethereum or r/solana for those coins, still in one request
- the Sentiment Analyst's prompt names the subreddits actually searched
2026-10-03 21:27:43 +00:00
Yijia-Xiao df630b9aea fix(rating): read a rating another party gave as evidence, not as the decision (#1466)
- a decision that opens with its rating line, plain or as the list item the prompt asks for, is read from that line
- only words naming the decision itself ("final", "our", "overall") may qualify its rating line; "Consensus rating: Buy" or "Trader's rating: Buy" is another party's
- otherwise the decision's own rating lines, or failing those all rating labels, must agree; ratings that differ need review
2026-10-03 21:27:43 +00:00
Yijia-Xiao 442907897e fix(yahoo): read a symbol's news from Yahoo search when its quote feed is empty (#1467, #1469)
- an empty quote feed falls back to the search articles tagged with the symbol
- when search has no article tagged with the symbol, or neither source answers, Yahoo news is unavailable, so a configured next vendor serves the call
- articles from search never make an empty window read as no news
2026-10-03 21:27:43 +00:00
Yijia-Xiao 11dab3b0fe fix(memory): settle each decision once, and keep each outcome as soon as it is known
- a settlement pass holds the log's settlement lock, so runs sharing a log never pay for the same reflection twice; only outcomes actually written count as settled, and a run's Memory Log step does not wait for another run's pass
- each outcome is written when its reflection is done, so an interrupted pass keeps what it finished
- any failure to price a decision is reported as a failed settlement, not taken for a window that has yet to trade
2026-10-03 21:27:43 +00:00
Yijia-Xiao 460b82e20d fix(reports): name the sentiment analyst in the report header as users select it
- the header lists "sentiment", the name the CLI and flags use, where it printed the internal key "social"
2026-10-03 21:27:43 +00:00
Yijia-Xiao 56a98d9df7 feat(reports): save the report as one HTML page as well (#1419)
- a saved report also includes complete_report.html: the report as one self-contained page with its sections listed beside the text, readable in a browser, on a phone and in print
- answering the save question at the prompt also asks about the page and offers to open it in a local browser window; --no-html and save_reports(..., html=False) skip it
- the Tauric Research logo leads the header at the top left, and a line at the foot credits TradingAgents and Tauric Research
- the page loads nothing and runs nothing (inline styles, a content-security policy); report text is rendered without raw HTML or images
- markdown-it-py is declared as a dependency
2026-10-03 21:27:43 +00:00
Yijia-Xiao d53b076b7a feat(reports): name the rating in the report header
- the header lists the run's rating, REVIEW when the decision has none
2026-10-03 21:27:43 +00:00
Yijia-Xiao cc39a35c42 feat(llm): let each model tier run on its own provider (#1440)
- quick_think_provider / deep_think_provider and their backend URLs (with TRADINGAGENTS_* variables) choose a tier's provider; unset, a tier uses llm_provider and backend_url
- a tier on another provider gets that provider's own settings and endpoint, and the run settings and report header name each tier's provider
- the CLI checks each tier provider's model variable and key before the run
2026-10-03 21:27:43 +00:00
Yijia-Xiao f65fcabb60 feat(graph): settle past decisions alongside the analysts (#1428)
- a Memory Log step runs beside the analysts, settles every ticker's due decisions and loads the lessons known by the trade date for the Portfolio Manager; the run no longer settles before it starts
- a settlement failure is logged and noted in the report's header instead of ending the run
- the checkpoint signature records the new layout
2026-10-03 21:27:43 +00:00
Yijia-Xiao 5d8de36f6d feat(memory): settle the pending decisions of every ticker on request (#1445)
- TradingAgentsGraph.settle_all_pending() settles each ticker with a due decision; settle_pending and it return the decisions settled and those that failed
2026-10-03 21:27:43 +00:00
Yijia-Xiao 97b79e08c3 fix(alpha_vantage): keep the API key out of every error an Alpha Vantage answer raises
- rate-limit and invalid-key notices are scrubbed of the key as the rejection message is
2026-10-03 21:27:43 +00:00
Yijia-Xiao b838e257ee fix(sentiment): send Jev requests to the endpoint TYPESAFE_BASE_URL names (#1416)
- post screening reads TypeSafe's own TYPESAFE_BASE_URL and appends /v1/systemone, as the TypeSafe SDKs do, so Jev can be reached through OpenRouter; the key still turns screening on
2026-10-03 21:27:43 +00:00
Yijia-Xiao 9df071b25b fix(google): give a Gemini call the same 600-second timeout as the other providers (#1417)
- GoogleClient sets timeout=600 unless one is passed, as the OpenAI and Anthropic SDKs do by default, so a stalled call no longer hangs the run
2026-10-03 21:27:43 +00:00
Yijia-Xiao 810b4cc48d fix(yahoo): print each fundamentals money figure with the currency it is in (#1456)
- price levels carry the quote currency (GBp for London), market cap and per-share figures its main unit (GBP), and income figures the reporting currency (TWD for TSMC's ADR)
2026-10-03 21:27:43 +00:00
Yijia-Xiao 5ca37b5088 fix(alpha_vantage): report a request Alpha Vantage rejects as unavailable (#1442)
- an {"Error Message": ...} answer raises VendorUnavailableError, with the key scrubbed, instead of being served as data or as "no data"
2026-10-03 21:27:43 +00:00
Yijia-Xiao 9dceea6e9d fix(yahoo): read a news article whose fields are null (#1458)
- each article field falls back to its default on a null as well as on a missing key, so one malformed article no longer loses a ticker's news
2026-10-03 21:27:43 +00:00
Yijia-Xiao 7d38885e81 build: require Python 3.11 and pandas 3
- requires-python 3.11 and pandas 3.0.6; the CI matrix runs Python 3.11 to 3.14 and ruff targets 3.11
- datetime.UTC in place of timezone.utc, and the rating, action, band, analyst and asset enums are StrEnum, which formats a member as its value
2026-09-29 05:57:18 +00:00
Yijia-Xiao da6b35f22f fix(dataflows): withhold insider trades with no filing date from a past run
- Yahoo and Alpha Vantage date a trade by when it happened, not by its Form 4 filing, so a run dated in the past is told they are withheld instead of served trades that may not yet have been public
2026-09-29 05:57:18 +00:00
Yijia-Xiao 1cf16bd0e4 fix(sec_edgar): serve a quarterly figure filed only year to date, naming its span
- each row takes the quarter where filed, else its 6- or 9-month figure to date, in a column labelled with the span; a filer that tags 10-Q cash flows only year to date no longer stops at each first quarter
2026-09-29 05:57:18 +00:00
Yijia-Xiao 2486470495 fix(yahoo): read Yahoo's answer that a window has no prices as no data
- a chart with no prices, or Yahoo saying the data does not exist, is an empty answer; yfinance's same error for an error status or a service failure, and a missing time zone, stay unavailable
2026-09-29 05:57:18 +00:00
Yijia-Xiao e1a19fd78e refactor(cli): save a run's reports through the graph, as a script does
- TradingAgentsGraph.default_report_path names the results_dir/reports/TICKER_stamp folder; save_reports and the CLI both use it
2026-09-29 05:57:18 +00:00
Yijia-Xiao ad39133569 refactor(yahoo): keep what every Yahoo request shares in yahoo.common
- yf_retry, raise_for_empty and YAHOO_HOST move from yahoo.ohlcv, which the news, fundamentals and market modules imported them from
2026-09-29 05:57:18 +00:00
Yijia-Xiao d7ac9461da fix(dataflows): serve a past run financial statements only with a known filing date
- Yahoo and Alpha Vantage statements, dated by the period they cover, are withheld from a run dated in the past, with a notice saying why
- statements come from SEC EDGAR by default (fundamental_data "sec_edgar,yfinance"), so a past run reads US filers as filed
2026-09-29 05:57:18 +00:00
Yijia-Xiao 1d92269d35 fix(rating): read a decision's rating only from its label
- a decision without a rating label is REVIEW; a lone rating word in its prose may be one it argues against ("not a Sell"), so it is no longer read as the call
2026-09-29 05:57:18 +00:00
Yijia-Xiao 1bf67e35b6 fix(yahoo): report the failed requests yfinance would answer as empty
- yfinance raises its failures instead of answering them with an empty result, so a statement request that timed out is unavailable, not "no data"
- Yahoo answering that it has no such symbol (HTTP 404) stays an answer: no data
2026-09-29 05:57:18 +00:00
Yijia-Xiao 660966d168 refactor(dataflows): decide in one place whether a run is dated in the past
- date_window.is_historical replaces the four copies of the rule in the profile guard, Polymarket, the instrument context and the memory cutoff, which read the clock on its own
2026-09-29 05:57:18 +00:00
Yijia-Xiao 06bf82569d docs: drop comments that describe code no longer there
- agents.context no longer holds a message reset between analysts
- main.py no longer ends on a reflection step it does not take
2026-09-29 05:57:18 +00:00
Yijia-Xiao 4bb9272c8f test: keep the suite off the network and out of the home directory, yfinance included
- the network guard also refuses DNS lookups and curl_cffi requests, the HTTP client yfinance uses, which never touches Python's sockets
- results, the data cache, the memory log and yfinance's time-zone cache live in a directory of the suite's own
2026-09-29 05:57:18 +00:00
Yijia-Xiao fa87947c33 test: stop reloading modules, so the suite passes in any order
- default_config.build_default_config gives the defaults with the environment as it is now; the overlay tests call it instead of reloading the module, whose reloaded DEFAULT_CONFIG leaked their settings into later tests
- the Ollama and API-key tests import the modules they check, which read the environment when called; two tests that only read os.environ are dropped
2026-09-29 05:57:18 +00:00
Yijia-Xiao 9a568d19b1 fix(graph): start a checkpointed run afresh when the settings that shape it change
- the checkpoint signature folds in the run config (provider, models, endpoint, language, vendors, limits), leaving out only file locations, the checkpoint switch and the retry count, so a resume no longer carries reports that other settings produced
2026-09-29 05:57:18 +00:00
Yijia-Xiao b99b843415 fix(agents): give a past run the company's current name only, as an identifier
- the vendor profile describes the company today, so a run dated earlier is given its name marked as the current one and no sector, industry or exchange
2026-09-29 05:57:18 +00:00
Yijia-Xiao 540ea8ca7f fix(agents): keep the labelled rating lines in English in every output language (#1435)
- the language instruction exempts the lines the program reads, the "**Rating**:" line and the transaction proposal, so a decision written in another language keeps a rating that can be read
2026-09-29 05:57:18 +00:00
Yijia-Xiao ca2ebbbdcb fix(graph): ask an analyst for its report once its tool rounds are spent (#1420)
- after max_tool_rounds rounds of tool calls (default 20, TRADINGAGENTS_MAX_TOOL_ROUNDS) the analyst takes one last turn with no tools, its tool calls and results given as text, and that turn ends its graph
- the three tool-using analysts take their turns through analysts.turn.take_turn
- a limit the recursion limit cannot hold is refused when the graph is built
2026-09-29 05:57:18 +00:00
Yijia-Xiao 0d22cad2af fix(yahoo): print the fundamentals given in percent with their unit (#1414)
- Dividend Yield and Debt to Equity carry a % sign, and Debt to Equity its ratio, beside the margins and returns Yahoo gives as fractions
2026-09-29 05:57:18 +00:00
Yijia-Xiao d201105a4d fix(cli): take the backtest's analysts as an analysis does
- backtest --analysts accepts sentiment and is checked against --asset-type before the sweep
- without --analysts, a crypto sweep runs the analysts crypto allows, not fundamentals
2026-09-29 05:57:18 +00:00
Yijia-Xiao e973dd0e25 fix(backtest): run and settle a ticker or date given twice once (#1415)
- run_backtest drops repeated tickers and dates before building the grid
2026-09-29 05:57:18 +00:00
Yijia-Xiao 13cf1e8138 fix(memory): score a decision against its benchmark over the same dates
- the stock's own sessions set the holding window; the benchmark is valued at its last close by entry and by exit, so a coin held over a weekend is compared with SPY over the same span
- bars meet on their calendar day across time zones, and a missing or non-positive close is dropped rather than scored
- an outcome waits until the benchmark has traded through the exit
2026-09-29 05:57:18 +00:00
Yijia-Xiao 42e2d569e0 fix(memory): let one writer at a time change the memory log
- storing a decision and settling outcomes hold a lock across the read, change and write, so runs sharing a log no longer drop each other's entries
- files.locked takes the lock on a .lock file beside the log, across threads and processes
2026-09-29 05:57:18 +00:00
Yijia-Xiao b89909724a fix(agents): ask again for an instrument identity whose lookup failed
- only an answered lookup is cached for the process, so one failed request no longer leaves every later run for that ticker without an identity
2026-09-29 05:57:18 +00:00
Yijia-Xiao 466d33ab3b fix(agents): answer a snapshot with no price rows as no data instead of ending the run
- build_verified_market_snapshot raises NoMarketDataError for an unknown symbol or no row by the date
- get_verified_market_snapshot returns the router's no-data answer, shared as router.no_data_available
2026-09-29 05:57:18 +00:00
Yijia-Xiao ec2ecc79c3 fix(router): report a vendor chain with an unavailable vendor as unavailable, not as no data
- a vendor that throttled or failed the request never said whether it has the symbol, so another vendor's "no data" no longer speaks for the chain
2026-09-29 05:57:18 +00:00
Yijia-Xiao 00924bb203 refactor(dataflows): name the unavailable-vendor error for what it covers
- VendorRateLimitError is VendorUnavailableError: a vendor that throttled or failed the request
2026-09-29 05:57:18 +00:00
Yijia-Xiao a6318b31cc fix(graph): stream a run under its graph's own config
- stream_run, which the CLI uses, scopes the graph's config like propagate() does, so a process-wide config changed elsewhere does not reach its tools
2026-09-29 05:57:17 +00:00
Yijia-Xiao 389ff46507 fix(yahoo): report a Yahoo request that failed as unavailable, not as no data
- yf_retry raises any failed request as unavailable: an unknown symbol comes back empty, so an exception is a failed request whether or not Yahoo's host answers a probe
- fundamentals, statements, insider transactions, the company profile, news and closes no longer turn a failed request into "no data"
2026-09-29 05:57:17 +00:00
Yijia-Xiao f4828b84ea feat(backtest): show each cell as it starts, and the run id to continue with
- run_backtest takes a progress(done, total, ticker, date) callback; tradingagents backtest prints [n/total] per cell and ends with the --run-id that continues or settles the sweep
2026-09-29 05:57:17 +00:00
Yijia-Xiao 052a98d6eb fix(agents): serve the run's instrument, whatever symbol the model passes
- the nine ticker-taking tools read company_of_interest from graph state, like trade_date; the model no longer supplies a symbol (it had passed indicator names such as RSI, a real ticker)
- the News Analyst prompt and the tool descriptions no longer ask for a ticker
2026-09-29 05:57:17 +00:00
Yijia-Xiao 9470b92150 fix(cli): write the state log, and name the analysts as users know them
- record_decision writes the run's state log, so CLI runs save full_states_log like propagate() does
- with both round counts from the environment, the CLI no longer says a chosen research depth was overridden
- an unknown --analysts name lists sentiment, not social
2026-09-29 05:57:17 +00:00
Yijia-Xiao 9968bd8dd1 feat(graph): run the analysts at the same time (#1255)
- each analyst is a graph of its own (model and tools on a private message history) that returns only its report; all start together and the research debate waits for every report
- the message-clearing nodes are gone; a checkpoint saved by the sequential layout starts fresh
- TradingAgentsGraph.stream_run streams the analysts' messages for debug mode and the CLI, whose status and timing now track the analysts side by side
2026-09-25 06:35:54 +00:00