Commit Graph
448 Commits
Author SHA1 Message Date
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 0f05689334 docs: show a current Claude model ID in the Bedrock example 2026-09-29 05:57:18 +00:00
Yijia-Xiao 76a93480dd build: run the Docker image on Python 3.13, and set up with it in the README 2026-09-29 05:57:18 +00:00
Yijia-Xiao 23bed8dace ci: test Python 3.14 and run the current checkout and setup-python actions
- the test matrix adds Python 3.14
- actions/checkout and actions/setup-python v7; the lint job installs ruff 0.16
2026-09-29 05:57:18 +00:00
Yijia-Xiao f65eab7b80 build(deps): require the current yfinance, LangChain and LangGraph releases
- yfinance 1.7.0, langchain-core 1.6.5, langchain-openai 1.6.6, langchain-anthropic 1.7.4, langchain-google-genai 4.4.0, langgraph 1.2.12, langgraph-checkpoint-sqlite 3.1.1
- langchain-aws 1.7.9 for the bedrock extra, and ruff 0.16 for development
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 0d2cfa32e0 docs(changelog): complete the 0.5.1 import moves (#1437)
- get_scrubbed and vendor_reachable moved to dataflows.net, and symbol_utils.is_yahoo_safe was removed
2026-09-29 05:57:18 +00:00
Yijia-Xiao e44cbbc8eb test: run the live integration tests only when asked for
- pytest deselects integration tests unless -m integration is given, so a key in .env no longer makes a plain run call a paid provider
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 c540c00778 docs: show save_reports in the Python example 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
Yijia-Xiao fc1ab1db07 fix(dataflows): write cache files whole, through a temp file of their own
- the OHLCV cache and the SEC EDGAR cache go through dataflows.files.replace_file: a reader sees the old file or the new one, and concurrent writers never share a temp file
2026-09-25 06:35:54 +00:00
Yijia-Xiao 0c602846ba feat(cli): run an analysis without questions from flags (#1127, #1133)
- --ticker, --date and --analysts answer their steps, checked as the prompts check them; --save/--no-save and --show/--no-show answer the questions after the run
- with no terminal, the run stops before it starts and names every flag or TRADINGAGENTS_* variable still needed; a missing API key and an announcement no longer wait for input
- README shows an unattended run
2026-09-24 20:42:51 +00:00
Yijia-Xiao a1b3b5bab8 feat(reports): record the analysis date and what produced a run (#752)
- TradingAgentsGraph.run_settings(): version, provider, models, analysts, debate rounds, language and vendors; no endpoints, keys or paths
- complete_report.md opens with the analysis date and those settings; the saved state log carries them as run_settings
2026-09-24 19:38:41 +00:00
Yijia-Xiao d91d1f4cb4 build: keep the package version in tradingagents.__version__
- pyproject reads the version from tradingagents/__init__.py, so a source checkout, an editable install and a wheel report the same one
- the SEC EDGAR User-Agent names tradingagents.__version__
2026-09-24 19:38:41 +00:00
Yijia-Xiao 45391d0962 feat(docker): keep results in a host folder when TRADINGAGENTS_DATA_DIR is set (#865)
- both compose services mount ${TRADINGAGENTS_DATA_DIR:-tradingagents_data}; unset keeps the named volume
- README and .env.example show the setting
2026-09-24 19:38:41 +00:00
Yijia-Xiao cf960d6382 refactor: one name per decision in the state and its log
- the Research Manager's plan and the Portfolio Manager's decision live only in investment_plan and final_trade_decision; the debate states no longer copy them as judge_decision
- the saved state log writes the Trader's plan as trader_investment_plan, its state key
- the report tree, the final display and the live CLI read the decisions from those fields
2026-09-24 19:38:41 +00:00
Yijia-Xiao 1d20780095 chore: remove code nothing reads
- router.VENDOR_LIST, and the state's sender field with the Trader's partial that only set it
2026-09-24 19:38:41 +00:00
Yijia-Xiao 3f6ad5dc12 docs: say which agent writes each state field, and what the debate limits count
- state field descriptions name the Research Manager, the News and Fundamentals Analysts and the Portfolio Manager; comments that only repeat them are gone
- the debate-limit comments count turns per max_debate_rounds and max_risk_discuss_rounds
- date_window's docstring covers all the point-in-time rules it holds
2026-09-24 19:38:41 +00:00
Yijia-Xiao 674f1087d1 refactor: name the data layer's date argument as_of_date
- vendor functions and date_window take as_of_date, the date data is served as of; the model-facing tool arguments are unchanged
- build_instrument_context and resolve_instrument_context take trade_date, which is what they receive
2026-09-24 19:38:41 +00:00
Yijia-Xiao 5ac5786d0d docs: call it the memory log throughout
- docstrings, comments, messages and the README section use "memory log", matching TradingMemoryLog and memory_log_path
- the write, read and settle paths are named for what they do, not by design phase
2026-09-24 19:38:41 +00:00
Yijia-Xiao c50420fc5c refactor: gather the memory log, settlement and reflection in tradingagents/memory
- memory/log.py holds TradingMemoryLog, still imported from tradingagents.memory
- graph/settlement.py and graph/reflection.py move to memory/; Reflector leaves tradingagents.graph's exports
2026-09-24 19:38:41 +00:00
Yijia-Xiao b690dc7988 fix(rating): read a free-text rating from the decision's own rating line (#1383)
- the first line opening with a rating label is the call, not a rating the text quotes later ("Consensus rating: Buy")
- "rating" must start a word, so "Operating margin: Sell-side" is not a label
2026-09-24 18:45:44 +00:00
Yijia-Xiao a94a411b0e fix(agents): carry the Portfolio Manager's rating through the run (#1383)
- the typed rating is the state's final_rating; propagate returns it, and the memory log tag, the state log and the CLI review check read it
- the decision text is parsed only when the Portfolio Manager answered in free text
- TradingAgentsGraph.process_signal is removed
2026-09-24 18:45:44 +00:00
Yijia-Xiao 05878c96a8 test(net): pin that get_scrubbed keeps the vendor key out of errors (#1398)
- the message and args are masked; no request, response or chained original travels with the error; a passthrough status is returned
2026-09-24 18:45:44 +00:00
Yijia-Xiao f9d6495dca fix(fred): state the dates a macro change spans (#1397)
- the change line reads "Change from <first> to <last>" instead of "Change over window", so a partial-year move no longer reads as year on year
2026-09-24 18:45:44 +00:00
Yijia-Xiao f4269bf193 test: keep the CLI's saved selections out of the user's home (#1395)
- every test saves and reads CLI selections under its own tmp_path
2026-09-24 18:45:44 +00:00