278 Commits
Author SHA1 Message Date
Yijia-Xiao bf7f4b55a3 fix(tools): accept only the statement frequencies the vendors serve (#1593)
- freq is annual or quarterly in the tool schema; any other word is sent back to the model instead of being served annual figures under that word
2026-10-27 08:01:21 +00:00
Yijia-Xiao d46c052278 test: fix tests that failed on Windows and macOS (#1506, #1485, #1541)
- the module-help subprocess is read as UTF-8 under a cp1252 locale
- the yfinance cache check names the suite's directory, which may sit under the home on Windows
- POSIX file modes and shell upgrade commands are checked only off Windows
- file locking names errno.EDEADLK, which macOS also defines
2026-10-27 08:01:08 +00:00
Yijia-Xiao a334a1f878 fix(cli): check a ticker with the data layer's own rule (#1604)
- the prompt and --ticker accept what the run accepts: XAUUSD+ resolves to GC=F, while ".." and full-width letters are refused at entry instead of after the graph is built
2026-10-27 08:00:43 +00:00
Yijia-Xiao ae0424745e fix(llm): read a dated Claude snapshot's version without its date (#1585)
- claude-sonnet-4-20250514 no longer receives the effort setting it rejects, and claude-opus-4-5-20251101 now receives it
2026-10-27 08:00:30 +00:00
Yijia-Xiao 347974a000 fix(llm): pass the output-token cap and a configured endpoint to Azure OpenAI (#1584, #1600)
- max_tokens reaches the Azure deployment
- a tier's backend_url is used as the Azure endpoint, else AZURE_OPENAI_ENDPOINT
2026-10-27 08:00:17 +00:00
Yijia-Xiao b78f136ba3 fix(polymarket): keep a long shot's odds from printing as 0% or 100% (#1598)
- within 1% of 0 or 100, the distance keeps two significant digits: 0.05%, 99.95%
2026-10-27 08:00:04 +00:00
Yijia-Xiao caf6792bba fix(memory): take the most recent lessons by decision date (#1603)
- get_past_context orders a ticker's settled decisions by their date, so a backfill of older dates no longer pushes out the latest lesson
- rotation drops the oldest-dated settled entries, not the first written
2026-10-27 07:59:51 +00:00
Yijia-Xiao ee06dcb961 fix(tools): send a date window that ends before it starts back to the model (#1595)
- as_of_window refuses a start after the end, as it does an unreadable start, instead of passing it to the vendor
2026-10-27 07:59:39 +00:00
Yijia-Xiao 21bc5d8fe7 fix(reporting): remove a previous run's sections when a report is saved to the same folder (#1566)
- write_report_tree deletes the section files and HTML page this run did not write; other files in the folder are kept
2026-10-27 07:59:26 +00:00
Yijia-Xiao 2717033ad8 fix(sec_edgar): serve a statement one row per period (#1517, #1542)
- a row per period with the line items as columns, so each figure sits beside its own date across a filer's whole history
- lines the filer never tagged are named once in the header
2026-10-27 07:59:13 +00:00
Yijia-Xiao 50bf38ee92 fix(sec_edgar): print a figure under one million instead of 0 (#1589)
- a USD figure under one million keeps three significant digits in the statement table
2026-10-27 07:59:01 +00:00
Yijia-Xiao 6c23d7551c fix(yahoo): print prices with their significant digits (#1567)
- the price table and the verified snapshot keep six significant digits and at least two decimals, so a sub-cent close is no longer 0.00 and a currency pair keeps its pips
2026-10-27 07:58:48 +00:00
Yijia-Xiao 3225a3c054 fix(portfolio): refuse a portfolio with a number that is not finite (#1509)
- cash, quantities and average prices reject NaN and infinity when the file loads
2026-10-27 07:58:35 +00:00
Yijia-Xiao 62a06edb38 fix(portfolio): match a holding listed under a broker alias to the analyzed instrument (#1556)
- a holding matches when its symbol resolves to the one the run prices (BTCUSDT -> BTC-USD, 700.HK -> 0700.HK); holdings keep the spelling they were given
- every matching holding is shown, labelled with its listed spelling
2026-10-27 07:58:23 +00:00
Yijia-Xiao 28d32653d3 fix(backtest): give each sweep started without a run_id its own run (#1549)
- the stamped run directory is claimed atomically; a second sweep in the same second takes the next suffix instead of resuming the first
2026-10-27 07:58:10 +00:00
Yijia-Xiao 1c0e3e37fc fix(backtest): report the settlement failures a sweep's last pass records (#1557)
- run_backtest adds settle_pending's failed entries to settlement_failures, each reason prefixed with its date
2026-10-27 07:57:57 +00:00
Yijia-Xiao eb4a486092 fix(memory): settle decisions on final closes, across long market closures (#1548, #1539)
- the bar of a session still trading, by its market's date, is not scored
- a holding window that has passed without the stock or its benchmark trading through is fetched again through today
- a window that cannot have traded yet asks for no prices
2026-10-27 07:57:45 +00:00
Yijia-Xiao a5b0f217e3 fix(tools): hand vendors the model's dates as YYYY-MM-DD (#1488)
- as_of and as_of_window return canonical dates, so an unpadded date such as 2024-7-5 no longer compares as later than a filing dated 2024-07-24
- create_run_state validates the run date, as propagate does
2026-10-27 07:57:32 +00:00
Yijia-Xiao f5e3eae3a8 fix(memory): score a decision from the first close after its date (#1518)
- settlement enters at the first session after the decision date, so news published after that day's close is not scored against the same day's close
2026-10-16 21:12:51 +00:00
Yijia-Xiao 7142746bde fix(cli): keep a tier's configured thinking setting when the main provider has none (#1440)
- the run config takes reasoning effort, thinking level and Claude effort from the selections only when one was chosen
2026-10-16 21:12:39 +00:00
Yijia-Xiao 36479ae1fa feat(llm): chatgpt provider runs on the signed-in ChatGPT plan (#1475)
- ChatGPTPlanChatOpenAI streams unstored Responses, sends system instructions as developer messages, drops refused settings with a warning, and sends no API organization or project
- the CLI offers it under "Subscription" after Anthropic, checks the sign-in before a run (signing in or stopping with the login command), and lists the plan's models
- reasoning effort applies to chatgpt as to openai; remembered plan models are offered again
2026-10-16 21:12:26 +00:00
Yijia-Xiao 69042d6d33 feat(llm): sign in with a ChatGPT plan (#1475)
- chatgpt_auth signs in through OpenAI's flow for open-source apps (PKCE, loopback or pasted redirect, verified ID token, plan scope) and keeps the sign-in in ~/.tradingagents/chatgpt-auth.json, readable only by its owner
- access tokens renew under a lock shared across threads and processes, from the refresh token on disk
- `tradingagents login chatgpt` and `tradingagents logout chatgpt`; logout revokes the sign-in at OpenAI
2026-10-16 21:12:14 +00:00
Yijia-Xiao 071a6cea2a refactor(llm): let a provider sign in with its own credential at a pinned endpoint
- a provider entry can supply a credential, a token callable per request, and pin its base URL
- such a provider never sends an API key, and refuses another backend_url or an explicit api_key
2026-10-16 21:12:05 +00:00
Yijia-Xiao c3cdaeb4eb feat(cli): tell people at a terminal about a newer release and Tauric's notices
- once a day a background thread records the latest GitHub release and the notices for each version; the welcome screen shows them from that cache, so no run waits on the network
- the release notice names the upgrade command for how TradingAgents was installed
- TRADINGAGENTS_NO_UPDATE_CHECK=1 turns the check off; unattended and CI runs never make it
- notices are read from a new `notices` key, so earlier versions keep reading `announcements`
2026-10-16 21:11:55 +00:00
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