Commit Graph
182 Commits
Author SHA1 Message Date
Yijia-Xiao 8efb702871 style: normalise blank lines between definitions
- two between top-level definitions, one between methods, none doubled inside a body
2026-09-24 05:00:36 +00:00
Yijia-Xiao 91c4319147 test: keep tests off the network
- conftest refuses socket connections outside tests marked integration
- the one test that probed Yahoo for real now stubs the reachability check
2026-09-24 05:00:36 +00:00
Yijia-Xiao 4a30cb1c0a refactor(cli): split the interactive choices and the run loop out of cli/main.py
- selections.py asks what to run; run.py builds the graph, streams it to the live view and saves the report
- main.py keeps the Typer app and its two commands
2026-09-24 05:00:36 +00:00
Yijia-Xiao 56bd98f690 refactor(cli): move the live view to cli/display.py and the prompts to cli/prompts.py
- display.py holds the message buffer, layout, status tables and report panels, the analyst wall-time tracker (CLI-only, from graph/analyst_execution) and the one Console
- utils.py is renamed prompts.py, which is what it holds; its analyst list is ANALYST_CHOICES, apart from display's ANALYST_ORDER
- get_initial_analyst_node, a one-line helper with one caller, is inlined
- the wall-time tracker tests sit with the other display tests, and tests import cli.prompts as prompts
2026-09-24 05:00:36 +00:00
Yijia-Xiao 969861e8be refactor(graph): settle past decisions in graph/settlement.py
- resolve_benchmark, fetch_returns and settle_pending are module functions; the graph's settle_pending runs them under its config
- create_run_state settles through settle_pending, so the CLI path also settles under the graph's config
2026-09-24 05:00:36 +00:00
Yijia-Xiao c9695673bf refactor(llm_clients): build the client keyword arguments in llm_clients
- build_llm_kwargs(config) replaces the graph's _get_provider_kwargs, with the retry and token coercion beside it
2026-09-24 05:00:36 +00:00
Yijia-Xiao e7354d8af4 refactor: move the decision log to tradingagents/decision_log.py
- it is the run's persistent record, used by the graph, backtest and CLI, not an agent utility; agents/utils is gone
2026-09-24 05:00:36 +00:00
Yijia-Xiao dcbff5ea42 feat(backtest): summarize a backtest result, or a decision log by its path
- callers no longer construct TradingMemoryLog to score a run; README and CLI pass the result
2026-09-24 05:00:36 +00:00
Yijia-Xiao 852ffead43 refactor(agents): organise the agents package by what each module holds
- tools.py: the analysts' data tools, previously seven modules under utils
- context.py (was agent_utils, without its tool re-exports), state.py, rating.py and structured.py sit beside schemas.py
- every role package has an __init__
2026-09-24 04:37:40 +00:00
Yijia-Xiao 6097b582d9 refactor(dataflows): group the vendors under dataflows/vendors
- vendors/yahoo: ohlcv (loader and cache), market (prices, indicators), fundamentals (profile, statements, insider), news, snapshot
- vendors/alpha_vantage is a package; sec_edgar, fred, polymarket, reddit and stocktwits sit beside it
- the one-method StockstatsUtils class is a function; the duplicate Yahoo host constant is gone
- tests are named after the modules they cover: test_ohlcv_date_column, test_yahoo_snapshot, and the ohlcv and snapshot aliases
2026-09-24 04:37:40 +00:00
Yijia-Xiao c42a2f2c61 refactor(dataflows): name the shared modules by what they hold
- interface -> router; symbol_utils -> symbols, which also takes safe_ticker_component
- utils is split: get_current_date to date_window, the HTTP helpers to net
- dataflows imports are absolute; the NoMarketDataError re-export from symbols is gone
2026-09-24 04:31:05 +00:00
Yijia-Xiao a58aa613fc fix: name no date after the run in what a historical run reads
- coverage and withholding notices named where a vendor's coverage starts or today's date
- the instrument context named today's date in every analyst prompt
2026-09-24 04:31:05 +00:00
Yijia-Xiao 9b14233a24 chore: remove code nothing uses
- is_yahoo_safe, has_checkpoint, get_wall_times, the graph's curr_state and the project_dir config key
- the CLI's final_report and current_agent state, its duplicate get_analysis_date and the save_report_to_disk wrapper
- the dotenv import guard (a hard dependency) and a warning filter for langgraph-checkpoint 4.0.3
2026-09-24 04:31:05 +00:00
Yijia-Xiao 41fc25ac0d refactor(graph): wire each analyst from one declaration of its tools
- an analyst's TOOLS tuple is both what it is offered and what its tool node runs
- one routing function replaces four copies of should_continue_<analyst>
- the sentiment analyst has no tools, so the unreachable social tool node is gone
2026-09-24 04:31:05 +00:00
Yijia-Xiao 4e1faf6465 chore(graph): remove SignalProcessor
- process_signal reads the rating with parse_rating; the adapter ignored the model it was given
2026-09-24 04:31:05 +00:00
Yijia-Xiao 15b8276b92 fix(agents): give the fundamentals analyst the insider transactions tool
- the tool sat in the news tool node, which no analyst offered it from, so no run used insider data
- the full-graph test now requires it
2026-09-24 04:31:04 +00:00
Yijia-Xiao 2938e1c7e9 fix(graph): stop keeping every run's full state in the graph
- a graph reused across a backtest grid held each run's complete state for its whole life
- the state log is written from the run's own state; the ticker attribute it read is removed
2026-09-24 04:31:04 +00:00
Yijia-Xiao f197e09dcc refactor(dataflows): read company identity and settlement prices through the data layer
- the Yahoo vendor owns get_company_profile and get_closes; agent_utils and the graph no longer import yfinance
- a test keeps vendor libraries inside dataflows
2026-09-24 00:41:56 +00:00
Yijia-Xiao b4479b0c70 fix(dataflows): stop telling a historical run today's date
- yfinance headers no longer stamp the wall clock (Data retrieved on)
2026-09-24 00:41:56 +00:00
Yijia-Xiao 4a71dc708d fix(cli): say whether a checkpointed run resumed or started fresh
- the announcement existed but the run path never called it
- tested through run_analysis rather than by calling the helper directly
2026-09-24 00:41:56 +00:00
Yijia-Xiao 1e439352c0 test: run the whole graph end to end with scripted models
- every analyst calls its tools through the router, offline; the decision is parsed and logged
- free-text and structured-output paths, and resume from a checkpoint
- remove the unused mock_llm_client fixture
2026-09-24 00:41:56 +00:00
Yijia-Xiao 5c2dded82c feat(config): benchmark B3 tickers against the Ibovespa (#1366)
- .SA maps to ^BVSP
2026-09-23 19:28:56 +00:00
Yijia-Xiao 1f7a2aa865 test: keep a developer's TRADINGAGENTS_* settings out of the suite (#1368)
- each such setting from the shell or .env is blanked before the package loads
2026-09-23 19:28:56 +00:00
Yijia-Xiao 25a86a8890 fix(config): keep the default path when a path variable is blank
- TRADINGAGENTS_RESULTS_DIR, _CACHE_DIR and _MEMORY_LOG_PATH left blank no longer resolve to an empty path
2026-09-23 19:28:56 +00:00
Yijia-Xiao 2340fe4396 test(ohlcv): stamp cache mtimes in local time (#1372)
- the cache reads mtimes back in local time; the tests wrote them as UTC
2026-09-23 19:28:56 +00:00
Yijia-Xiao 96daaf1152 fix(dataflows): read the vendors of the run in progress (#1369)
- propagate and settle_pending bind the graph's config for the length of the run
- a graph built later, or running concurrently, no longer changes another graph's vendors
2026-09-23 19:28:56 +00:00
Yijia-Xiao a9cc3be731 fix(sec_edgar): list only fiscal years in annual statements
- annual columns are the periods an annual report covers, so 10-Q balances and twelve-month totals no longer read as fiscal years
- a value is still the latest filing of any form, so a later recast counts from its filing date
2026-09-23 19:28:56 +00:00
David Arias, CFA c78fa86500 fix(sec_edgar): find capital expenditure reported as productive assets (#1370)
- Capital Expenditure also reads PaymentsToAcquireProductiveAssets, after the property and equipment tag
2026-09-23 12:28:52 -07:00
Yijia-Xiao 76a93d615a test(cli): read the backtest help without terminal styling
- colour splits "--start" across escape sequences, so the assertion strips them
2026-09-18 05:42:23 +00:00
Yijia-Xiao c039e39056 fix(dataflows): tell an outage from an unknown symbol on every Yahoo path
- prices, indicators and insider filings now use the same check as the statements
2026-09-18 04:02:57 +00:00
Yijia-Xiao d5ba41bac3 fix(dataflows): report a vendor failure as a vendor failure
- yfinance returned its errors as text, which the router counted as an answer, so the chain stopped and the text reached the analyst
- an empty result is checked against the vendor being reachable, so an outage is not reported as a company with no data
- a chain where every vendor is unavailable says so instead of ending the run
2026-09-18 01:49:52 +00:00
Yijia-Xiao 10cc070fa3 feat(llm): refresh the model lists to each provider's current lineup
- xAI: Grok 4.6 and 4.5; DeepSeek: deepseek-flash (V4.1); Qwen: the 3.8 series; Mistral: the current dated snapshots
- every provider can name a model the picker does not list
- retired IDs stay valid, so existing configs run without a warning
2026-09-18 01:14:05 +00:00
Yijia-Xiao aef4af90e3 fix(dataflows): let the next vendor serve what Alpha Vantage cannot
- an indicator it does not carry raises instead of returning prose the router counts as an answer
- ticker news asks for the configured article limit
2026-09-18 00:04:53 +00:00
Yijia-Xiao bbcd6661af fix(graph): remove the database sidecars when clearing checkpoints
- SQLite keeps committed state in -wal and -shm beside the database
2026-09-18 00:04:53 +00:00
Yijia-Xiao f8042efdde fix(agents): keep one unreadable price from discarding the decision
- a price written as a range or a hedge is dropped like any other unusable value
- a field the model did not give is named as not provided, rather than omitted
2026-09-18 00:04:53 +00:00
Yijia-Xiao 9683194793 fix(cli): finish the run surface
- backtest takes --run-id, so an interrupted sweep continues
- an inverted date range or an empty ticker list is an error, not a clean zero-cell run
- a setup failure in a sweep reports one line instead of a traceback
- the remembered endpoint URL is offered back
- a round count set in the environment says it overrode the chosen research depth
- the run directory validates the ticker, and the report saves under results_dir
- the run says whether it resumed a saved run or started fresh
2026-09-17 23:44:14 +00:00
Yijia-Xiao 04b691804c fix(dataflows): include the analysis day in the Alpha Vantage news window
- time_to was midnight starting the end date, dropping that day's news
2026-09-17 23:37:43 +00:00
Yijia-Xiao f0a1cf6290 fix(agents): say when the resolved identity is today's, not the run date's
- the vendor profile has no historical vintage, and every agent is told to anchor to it
2026-09-17 23:37:43 +00:00
Yijia-Xiao de7e43fc4a fix(dataflows): quote the prices the vendor reported in the verification snapshot
- gap filling keeps indicators on a continuous series, but put the previous session's open, high and low under an unsettled bar's date
- load_ohlcv takes fill_gaps, and the snapshot reads the frame as reported
2026-09-17 23:37:43 +00:00
Yijia-Xiao 008ac655a9 fix(cli): send GLM traffic to the platform its key belongs to
- the provider table named the China endpoint while the key mapping and client registry named Z.AI
2026-09-17 07:31:44 +00:00
Yijia-Xiao 2ddfe4ceb5 fix(agents): give every prompt honest inputs
- the fundamentals brief reached the model as a Python tuple
- analysts no longer emit a trade call that nothing reads
- a report that was not produced says so instead of appearing as a blank section
2026-09-17 07:31:44 +00:00
Yijia-Xiao 85d9137437 feat(graph): measure an outcome over a configurable window
- holding_period_days sets it; the price request covers the calendar span those trading days occupy
- reflection states the window it judges, so a short one does not read as a failed thesis
2026-09-17 07:31:44 +00:00
Yijia-Xiao 2ca59cc795 fix(backtest): score a decision against the direction it claimed
- a Sell that fell counted as a miss and a Sell that rose as a hit
- Hold claims no direction, so it reports mean alpha and no hit rate
- the report names the window the outcomes were measured over
2026-09-17 07:31:44 +00:00
Yijia-Xiao 63989515c9 fix(cli): show what the run actually produced (#649, #784)
- a non-blank message is text, whatever it would mean as a Python literal
- the live layout renders on the alternate screen, so a tall layout does not scroll
- a run with no readable rating says so instead of looking like a normal result
- the state log keeps non-ASCII readable (#1081)
2026-09-17 05:00:08 +00:00
Yijia-Xiao 8d30fee06b fix(agents): record the decision that was made, or flag it for review
- the labelled rating decides, whatever dash separates it, and a scale the model echoed is not one
- prose naming several ratings is reviewed rather than read as the first word in the text
- an unreadable decision is tagged REVIEW everywhere instead of a tradeable Hold
- unrated decisions are counted apart from the backtest figures
2026-09-17 05:00:08 +00:00
Yijia-Xiao f881c4a111 feat(dataflows): serve US statements as filed, from SEC EDGAR
- statements are limited to facts filed by the run's date, at the values filed then
- quarterly figures are picked by span, so a year to date total is not read as a quarter
- a fourth quarter is reported unavailable rather than derived
- opt in with sec_edgar in the fundamental_data chain; a non-filer falls through
2026-09-17 02:37:15 +00:00
Yijia-Xiao 8ac4371387 fix(llm): suppress object-form tool_choice for Ollama (#1062)
- Ollama takes the local-compatible client, like the generic endpoint
2026-09-17 01:10:48 +00:00
Yijia-Xiao 60dcf64723 fix(graph): keep a failed reflection from stopping the next run (#645)
- settling a past decision is per entry; a provider error leaves it pending
- an explicitly configured benchmark ticker is normalized like any other symbol (#1075)
2026-09-17 01:10:48 +00:00
Yijia-Xiao 8d64416436 fix(dataflows): trim global news to the window before the limit (#1356)
- out-of-window articles no longer spend the article budget or cut the remaining searches short
2026-09-17 01:10:48 +00:00
Yijia-Xiao 375af054b7 feat(cli): offer the previous run's selections as defaults (#1236, #920)
- analysts, depth, provider, models and language prefill; prompts still shown
- values no longer offered by the current catalog are dropped
- environment variables keep skipping their step
2026-09-16 21:45:08 +00:00