Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TauricResearch/TradingAgents
/ functions
Functions
1,834 in github.com/TauricResearch/TradingAgents
⨍
Functions
1,834
◇
Types & classes
212
↳
Endpoints
18
↓ 3 callers
Method
history
(self, start, end)
tests/test_memory_log.py:1056
↓ 3 callers
Function
initialize_config
Initialize the configuration with default values.
tradingagents/dataflows/config.py:16
↓ 3 callers
Function
is_valid_ticker_input
Whether a ticker entry names a symbol the run can use. The symbol it resolves to (``XAUUSD+`` -> ``GC=F``) must pass the data layer's own che
cli/prompts.py:39
↓ 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/vendors/yahoo/ohlcv.py:161
↓ 3 callers
Method
mark_completed
( self, analyst_key: str, completed_at: float | None = None, )
cli/display.py:585
↓ 3 callers
Method
open
(self, url)
tests/test_cli_headless.py:354
↓ 3 callers
Method
post
(self, url, timeout, data)
tests/test_chatgpt_auth.py:76
↓ 3 callers
Method
read
(self_inner, size=-1)
tests/test_reddit_fallback.py:39
↓ 3 callers
Function
read_cache
The cache, keeping only fields of the shape this version writes.
cli/updates.py:51
↓ 3 callers
Method
record_decision
(self, ticker, trade_date, final_state)
tests/test_cli_memory_log.py:59
↓ 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/prompts.py:420
↓ 3 callers
Method
should_continue_risk_analysis
Determine if risk analysis should continue.
tradingagents/graph/conditional_logic.py:23
↓ 3 callers
Function
take_turn
The analyst's reply and its report, which stays empty while it calls tools. Told to wrap up, it answers without tools: a model offered tools may
tradingagents/agents/analysts/turn.py:13
↓ 3 callers
Method
update_agent_status
(self, agent, status)
cli/display.py:123
↓ 3 callers
Function
withhold_live_profile
Notice to serve instead of a live-only company profile, or None to serve it. Vendor "company overview" endpoints (yfinance ``Ticker.info``, Alpha
tradingagents/dataflows/date_window.py:114
↓ 2 callers
Method
_apply_rotation
Drop the oldest-dated resolved blocks when their count exceeds max_entries. Pending blocks are always kept (they represent unprocessed work).
tradingagents/memory/log.py:276
↓ 2 callers
Function
_b64
(raw: bytes)
tests/test_chatgpt_auth.py:31
↓ 2 callers
Function
_bare_graph
(tmp_path)
tests/test_cli_display.py:60
↓ 2 callers
Function
_bare_graph
A graph without __init__ (no LLM clients), wired to a temp log.
tests/test_cli_memory_log.py:19
↓ 2 callers
Function
_cached_json
(url: str, name: str)
tradingagents/dataflows/vendors/sec_edgar.py:123
↓ 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
Function
_config_with_env
The defaults as the environment given here would set them.
tests/test_llm_max_tokens.py:98
↓ 2 callers
Function
_config_with_env
The defaults as the environment given here would set them.
tests/test_llm_max_retries.py:75
↓ 2 callers
Method
_count
(self)
tests/test_graph_end_to_end.py:71
↓ 2 callers
Function
_created_at
Parse a message's ISO 8601 ``created_at``; None when missing or malformed.
tradingagents/dataflows/vendors/stocktwits.py:34
↓ 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/vendors/yahoo/ohlcv.py:27
↓ 2 callers
Function
_expired
(monkeypatch)
tests/test_chatgpt_provider.py:119
↓ 2 callers
Function
_extract_article_data
Extract article data from yfinance news format (handles nested 'content' structure). Yahoo sends some fields as null rather than leaving them out
tradingagents/dataflows/vendors/yahoo/news.py:16
↓ 2 callers
Function
_fields
(values)
tradingagents/report_html.py:210
↓ 2 callers
Function
_format_articles
(articles: list[dict])
tradingagents/dataflows/vendors/yahoo/news.py:75
↓ 2 callers
Function
_header
The report's title and what produced it: analysis date, version, models, analysts, vendors.
tradingagents/reporting.py:20
↓ 2 callers
Function
_host_id
(data: dict)
tradingagents/llm_clients/chatgpt_auth.py:85
↓ 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:36
↓ 2 callers
Function
_market
(question, prob, *, volume, end_date, closed=False, wk=None)
tests/test_polymarket.py:20
↓ 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:130
↓ 2 callers
Function
_now
()
tradingagents/memory/settlement.py:40
↓ 2 callers
Function
_parse
(date: str | None)
tradingagents/dataflows/date_window.py:72
↓ 2 callers
Function
_parse_json_list
Gamma encodes ``outcomes``/``outcomePrices`` as JSON-string arrays.
tradingagents/dataflows/vendors/polymarket.py:40
↓ 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/vendors/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
_recording_replace
(monkeypatch)
tests/test_cache_writes.py:15
↓ 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/memory/log.py:262
↓ 2 callers
Function
_response
(payload, status=200)
tests/test_cli_updates.py:174
↓ 2 callers
Function
_revoke
(tokens: dict, client_id: str | None)
tradingagents/llm_clients/chatgpt_auth.py:313
↓ 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:373
↓ 2 callers
Function
_screen_out
A screen that drops posts whose text starts with one of ``dropped``.
tests/test_reddit_fallback.py:276
↓ 2 callers
Function
_select_listed_model
Select from ``models`` ((name, model ID) pairs, listed live) or enter one with ``custom``.
cli/prompts.py:270
↓ 2 callers
Function
_select_model
Select a model for the given provider and mode (quick/deep).
cli/prompts.py:334
↓ 2 callers
Method
_setup
(self, tmp_path, monkeypatch)
tests/test_memory_log.py:1247
↓ 2 callers
Function
_signed_in_provider
(monkeypatch, token="plan-token")
tests/test_provider_registry.py:72
↓ 2 callers
Function
_signing_keys
OpenAI's ID-token signing keys. Fetched before a token request, so nothing can fail on the network between OpenAI issuing tokens and this file kee
tradingagents/llm_clients/chatgpt_auth.py:105
↓ 2 callers
Function
_stamp
Set ``path``'s mtime to the wall-clock ``ts``, read back in local time as the cache does. A naive ``pd.Timestamp.timestamp()`` would be taken as U
tests/test_ohlcv_cache_freshness.py:22
↓ 2 callers
Function
_stamp
Set ``path``'s mtime to the wall-clock ``ts``, read back in local time as the cache does. A naive ``pd.Timestamp.timestamp()`` would be taken as U
tests/test_ohlcv_latest_bar.py:26
↓ 2 callers
Function
_state
(ticker, final="评级: 买入")
tests/test_cli_display.py:44
↓ 2 callers
Function
_structured_rm_llm
(captured: dict, plan: ResearchPlan | None = None)
tests/test_structured_agents.py:300
↓ 2 callers
Function
_supports_reasoning_effort
Whether the (native OpenAI) model accepts ``reasoning_effort``.
tradingagents/llm_clients/openai_client.py:224
↓ 2 callers
Method
_system_prompt
Concise prompt for reflect_on_final_decision (settled memory log entries). Produces 2-4 sentences of plain prose, compact enough to be re-inj
tradingagents/memory/reflection.py:13
↓ 2 callers
Function
_token_record
(response: dict, now: float, previous: dict | None = None)
tradingagents/llm_clients/chatgpt_auth.py:145
↓ 2 callers
Function
_token_request
OpenAI's answer to a token request, or the error to show: ``ChatGPTUnreachable`` when OpenAI could not answer (try again), ``ChatGPTAuthError`` wh
tradingagents/llm_clients/chatgpt_auth.py:167
↓ 2 callers
Function
_validate_trade_date
The run date as a canonical ``YYYY-MM-DD`` string no later than today.
tradingagents/graph/trading_graph.py:30
↓ 2 callers
Function
_validated_claims
The ID token's claims after checking its RS256 signature against OpenAI's keys, issuer, audience, expiry and (at sign-in) nonce, as the sign-in gu
tradingagents/llm_clients/chatgpt_auth.py:116
↓ 2 callers
Function
_vendors_seen_by_a_run
(graph, ticker="AAPL")
tests/test_dataflows_config.py:75
↓ 2 callers
Function
_version
(text)
cli/updates.py:125
↓ 2 callers
Function
_yahoo_request_raises
Every request yfinance makes raises ``exc``, below its own error handling.
tests/test_yahoo_rate_limit.py:206
↓ 2 callers
Function
_yes
(question: str)
cli/run.py:392
↓ 2 callers
Function
_yf_insider
(frame, curr_date)
tests/test_undated_tools_as_of.py:32
↓ 2 callers
Method
accept
(self, url: str)
tradingagents/llm_clients/chatgpt_auth.py:277
↓ 2 callers
Method
add_message
(self, message_type, content)
cli/display.py:115
↓ 2 callers
Function
analyst_names
The analysts as users select them: the sentiment analyst's key is "social".
tradingagents/reporting.py:15
↓ 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/prompts.py:749
↓ 2 callers
Method
begin_checkpoint
Recompile the graph with a per-ticker checkpointer and return the ``thread_id`` to inject into the stream/invoke ``config`` (or ``None``
tradingagents/graph/trading_graph.py:192
↓ 2 callers
Function
check_endpoint
Raise ValueError when a provider pinned to its own endpoint is pointed elsewhere.
tradingagents/llm_clients/openai_client.py:296
↓ 2 callers
Method
checkpoint_input
The value to stream/invoke: ``None`` to resume an existing checkpoint, else the initial state for a fresh run. LangGraph resumes an i
tradingagents/graph/trading_graph.py:221
↓ 2 callers
Function
clear_all_checkpoints
Remove all checkpoint databases. Returns the number of databases deleted. SQLite keeps committed state in ``-wal`` and ``-shm`` files beside the
tradingagents/graph/checkpointer.py:68
↓ 2 callers
Function
clear_checkpoint
Remove checkpoint for a specific ticker+date by deleting the thread's rows.
tradingagents/graph/checkpointer.py:85
↓ 2 callers
Method
clear_checkpoint_on_success
Drop a completed run's checkpoint so a later run starts fresh (#1249).
tradingagents/graph/trading_graph.py:247
↓ 2 callers
Function
create_aggressive_debator
(llm)
tradingagents/agents/risk_mgmt/aggressive_debator.py:10
↓ 2 callers
Function
create_bull_researcher
(llm)
tradingagents/agents/researchers/bull_researcher.py:9
↓ 2 callers
Function
create_question_box
(title, prompt, default=None)
cli/selections.py:145
↓ 2 callers
Method
create_run_state
Build a run's initial state; propagate() and the CLI both start here. Injects the resolved instrument identity for every agent (#814). The
tradingagents/graph/trading_graph.py:293
↓ 2 callers
Method
default_report_path
Where a run's reports go unless told otherwise: under results_dir, stamped now.
tradingagents/graph/trading_graph.py:288
↓ 2 callers
Method
end_checkpoint
Restore the plain uncheckpointed graph after a checkpointed run.
tradingagents/graph/trading_graph.py:231
↓ 2 callers
Function
format_datetime_for_api
Convert various date formats to the YYYYMMDDTHHMM Alpha Vantage expects. A plain date means midnight, which is the start of that day. For the end
tradingagents/dataflows/vendors/alpha_vantage/common.py:38
↓ 2 callers
Function
get_known_models
Build known model names from the shared CLI catalog plus legacy IDs.
tradingagents/llm_clients/model_catalog.py:247
↓ 2 callers
Method
get_llm
(self)
tests/test_model_validation.py:16
↓ 2 callers
Method
info
(self)
tests/test_yahoo_rate_limit.py:103
↓ 2 callers
Method
init_for_analysis
Initialize agent status and report sections based on selected analysts. Args: selected_analysts: List of analyst type strings (e.
cli/display.py:65
↓ 2 callers
Method
invoke
(self, prompt, *a, **k)
tests/test_portfolio_context.py:172
↓ 2 callers
Function
invoke_structured
Run the structured call; ``None`` when there is none or it fails. ``prompt`` is whatever the underlying LLM accepts (a string for chat invoca
tradingagents/agents/structured.py:59
↓ 2 callers
Function
is_openai_compatible
Whether ``provider`` is served by the OpenAI-compatible registry.
tradingagents/llm_clients/openai_client.py:304
↓ 2 callers
Function
no_data_available
What a call returns when every vendor that answered had no usable data.
tradingagents/dataflows/router.py:185
↓ 2 callers
Method
positions_in
The holdings of the instrument the run prices for ``ticker``, under any broker spelling (BTCUSDT, 700.HK). Holdings keep the spelling they wer
tradingagents/portfolio.py:40
← previous
next →
201–300 of 1,834, ranked by callers