Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TauricResearch/TradingAgents
/ functions
Functions
1,297 in github.com/TauricResearch/TradingAgents
⨍
Functions
1,297
◇
Types & classes
181
↳
Endpoints
8
↓ 4 callers
Function
_make_pm_state
Minimal AgentState dict for portfolio_manager_node.
tests/test_memory_log.py:67
↓ 4 callers
Function
_msg
(created_iso, sentiment=None)
tests/test_social_lookahead.py:59
↓ 4 callers
Function
_prompt_text
Flatten a captured prompt (str, message list, or objects) to text.
tests/test_structured_agent_prompts.py:36
↓ 4 callers
Function
_resolve
(log, ticker, date, resolution_date, reflection)
tests/test_memory_pointintime.py:20
↓ 4 callers
Function
_resp
A minimal context-manager response whose read() runs ``read_fn``.
tests/test_reddit_fallback.py:30
↓ 4 callers
Function
_scored
(tmp_path, rows)
tests/test_backtest.py:193
↓ 4 callers
Function
_structured_trader_llm
Build a MagicMock LLM whose with_structured_output binding captures the prompt and returns a real TraderProposal so render_trader_proposal works.
tests/test_structured_agents.py:178
↓ 4 callers
Function
_ticker_with
(articles, monkeypatch)
tests/test_news_lookahead.py:110
↓ 4 callers
Method
begin_checkpoint
(self, *a, **k)
tests/test_rating_integrity.py:130
↓ 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:42
↓ 4 callers
Function
checkpoint_step
Return the step number of the latest checkpoint, or None if none exists.
tradingagents/graph/checkpointer.py:59
↓ 4 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
↓ 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
Method
end_checkpoint
(self)
tests/test_rating_integrity.py:139
↓ 4 callers
Function
filter_analysts_for_asset_type
( analysts: list[AnalystType], asset_type: AssetType )
cli/utils.py:90
↓ 4 callers
Function
has_checkpoint
Check whether a resumable checkpoint exists for ticker+date.
tradingagents/graph/checkpointer.py:54
↓ 4 callers
Function
iter_grid
Analysis dates from ``start_date``, never past today. A future date has no outcome to settle against, and the graph rejects one, so the grid
tradingagents/backtest.py:32
↓ 4 callers
Function
load_portfolio
Read a portfolio JSON file, failing before the run rather than mid-graph.
tradingagents/portfolio.py:58
↓ 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, or REVIEW. An unrecognizable decision yields ``REVIEW`` rather than a fabricated
tradingagents/graph/signal_processing.py:29
↓ 4 callers
Method
propagate
(self, ticker, trade_date, asset_type="stock", portfolio=None)
tests/test_backtest.py:52
↓ 4 callers
Function
provider_default_url
Return the default backend URL for a provider key, or None if unknown.
cli/utils.py:381
↓ 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:366
↓ 4 callers
Function
render_trader_proposal
Render a TraderProposal to markdown. The trailing ``FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL**`` line is preserved for backward compatibil
tradingagents/agents/schemas.py:191
↓ 4 callers
Method
stream
(self, *a, **k)
tests/test_rating_integrity.py:142
↓ 3 callers
Function
_av
Alpha Vantage path; the API call is mocked so a leak would be visible.
tests/test_fundamentals_lookahead.py:50
↓ 3 callers
Function
_bare_graph
A graph without __init__ (no LLM clients), wired to a temp log.
tests/test_cli_decision_log.py:18
↓ 3 callers
Function
_bare_graph
(tmp_path)
tests/test_portfolio_context.py:78
↓ 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
_fact
(end, val, filed, form="10-K", fp="FY", start=None)
tests/test_sec_edgar.py:24
↓ 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:7
↓ 3 callers
Function
_frame
(date)
tests/test_yfinance_stale_ohlcv_guard.py:24
↓ 3 callers
Function
_insider_frame
(*dates)
tests/test_undated_tools_as_of.py:20
↓ 3 callers
Function
_llm_provider_table
(display_name, provider_key, base_url) for every supported provider. Shared by the interactive picker and by env-driven configuration so an e
cli/utils.py:348
↓ 3 callers
Function
_make_rm_state
()
tests/test_structured_agents.py:287
↓ 3 callers
Function
_matching_choice
The option value equal to ``default``, or None to leave the menu as is.
cli/utils.py:135
↓ 3 callers
Function
_patched_get
(body, capture=None)
tests/test_alpha_vantage_hardening.py:29
↓ 3 callers
Function
_prompt_key
(cli_utils, monkeypatch, tmp_path, key="sk-typed-in")
tests/test_api_key_env.py:152
↓ 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:238
↓ 3 callers
Function
_returns
(value)
tests/test_vendor_routing.py:31
↓ 3 callers
Function
_run
Call the tool through a ToolNode in a graph carrying the run's trade_date.
tests/test_tool_date_enforcement.py:82
↓ 3 callers
Method
_run
(self, state_extra)
tests/test_instrument_identity.py:125
↓ 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
_statement
(kind: str, ticker: str, freq: str, curr_date: str, title: str)
tradingagents/dataflows/sec_edgar.py:175
↓ 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:92
↓ 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:416
↓ 3 callers
Function
_yf_insider
(frame, curr_date)
tests/test_undated_tools_as_of.py:28
↓ 3 callers
Function
as_of_window
``[start, end]`` with its end clamped to the run date. A window wholly after the run date keeps its length and moves back to end there.
tradingagents/dataflows/date_window.py:82
↓ 3 callers
Function
create_msg_delete
()
tradingagents/agents/utils/agent_utils.py:250
↓ 3 callers
Function
extract_content_string
Extract string content from various message formats. Returns None if no meaningful text content is found.
cli/main.py:919
↓ 3 callers
Function
filter_financials_by_date
Drop financial statement columns (fiscal period timestamps) after curr_date. yfinance financial statements use fiscal period end dates as columns
tradingagents/dataflows/stockstats_utils.py:293
↓ 3 callers
Method
get_news
(self, count=20)
tests/test_news_lookahead.py:115
↓ 3 callers
Function
initialize_config
Initialize the configuration with default values.
tradingagents/dataflows/config.py:9
↓ 3 callers
Function
load_ohlcv
Fetch OHLCV data with caching, filtered to prevent look-ahead bias. Downloads 5 years of data up to today and caches per symbol. On subsequen
tradingagents/dataflows/stockstats_utils.py:196
↓ 3 callers
Method
mark_completed
( self, analyst_key: str, completed_at: float | None = None, )
tradingagents/graph/analyst_execution.py:87
↓ 3 callers
Method
process_signal
(self, text)
tests/test_rating_integrity.py:123
↓ 3 callers
Method
read
(self_inner, size=-1)
tests/test_reddit_fallback.py:39
↓ 3 callers
Function
resolve_backend_url
Resolve the backend URL with the correct precedence. An explicit env override (``env_url``, from ``TRADINGAGENTS_LLM_BACKEND_URL`` via ``DEFA
cli/utils.py:390
↓ 3 callers
Method
should_continue_risk_analysis
Determine if risk analysis should continue.
tradingagents/graph/conditional_logic.py:63
↓ 3 callers
Method
update_agent_status
(self, agent, status)
cli/main.py:186
↓ 3 callers
Function
write_report_tree
Save a completed run's reports to ``save_path``; return the complete-report path.
tradingagents/reporting.py:13
↓ 2 callers
Method
_apply_rotation
Drop oldest resolved blocks when their count exceeds max_entries. Pending blocks are always kept (they represent unprocessed work). R
tradingagents/agents/utils/memory.py:251
↓ 2 callers
Method
_bare_graph
(self)
tests/test_signal_processing.py:131
↓ 2 callers
Function
_cached_json
(url: str, name: str)
tradingagents/dataflows/sec_edgar.py:115
↓ 2 callers
Function
_capture_kwargs
Stub _bedrock_class so the constructor kwargs are testable without the optional langchain-aws extra installed.
tests/test_bedrock_provider.py:38
↓ 2 callers
Method
_captured_ticker
(self, ticker)
tests/test_reddit_fallback.py:176
↓ 2 callers
Function
_coerce_optional_float
Normalise an LLM-written optional numeric field before validation. Three shapes show up in practice: a placeholder string ("None", "N/A") in
tradingagents/agents/schemas.py:33
↓ 2 callers
Method
_create_tool_nodes
Create tool nodes for different data sources using abstract methods.
tradingagents/graph/trading_graph.py:224
↓ 2 callers
Function
_created_at
Parse a message's ISO 8601 ``created_at``; None when missing or malformed.
tradingagents/dataflows/stocktwits.py:33
↓ 2 callers
Function
_debate_state
(current_response, count=0)
tests/test_risk_router_path_map.py:20
↓ 2 callers
Function
_effort_on
(model, monkeypatch)
tests/test_openai_reasoning_effort.py:30
↓ 2 callers
Function
_ensure_date_column
Normalize the date column to ``Date``. Some yfinance builds leave the index unnamed (so ``reset_index()`` yields ``index``) or use ``Datetime
tradingagents/dataflows/stockstats_utils.py:62
↓ 2 callers
Function
_extract_article_data
Extract article data from yfinance news format (handles nested 'content' structure).
tradingagents/dataflows/yfinance_news.py:16
↓ 2 callers
Function
_investment_state
(current_response)
tests/test_debate_opening.py:37
↓ 2 callers
Function
_load
(tmp_path, monkeypatch, curr_date, download)
tests/test_ohlcv_cache_freshness.py:29
↓ 2 callers
Method
_log_state
Log the final state to a JSON file.
tradingagents/graph/trading_graph.py:627
↓ 2 callers
Method
_memory_as_of
Point-in-time cutoff for past-context lessons (#1251). A historical/backtest run (trade date before today) filters lessons to those a
tradingagents/graph/trading_graph.py:409
↓ 2 callers
Function
_parse
(date: str | None)
tradingagents/dataflows/date_window.py:62
↓ 2 callers
Function
_parse_json_list
Gamma encodes ``outcomes``/``outcomePrices`` as JSON-string arrays.
tradingagents/dataflows/polymarket.py:39
↓ 2 callers
Method
_post
(self, sub, title="NVDA pops")
tests/test_reddit_fallback.py:200
↓ 2 callers
Function
_posted_at
A post's ``created_utc`` epoch as a UTC datetime, or None when missing.
tradingagents/dataflows/reddit.py:51
↓ 2 callers
Function
_price_df
Minimal DataFrame matching yfinance .history() output shape. Uses a DatetimeIndex like real yfinance output, so resolution-date extraction (s
tests/test_memory_log.py:57
↓ 2 callers
Function
_reload_with_env
(monkeypatch, **overrides)
tests/test_llm_max_tokens.py:104
↓ 2 callers
Function
_reload_with_env
(monkeypatch, **overrides)
tests/test_llm_max_retries.py:81
↓ 2 callers
Function
_reset_config
()
tests/test_vendor_routing.py:21
↓ 2 callers
Method
_resolved_tag
Build a resolved entry tag, recording the outcome's known-by date. ``resolution_date`` (the date of the last price bar used for the return)
tradingagents/agents/utils/memory.py:237
↓ 2 callers
Function
_risk_state
(**responses)
tests/test_debate_opening.py:48
↓ 2 callers
Method
_run_graph
Execute the graph and write the resulting state to disk and memory log.
tradingagents/graph/trading_graph.py:579
↓ 2 callers
Function
_select_model
Select a model for the given provider and mode (quick/deep).
cli/utils.py:301
↓ 2 callers
Function
_structured_rm_llm
(captured: dict, plan: ResearchPlan | None = None)
tests/test_structured_agents.py:301
↓ 2 callers
Function
_supports_reasoning_effort
Whether the (native OpenAI) model accepts ``reasoning_effort``.
tradingagents/llm_clients/openai_client.py:178
↓ 2 callers
Method
_system_prompt
Concise prompt for reflect_on_final_decision (Phase B log entries). Produces 2-4 sentences of plain prose, compact enough to be re-injected
tradingagents/graph/reflection.py:13
↓ 2 callers
Method
add_message
(self, message_type, content)
cli/main.py:178
↓ 2 callers
Function
ask_output_language
Ask for report output language. ``default`` is offered only when it is one of the listed languages: a custom one entered last time is free te
cli/utils.py:677
↓ 2 callers
Method
batch_update_with_outcomes
Apply multiple outcome updates in a single read + atomic write. Each element of updates must have keys: ticker, trade_date, raw_retur
tradingagents/agents/utils/memory.py:180
← previous
next →
101–200 of 1,297, ranked by callers