Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TauricResearch/TradingAgents
/ functions
Functions
854 in github.com/TauricResearch/TradingAgents
⨍
Functions
854
◇
Types & classes
151
↳
Endpoints
4
↓ 38 callers
Function
make_log
(tmp_path, filename="trading_memory.md")
tests/test_memory_log.py:34
↓ 31 callers
Method
store_decision
Append pending entry at end of propagate(). No LLM call.
tradingagents/agents/utils/memory.py:30
↓ 29 callers
Method
load_entries
Parse all entries from log. Returns list of dicts.
tradingagents/agents/utils/memory.py:53
↓ 25 callers
Method
get_llm
(self)
tests/test_model_validation.py:16
↓ 24 callers
Function
get_capabilities
Resolve capabilities by exact ID, then pattern, then default.
tradingagents/llm_clients/capabilities.py:119
↓ 23 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:16
↓ 22 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/symbol_utils.py:104
↓ 17 callers
Method
invoke
(self, input, config=None, **kwargs)
tradingagents/llm_clients/openai_client.py:35
↓ 16 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/utils/agent_utils.py:172
↓ 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:5
↓ 14 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/utils/agent_utils.py:52
↓ 13 callers
Method
get_past_context
Return formatted past context string for agent prompt injection.
tradingagents/agents/utils/memory.py:70
↓ 13 callers
Method
with_structured_output
(self, schema, *, method=None, **kwargs)
tradingagents/llm_clients/openai_client.py:38
↓ 12 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/utils.py:17
↓ 11 callers
Function
parse_rating
Heuristically extract a 5-tier rating from prose text. Two-pass strategy: 1. Look for an explicit "Rating: X" label (tolerant of markdown bol
tradingagents/agents/utils/rating.py:28
↓ 11 callers
Function
route_to_vendor
Route method calls to appropriate vendor implementation with fallback support.
tradingagents/dataflows/interface.py:168
↓ 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/alpha_vantage_common.py:62
↓ 9 callers
Function
build_analyst_execution_plan
( selected_analysts: Iterable[str], )
tradingagents/graph/analyst_execution.py:56
↓ 9 callers
Function
get_config
Get the current configuration.
tradingagents/dataflows/config.py:33
↓ 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
↓ 9 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/stockstats_utils.py:23
↓ 8 callers
Function
_reload_with_env
Set/clear env vars then reload default_config to re-evaluate DEFAULT_CONFIG.
tests/test_env_overrides.py:12
↓ 8 callers
Function
_resolve_entry
Store a decision then immediately resolve it via the API.
tests/test_memory_log.py:51
↓ 8 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
↓ 8 callers
Method
update_with_outcome
Replace pending tag and append REFLECTION section using atomic write. Finds the first pending entry matching (trade_date, ticker), updates
tradingagents/agents/utils/memory.py:99
↓ 8 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
↓ 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
Method
_resolve_benchmark
Pick the benchmark ticker for alpha calculation against ``ticker``. ``config["benchmark_ticker"]`` overrides everything when set; otherwise
tradingagents/graph/trading_graph.py:230
↓ 7 callers
Function
create_portfolio_manager
(llm)
tradingagents/agents/managers/portfolio_manager.py:24
↓ 7 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:50
↓ 6 callers
Function
_assert_ohlcv_not_stale
Reject OHLCV whose latest row is far older than curr_date. Raises NoMarketDataError (with a stale-specific detail) so the router treats it li
tradingagents/dataflows/stockstats_utils.py:88
↓ 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
_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/graph/trading_graph.py:47
↓ 6 callers
Method
_fetch_returns
Fetch raw and alpha return for ticker over holding_days from trade_date. ``benchmark`` is the index used as the alpha baseline (resolved by t
tradingagents/graph/trading_graph.py:251
↓ 6 callers
Method
_get_provider_kwargs
Get provider-specific kwargs for LLM client creation.
tradingagents/graph/trading_graph.py:153
↓ 6 callers
Function
_ohlcv
OHLCV frame whose date column is named `date_col`.
tests/test_stockstats_date_column.py:15
↓ 6 callers
Function
_reload_client
()
tests/test_ollama_base_url.py:30
↓ 6 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/utils/agent_utils.py:122
↓ 6 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/symbol_utils.py:83
↓ 6 callers
Function
get_checkpointer
Context manager yielding a SqliteSaver backed by a per-ticker DB.
tradingagents/graph/checkpointer.py:42
↓ 6 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/utils/agent_utils.py:79
↓ 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
_client
(model: str = "MiniMax-M2.7")
tests/test_minimax.py:17
↓ 5 callers
Method
_get_request_payload
(self, input_, *, stop=None, **kwargs)
tradingagents/llm_clients/openai_client.py:153
↓ 5 callers
Function
_make_sentiment_state
()
tests/test_structured_agents.py:341
↓ 5 callers
Function
_request_stub
Build a _request replacement that dispatches on the endpoint path.
tests/test_fred.py:38
↓ 5 callers
Method
_route
(self, vendors_for_get_stock_data)
tests/test_vendor_routing.py:51
↓ 5 callers
Function
_sample_ohlcv
()
tests/test_market_data_validator.py:11
↓ 5 callers
Function
_seed_completed
Write a completed entry directly to file, bypassing the API.
tests/test_memory_log.py:39
↓ 5 callers
Method
create_initial_state
Create the initial state for the agent graph. ``instrument_context`` is the deterministic ticker-identity string resolved once at run
tradingagents/graph/propagation.py:18
↓ 5 callers
Function
create_research_manager
(llm)
tradingagents/agents/managers/research_manager.py:16
↓ 5 callers
Function
create_trader
(llm)
tradingagents/agents/trader/trader.py:20
↓ 5 callers
Method
get_pending_entries
Return entries with outcome:pending (for Phase B).
tradingagents/agents/utils/memory.py:66
↓ 5 callers
Function
invoke_structured_or_freetext
Run the structured call and render to markdown; fall back to free-text on any failure. ``prompt`` is whatever the underlying LLM accepts (a strin
tradingagents/agents/utils/structured.py:49
↓ 5 callers
Function
normalize_content
Normalize LLM response content to a plain string. Multiple providers (OpenAI Responses API, Google Gemini 3) return content as a list of type
tradingagents/llm_clients/base_client.py:6
↓ 5 callers
Method
raise_for_status
(self)
tests/test_alpha_vantage_hardening.py:20
↓ 5 callers
Method
reflect_on_final_decision
Single reflection call on the final trade decision with outcome context. Used by Phase B deferred reflection. The final_trade_decision alread
tradingagents/graph/reflection.py:31
↓ 4 callers
Function
_bare_graph
(config)
tests/test_llm_max_retries.py:47
↓ 4 callers
Function
_base_url
(mod, provider, **kwargs)
tests/test_ollama_base_url.py:35
↓ 4 callers
Function
_build_graph
()
tests/test_checkpoint_resume.py:35
↓ 4 callers
Function
_captured_kwargs
(model, **kwargs)
tests/test_google_thinking_level.py:15
↓ 4 callers
Function
_input_to_messages
Normalise a langchain LLM input to a list of message objects. Accepts a list of messages, a ``ChatPromptValue`` (from a ChatPromptTemplate),
tradingagents/llm_clients/openai_client.py:71
↓ 4 callers
Function
_is_native_openai_base_url
True when ``base_url`` is unset or points at api.openai.com. The Responses API (/v1/responses) only exists on native OpenAI. A custom base_ur
tradingagents/llm_clients/openai_client.py:241
↓ 4 callers
Method
_kwargs_for
(self, temperature)
tests/test_temperature_config.py:66
↓ 4 callers
Function
_make_pm_state
Minimal AgentState dict for portfolio_manager_node.
tests/test_memory_log.py:62
↓ 4 callers
Function
bind_structured
Return ``llm.with_structured_output(schema)`` or ``None`` if unsupported. Logs a warning when the binding fails so the user understands the agent
tradingagents/agents/utils/structured.py:32
↓ 4 callers
Function
detect_asset_type
Classify on the canonical symbol so e.g. BTCUSD and BTC-USDT both read as crypto (#981/#982), matching what the data path will actually fetch.
cli/utils.py:81
↓ 4 callers
Function
has_checkpoint
Check whether a resumable checkpoint exists for ticker+date.
tradingagents/graph/checkpointer.py:54
↓ 4 callers
Method
mark_started
(self, analyst_key: str, started_at: float | None = None)
tradingagents/graph/analyst_execution.py:82
↓ 4 callers
Function
normalize_ticker_symbol
Resolve user input to its canonical Yahoo symbol (single source of truth). Delegates to the data layer's ``normalize_symbol`` so the symbol the C
cli/utils.py:65
↓ 4 callers
Method
process_signal
Return one of Buy / Overweight / Hold / Underweight / Sell.
tradingagents/graph/signal_processing.py:29
↓ 4 callers
Function
provider_default_url
Return the default backend URL for a provider key, or None if unknown.
cli/utils.py:369
↓ 4 callers
Method
read
(self_inner)
tests/test_reddit_fallback.py:39
↓ 4 callers
Function
render_sentiment_report
Render a SentimentReport to the markdown shape the rest of the system expects. The structured header (band + score + confidence) is prepended to
tradingagents/agents/schemas.py:328
↓ 3 callers
Function
_atom_resp
()
tests/test_reddit_fallback.py:44
↓ 3 callers
Method
_bound_kwargs
(self, runnable)
tests/test_minimax.py:54
↓ 3 callers
Method
_client
(self)
tests/test_deepseek_reasoning.py:57
↓ 3 callers
Function
_db_path
Return the SQLite checkpoint DB path for a ticker.
tradingagents/graph/checkpointer.py:19
↓ 3 callers
Function
_epoch
(date_str)
tests/test_news_lookahead.py:15
↓ 3 callers
Function
_filter_reports_by_date
Drop annual/quarterly reports dated after curr_date to prevent look-ahead. ``_make_api_request`` returns the fundamentals payload as a JSON strin
tradingagents/dataflows/alpha_vantage_fundamentals.py:6
↓ 3 callers
Function
_frame
(date)
tests/test_yfinance_stale_ohlcv_guard.py:24
↓ 3 callers
Function
_make_rm_state
()
tests/test_structured_agents.py:221
↓ 3 callers
Function
_make_trader_state
()
tests/test_structured_agents.py:130
↓ 3 callers
Function
_patched_get
(body, capture=None)
tests/test_alpha_vantage_hardening.py:24
↓ 3 callers
Function
_raises
(exc)
tests/test_vendor_routing.py:37
↓ 3 callers
Function
_require_text
Prompt for a required value; exit cleanly if the user cancels. ``questionary.text(...).ask()`` returns None on Ctrl-C/Esc; mirror the exit-on
cli/utils.py:229
↓ 3 callers
Method
_resolve_pending_entries
Resolve pending log entries for ticker at the start of a new run. Fetches returns for each same-ticker pending entry, generates reflections,
tradingagents/graph/trading_graph.py:296
↓ 3 callers
Function
_resp
A minimal context-manager response whose read() runs ``read_fn``.
tests/test_reddit_fallback.py:30
↓ 3 callers
Function
_returns
(value)
tests/test_vendor_routing.py:31
↓ 3 callers
Method
_run
(self, state_extra)
tests/test_instrument_identity.py:125
↓ 3 callers
Method
_run_signature
Graph-shape inputs that must invalidate a checkpoint if changed. Keyed into the checkpoint thread ID so a resume under a different analyst
tradingagents/graph/trading_graph.py:348
↓ 3 callers
Function
_state
()
tests/test_reporting.py:12
↓ 3 callers
Function
_state
(latest_speaker, count=0)
tests/test_risk_router_path_map.py:16
↓ 3 callers
Function
_structured_pm_llm
Build a MagicMock LLM whose with_structured_output binding captures the prompt and returns a real PortfolioDecision (so render_pm_decision works).
tests/test_memory_log.py:87
↓ 3 callers
Function
_structured_sentiment_llm
MagicMock LLM whose structured binding captures the prompt and returns a real SentimentReport so render_sentiment_report works.
tests/test_structured_agents.py:350
↓ 3 callers
Function
checkpoint_step
Return the step number of the latest checkpoint, or None if none exists.
tradingagents/graph/checkpointer.py:59
↓ 3 callers
Function
create_msg_delete
()
tradingagents/agents/utils/agent_utils.py:190
↓ 3 callers
Function
filter_analysts_for_asset_type
( analysts: list[AnalystType], asset_type: AssetType )
cli/utils.py:90
next →
1–100 of 854, ranked by callers