from tradingagents.graph.trading_graph import TradingAgentsGraph from tradingagents.default_config import get_default_config, load_project_env load_project_env(__file__) # Create a custom config config = get_default_config() config["max_debate_rounds"] = 1 # Increase debate rounds # Configure data vendors (default uses yfinance, no extra API keys needed) config["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 } # Initialize with custom config ta = TradingAgentsGraph(debug=True, config=config) # forward propagate _, decision = ta.propagate("NVDA", "2024-05-10") print(decision) # Memorize mistakes and reflect # ta.reflect_and_remember(1000) # parameter is the position returns