Per-ticker article limit, global article limit, global lookback window, and macro query list are now read from get_config() instead of being hardcoded. Tool wrapper get_global_news passes None defaults so config overrides flow through the LLM-tool path too. Macro query defaults broadened from 4 US-centric strings to 5 covering Fed, S&P 500, geopolitics, ECB/BOJ/BOE, commodities. #606 #558 #562
66 lines
3.4 KiB
Python
66 lines
3.4 KiB
Python
import os
|
|
|
|
_TRADINGAGENTS_HOME = os.path.join(os.path.expanduser("~"), ".tradingagents")
|
|
|
|
DEFAULT_CONFIG = {
|
|
"project_dir": os.path.abspath(os.path.join(os.path.dirname(__file__), ".")),
|
|
"results_dir": os.getenv("TRADINGAGENTS_RESULTS_DIR", os.path.join(_TRADINGAGENTS_HOME, "logs")),
|
|
"data_cache_dir": os.getenv("TRADINGAGENTS_CACHE_DIR", os.path.join(_TRADINGAGENTS_HOME, "cache")),
|
|
"memory_log_path": os.getenv("TRADINGAGENTS_MEMORY_LOG_PATH", os.path.join(_TRADINGAGENTS_HOME, "memory", "trading_memory.md")),
|
|
# Optional cap on the number of resolved memory log entries. When set,
|
|
# the oldest resolved entries are pruned once this limit is exceeded.
|
|
# Pending entries are never pruned. None disables rotation entirely.
|
|
"memory_log_max_entries": None,
|
|
# LLM settings
|
|
"llm_provider": "openai",
|
|
"deep_think_llm": "gpt-5.4",
|
|
"quick_think_llm": "gpt-5.4-mini",
|
|
# When None, each provider's client falls back to its own default endpoint
|
|
# (api.openai.com for OpenAI, generativelanguage.googleapis.com for Gemini, ...).
|
|
# The CLI overrides this per provider when the user picks one. Keeping a
|
|
# provider-specific URL here would leak (e.g. OpenAI's /v1 was previously
|
|
# being forwarded to Gemini, producing malformed request URLs).
|
|
"backend_url": None,
|
|
# Provider-specific thinking configuration
|
|
"google_thinking_level": None, # "high", "minimal", etc.
|
|
"openai_reasoning_effort": None, # "medium", "high", "low"
|
|
"anthropic_effort": None, # "high", "medium", "low"
|
|
# Checkpoint/resume: when True, LangGraph saves state after each node
|
|
# so a crashed run can resume from the last successful step.
|
|
"checkpoint_enabled": False,
|
|
# Output language for analyst reports and final decision
|
|
# Internal agent debate stays in English for reasoning quality
|
|
"output_language": "English",
|
|
# Debate and discussion settings
|
|
"max_debate_rounds": 1,
|
|
"max_risk_discuss_rounds": 1,
|
|
"max_recur_limit": 100,
|
|
# News / data fetching parameters
|
|
# Increase for longer lookback strategies or to broaden macro coverage;
|
|
# decrease to reduce token usage in agent prompts.
|
|
"news_article_limit": 20, # max articles per ticker (ticker-news)
|
|
"global_news_article_limit": 10, # max articles for global/macro news
|
|
"global_news_lookback_days": 7, # macro news lookback window
|
|
# Search queries used by get_global_news for macro headlines. Extend or
|
|
# replace to broaden geographic / sector coverage.
|
|
"global_news_queries": [
|
|
"Federal Reserve interest rates inflation",
|
|
"S&P 500 earnings GDP economic outlook",
|
|
"geopolitical risk trade war sanctions",
|
|
"ECB Bank of England BOJ central bank policy",
|
|
"oil commodities supply chain energy",
|
|
],
|
|
# Data vendor configuration
|
|
# Category-level configuration (default for all tools in category)
|
|
"data_vendors": {
|
|
"core_stock_apis": "yfinance", # Options: alpha_vantage, yfinance
|
|
"technical_indicators": "yfinance", # Options: alpha_vantage, yfinance
|
|
"fundamental_data": "yfinance", # Options: alpha_vantage, yfinance
|
|
"news_data": "yfinance", # Options: alpha_vantage, yfinance
|
|
},
|
|
# Tool-level configuration (takes precedence over category-level)
|
|
"tool_vendors": {
|
|
# Example: "get_stock_data": "alpha_vantage", # Override category default
|
|
},
|
|
}
|