Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TauricResearch/TradingAgents
/ functions
Functions
1,637 in github.com/TauricResearch/TradingAgents
⨍
Functions
1,637
◇
Types & classes
199
↳
Endpoints
17
↓ 51 callers
Method
store_decision
Append pending entry at end of propagate(). No LLM call. ``rating`` is the decision's own rating when the caller has it; without one
tradingagents/memory/log.py:32
↓ 47 callers
Function
make_log
(tmp_path, filename="trading_memory.md")
tests/test_memory_log.py:34
↓ 44 callers
Method
load_entries
Parse all entries from log. Returns list of dicts.
tradingagents/memory/log.py:76
↓ 33 callers
Function
set_config
Update the configuration with custom values. Dict-valued keys (e.g. ``data_vendors``) are merged one level deep so a partial update like ``{"
tradingagents/dataflows/config.py:33
↓ 32 callers
Function
get_capabilities
Resolve capabilities by exact ID, then pattern, then default.
tradingagents/llm_clients/capabilities.py:124
↓ 27 callers
Function
normalize_symbol
Map a user/broker symbol to its canonical Yahoo Finance symbol. Resolution order (first match wins): 1. Explicit alias table (metals, energ
tradingagents/dataflows/symbols.py:103
↓ 24 callers
Method
get_llm
(self)
tests/test_graph_end_to_end.py:98
↓ 24 callers
Method
invoke
(self, messages)
tests/test_post_screen.py:278
↓ 18 callers
Method
get_past_context
Return formatted past context string for agent prompt injection. When ``as_of`` (yyyy-mm-dd) is given, only lessons whose outcome was
tradingagents/memory/log.py:93
↓ 17 callers
Function
parse_rating
Extract a 5-tier rating, or ``REVIEW`` when the decision has none. For callers that need a string for every decision, such as the memory log's
tradingagents/agents/rating.py:96
↓ 16 callers
Function
get_config
Get the configuration of the run in progress, else the process-wide one.
tradingagents/dataflows/config.py:65
↓ 16 callers
Method
propagate
(self, ticker, trade_date, asset_type="stock", portfolio=None)
tests/test_backtest.py:52
↓ 16 callers
Method
update_with_outcome
Replace pending tag and append REFLECTION section using atomic write. Returns whether an entry was updated: False when the decision was no
tradingagents/memory/log.py:134
↓ 15 callers
Function
get_instrument_context_from_state
Return the instrument context for the current run. Prefers the identity-resolved context computed once at run start and stored on the state (
tradingagents/agents/context.py:172
↓ 15 callers
Function
get_language_instruction
Return a prompt instruction for the configured output language. Returns empty string when English (default), so no extra tokens are used. App
tradingagents/agents/context.py:14
↓ 14 callers
Function
_graph
(tmp_path, monkeypatch, model, debug=False, **config)
tests/test_graph_end_to_end.py:123
↓ 14 callers
Function
_ticker_with
A quote feed answering ``articles``, and a search answering the rest. By default the search knows the symbol but has no articles, i.e. Yahoo answ
tests/test_news_lookahead.py:109
↓ 14 callers
Function
create_llm_client
Create an LLM client for the specified provider. Provider modules are imported lazily so that simply importing this factory (e.g. during test
tradingagents/llm_clients/factory.py:7
↓ 14 callers
Function
safe_ticker_component
Validate ``value`` is safe to interpolate into a filesystem path. Tickers come from user CLI input or from LLM tool calls, both of which can
tradingagents/dataflows/symbols.py:155
↓ 13 callers
Function
extract_rating
Extract a 5-tier rating from its label, or ``None`` if there is none. Reads an explicit "Rating: X" label (tolerant of markdown bold) in the
tradingagents/agents/rating.py:55
↓ 12 callers
Method
with_structured_output
(self, *a, **k)
tests/test_post_screen.py:275
↓ 12 callers
Function
write_report_tree
Save a completed run's reports to ``save_path``; return the complete-report path. ``settings`` (``TradingAgentsGraph.run_settings()``) adds what
tradingagents/reporting.py:92
↓ 11 callers
Function
as_of
The date a tool serves: the model's date, but never later than the run's. A model can omit the date or pass today's instead of the analysis date,
tradingagents/dataflows/date_window.py:78
↓ 11 callers
Function
build_llm_kwargs
Keyword arguments for ``create_llm_client`` from a TradingAgents config.
tradingagents/llm_clients/factory.py:90
↓ 11 callers
Function
get_current_date
Today's date, YYYY-MM-DD.
tradingagents/dataflows/date_window.py:34
↓ 11 callers
Method
invoke
(self, input, config=None, **kwargs)
tradingagents/llm_clients/openai_client.py:35
↓ 11 callers
Function
route_to_vendor
Route method calls to appropriate vendor implementation with fallback support.
tradingagents/dataflows/router.py:200
↓ 11 callers
Function
run_backtest
Analyze every ticker on every date, into a memory log of this run's own. The live log stays untouched: a sweep would otherwise flood the context
tradingagents/backtest.py:129
↓ 11 callers
Method
settle_pending
(self, ticker)
tests/test_backtest.py:59
↓ 11 callers
Function
summarize
Score the settled decisions of a backtest, or of a memory log at a path, by rating.
tradingagents/backtest.py:184
↓ 11 callers
Function
validate_model
Check if model name is valid for the given provider. For ollama, openrouter, and openai_compatible - any model is accepted.
tradingagents/llm_clients/validators.py:20
↓ 10 callers
Function
_config
(tmp_path)
tests/test_backtest.py:73
↓ 10 callers
Function
_epoch
Epoch seconds for UTC midnight of ``date_str`` (host-timezone independent).
tests/test_news_lookahead.py:17
↓ 10 callers
Function
_html
(tmp_path, **overrides)
tests/test_report_html.py:27
↓ 10 callers
Method
get_pending_entries
Return entries with outcome:pending, for settlement.
tradingagents/memory/log.py:89
↓ 10 callers
Function
in_window
Whether an item belongs in the half-open window ``[start, end + 1 day)``. ``pub_dt`` None means undated: kept only when the window reaches the pr
tradingagents/dataflows/date_window.py:23
↓ 10 callers
Function
yf_retry
Execute a yfinance call with exponential backoff on rate limits. yfinance raises YFRateLimitError on HTTP 429 responses but does not retry th
tradingagents/dataflows/vendors/yahoo/common.py:49
↓ 9 callers
Function
_config_with_env
The defaults as the environment given here would set them.
tests/test_env_overrides.py:12
↓ 9 callers
Function
_make_api_request
Helper function to make API requests and handle responses. Raises: AlphaVantageRateLimitError: When API rate limit is exceeded
tradingagents/dataflows/vendors/alpha_vantage/common.py:70
↓ 9 callers
Function
build_instrument_context
Describe the exact instrument so agents preserve identity and ticker. When ``identity`` is provided (resolved deterministically via :func:`re
tradingagents/agents/context.py:107
↓ 9 callers
Function
get_api_key_env
Return the env var name for `provider`'s API key, or None if not applicable. Unknown providers also return None — callers should treat that as
tradingagents/llm_clients/api_key_env.py:47
↓ 9 callers
Method
render
(self)
tests/test_cli_commands.py:78
↓ 9 callers
Function
thread_id
Deterministic thread ID for a ticker+date pair. ``signature`` folds in graph-shape-affecting run choices so a resume under a different graph
tradingagents/graph/checkpointer.py:28
↓ 8 callers
Function
_captured_kwargs
(model, **kwargs)
tests/test_google_thinking_level.py:15
↓ 8 callers
Function
_fact
(end, val, filed, form="10-K", fp="FY", start=None)
tests/test_sec_edgar.py:24
↓ 8 callers
Function
_resolve_entry
Store a decision then immediately resolve it via the API.
tests/test_memory_log.py:51
↓ 8 callers
Function
build_analyst_execution_plan
( selected_analysts: Iterable[str], )
tradingagents/graph/analyst_execution.py:49
↓ 8 callers
Function
resolve_instrument_identity
Resolve deterministic identity metadata (company name, sector, …) for a ticker. This exists to stop the pipeline from hallucinating a *different*
tradingagents/agents/context.py:61
↓ 7 callers
Function
_asks
(value)
tests/test_openrouter_model_select.py:12
↓ 7 callers
Function
_capture_kwargs
(monkeypatch)
tests/test_anthropic_effort.py:14
↓ 7 callers
Function
_closes
A get_closes stand-in serving each symbol's series between the dates asked.
tests/test_memory_log.py:1065
↓ 7 callers
Method
_run_signature
Run inputs that must invalidate a checkpoint if changed. Keyed into the checkpoint thread ID so a resume under a different analyst se
tradingagents/graph/trading_graph.py:140
↓ 7 callers
Function
_state
()
tests/test_reporting.py:13
↓ 7 callers
Function
coverage_gap
Placeholder for a window a feed did not fully observe, else None. Yahoo news and the Reddit and StockTwits feeds return their latest items wh
tradingagents/dataflows/date_window.py:44
↓ 7 callers
Function
create_portfolio_manager
(llm)
tradingagents/agents/managers/portfolio_manager.py:23
↓ 7 callers
Function
create_trader
(llm)
tradingagents/agents/trader/trader.py:20
↓ 7 callers
Function
crypto_base
Return the crypto base (e.g. ``BTC``) for a known USD/USDT/USDC-quoted crypto symbol in any form the pipeline may hold — ``BTC-USD``, ``BTCUSD``,
tradingagents/dataflows/symbols.py:82
↓ 7 callers
Function
get_portfolio_context_from_state
Return the caller's portfolio block, or a notice that none was given. A run without portfolio context must not read as a flat book: the agents
tradingagents/agents/context.py:204
↓ 7 callers
Function
load_last_run
The previous run's answers, or an empty dict when there is nothing usable. Convenience state: an unreadable or corrupt file means no defaults, ne
cli/prefs.py:36
↓ 7 callers
Function
run_rating
A finished run's rating: the Portfolio Manager's own, else read from its decision. The fallback serves a state without ``final_rating``, such as
tradingagents/agents/rating.py:106
↓ 6 callers
Function
_assert_ohlcv_not_stale
Reject OHLCV whose latest row is far older than as_of_date. Raises NoMarketDataError (with a stale-specific detail) so the router treats it l
tradingagents/dataflows/vendors/yahoo/ohlcv.py:109
↓ 6 callers
Function
_bound_kwargs
Extract bind() kwargs from a with_structured_output result.
tests/test_deepseek_reasoning.py:123
↓ 6 callers
Method
_client
(self, model)
tests/test_deepseek_reasoning.py:139
↓ 6 callers
Function
_client_module
()
tests/test_ollama_base_url.py:23
↓ 6 callers
Function
_coerce_max_retries
Validate an ``llm_max_retries`` value to a non-negative int. Accepts an int or a numeric string (env vars arrive as strings). Rejects boolean
tradingagents/llm_clients/factory.py:59
↓ 6 callers
Function
_coerce_max_tokens
Validate a ``max_tokens`` value to a positive int (env vars are strings).
tradingagents/llm_clients/factory.py:77
↓ 6 callers
Function
_fundamentals
(info)
tests/test_fundamentals_units.py:18
↓ 6 callers
Function
_log_with
(tmp_path, rows)
tests/test_backtest.py:117
↓ 6 callers
Function
_ohlcv
OHLCV frame whose date column is named `date_col`.
tests/test_ohlcv_date_column.py:17
↓ 6 callers
Function
_ok
()
tests/test_post_screen.py:52
↓ 6 callers
Function
_tagged
(title, day, *tickers)
tests/test_news_lookahead.py:197
↓ 6 callers
Function
_write
(tmp_path, name="AAPL-YFin-data.csv", age_seconds=0.0, last_date="2026-07-17")
tests/test_ohlcv_cache_freshness.py:29
↓ 6 callers
Function
_yf
(as_of_date, info=_INFO, today=_TODAY)
tests/test_fundamentals_lookahead.py:48
↓ 6 callers
Function
checkpoint_step
Return the step number of the latest checkpoint, or None if none exists.
tradingagents/graph/checkpointer.py:54
↓ 6 callers
Function
create_sentiment_analyst
Create a sentiment analyst node for the trading graph. Pre-fetches news + StockTwits + Reddit data, injects them into the prompt as structure
tradingagents/agents/analysts/sentiment_analyst.py:47
↓ 6 callers
Function
filter_analysts_for_asset_type
( analysts: list[AnalystType], asset_type: AssetType )
cli/prompts.py:127
↓ 6 callers
Function
get_checkpointer
Context manager yielding a SqliteSaver backed by a per-ticker DB.
tradingagents/graph/checkpointer.py:42
↓ 6 callers
Function
is_historical
Whether a run is dated before today, so live-only data would come from after it.
tradingagents/dataflows/date_window.py:39
↓ 6 callers
Method
json
(self)
tests/test_post_screen.py:298
↓ 6 callers
Function
opponent_argument_or_opening
Opponent's latest argument, or an explicit opening marker when empty. The first speaker in each debate round receives an empty opponent response;
tradingagents/agents/context.py:37
↓ 6 callers
Function
sanitize
Keep only the remembered answers that are still choosable now.
cli/prefs.py:62
↓ 6 callers
Method
warn_if_unknown_model
Warn when the model is outside the known list for the provider.
tradingagents/llm_clients/base_client.py:40
↓ 5 callers
Function
_atom_resp
()
tests/test_reddit_fallback.py:45
↓ 5 callers
Function
_capturing_llm
LLM whose structured binding records the prompt it was handed.
tests/test_structured_agent_prompts.py:25
↓ 5 callers
Function
_client
(model: str = "MiniMax-M2.7")
tests/test_minimax.py:17
↓ 5 callers
Function
_console_out
(capsys)
tests/test_ollama_base_url.py:16
↓ 5 callers
Method
_get_request_payload
(self, input_, *, stop=None, **kwargs)
tradingagents/llm_clients/openai_client.py:153
↓ 5 callers
Function
_log
(tmp_path)
tests/test_memory_pointintime.py:16
↓ 5 callers
Function
_make_sentiment_state
()
tests/test_structured_agents.py:406
↓ 5 callers
Function
_make_trader_state
()
tests/test_structured_agents.py:170
↓ 5 callers
Function
_patched_get
(body, capture=None)
tests/test_alpha_vantage_hardening.py:29
↓ 5 callers
Function
_post_answers
(about: float, stance: str = "bullish", confidence: float = 0.9)
tests/test_post_screen.py:172
↓ 5 callers
Function
_prompt_text
Flatten a captured prompt (str, message list, or objects) to text.
tests/test_structured_agent_prompts.py:36
↓ 5 callers
Function
_report_graph
(tmp_path)
tests/test_cli_headless.py:233
↓ 5 callers
Function
_request_stub
Build a _request replacement that dispatches on the endpoint path.
tests/test_fred.py:40
↓ 5 callers
Method
_route
(self, vendors_for_get_stock_data)
tests/test_vendor_routing.py:51
↓ 5 callers
Function
_run_load
Drive load_ohlcv against a pre-seeded cache frame (no network).
tests/test_ohlcv_latest_bar.py:98
↓ 5 callers
Function
_sample_ohlcv
()
tests/test_yahoo_snapshot.py:12
↓ 5 callers
Function
_seed_completed
Write a completed entry directly to file, bypassing the API.
tests/test_memory_log.py:39
↓ 5 callers
Function
_state
(**overrides)
tests/test_report_html.py:18
next →
1–100 of 1,637, ranked by callers