- Add MarketDataService for database-backed market data caching
- Integrate cache lookup/write into route_to_vendor function
- Support configurable TTL per data type (stock data: 1h, fundamentals: 24h+)
- Make caching opt-in via database_enabled and db_cache_enabled config flags
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add database services layer with AnalysisService, TradingService, and DiscoveryService
for persisting analysis sessions, trading decisions, and discovery runs.
Integration with TradingAgentsGraph:
- Add config options: database_enabled, database_path
- Persist analysis state to database in _log_state when enabled
- Persist discovery results to database when enabled
- Save analyst reports, debates, and trading decisions
Database integration is opt-in via config setting.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added AgentStatus enum for CLI agent tracking (pending, in_progress,
completed, error) and BacktestStatus enum for backtest results (pending,
running, completed, failed). Replaces string literals with type-safe
enum values throughout the codebase.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Extract cli/main.py (1916 lines) into focused modules:
- cli/state.py: MessageBuffer class for state management
- cli/display.py: Layout, progress tables, and report display functions
- cli/discovery.py: Trending stock discovery flow and UI
- cli/analysis.py: Stock analysis flow and chunk processing
- cli/backtest_cmd.py: Backtesting command and strategies
main.py reduced from 1916 to 110 lines, serving as entry point only
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add tradingagents/config.py with TradingAgentsSettings Pydantic model
- Centralize all environment variable handling and API key management
- Add validation for log_level, llm_provider, and numeric bounds
- Update dataflows/config.py to use central config as backend
- Update logging.py to get settings from central config
- Update API key access in alpha_vantage, brave, and tavily modules
- Replace DEFAULT_CONFIG imports with get_config() calls
- Add 20 comprehensive tests for config module
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace slow iterrows() loop with vectorized pandas operations using
apply() and dict(zip()) for better performance when building indicator
result dictionaries.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add 47 integration tests covering:
- Agent state structures (InvestDebateState, RiskDebateState, AgentState)
- Conditional logic for analyst tool calls and debate flow
- Propagator state initialization and configuration
- Graph setup with various analyst combinations
- End-to-end workflow state transitions
- Validation integration with TradingAgentsGraph
Tests verify:
- State creation and mutation
- Debate round progression (Bull/Bear, Risk analysts)
- Graph compilation with different analyst configurations
- Input validation for tickers and dates
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create tradingagents/validation.py with comprehensive validation functions:
- validate_ticker/validate_tickers for ticker symbol validation
- validate_date/validate_date_range for date validation
- parse_date for flexible date parsing (multiple formats)
- Helper functions: is_valid_ticker, is_valid_date, is_trading_day
- get_previous_trading_day, get_next_trading_day utilities
- Add validation to y_finance.py (get_YFin_data_online, get_stock_stats_indicators_window)
- Add validation to trading_graph.py propagate method
- Create comprehensive test suite (55 tests) in tests/test_validation.py
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add complete backtesting engine with portfolio simulation, metrics calculation
(Sharpe, Sortino, max drawdown), and agent integration
- Add Pydantic data models for market data, trading, portfolio, and backtest results
- Add backtest CLI command with SMA, RSI, and hold strategies
- Fix 24+ bare exception handlers with specific exception types
- Fix hardcoded path in default_config.py (use TRADINGAGENTS_DATA_DIR env var)
- Fix unclosed file handle in local.py with context manager
- Disable store=True in OpenAI API calls for data privacy
- Fix typo: rename aggresive_debator.py to aggressive_debator.py
- Add request timeouts (30s) to alpha_vantage_common.py and googlenews_utils.py
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add MultiStageLoader and LoadingIndicator classes to cli/utils.py
- Improve CLI main.py with explicit imports and UI enhancements
- Update entity_extractor.py with improved LLM provider handling
- Add Ollama embedding model configuration to memory.py
- Add get_bulk_news_alpha_vantage function to alpha_vantage_news.py
- Add discovery imports to trading_graph.py
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add Brave Search API integration for bulk news fetching
- Add Tavily API integration for bulk news fetching
- Implement timeout and retry logic with exponential backoff for both vendors
- Make bulk news vendor order configurable via default_config.py
- Add tavily-python to requirements.txt
- Document BRAVE_API_KEY and TAVILY_API_KEY in .env.example and README
- Add comprehensive unit tests for both vendors (49 tests)
The news discovery system now uses fallback chain: Tavily → Brave → Alpha Vantage → OpenAI → Google
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implement a multi-stage pipeline to discover trending stocks from news:
- Entity extraction from news articles using LLM
- Stock ticker resolution via Yahoo Finance
- Sector classification and event categorization
- Scoring algorithm based on mentions, sentiment, and recency
- CLI integration with interactive stock selection and analysis flow
- Persistence layer for saving discovery results
- Comprehensive test suite for all discovery components
Update README with uv-based installation instructions and remove emojis.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add .env.example file with API key placeholders
- Update README.md with .env file setup instructions
- Add dotenv loading in main.py for environment variables
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add data vendor configuration examples in README and main.py showing how to configure Alpha Vantage as the primary data provider. Update documentation to reflect the current default behavior of using Alpha Vantage for real-time market data access.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace hardcoded column indices with column name lookup
- Add mapping for all supported indicators to their expected CSV column names
- Handle missing columns gracefully with descriptive error messages
- Strip whitespace from header parsing for reliability
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace FinnHub with Alpha Vantage API in README documentation
- Implement comprehensive Alpha Vantage modules:
- Stock data (daily OHLCV with date filtering)
- Technical indicators (SMA, EMA, MACD, RSI, Bollinger Bands, ATR)
- Fundamental data (overview, balance sheet, cashflow, income statement)
- News and sentiment data with insider transactions
- Update news analyst tools to use ticker-based news search
- Integrate Alpha Vantage vendor methods into interface routing
- Maintain backward compatibility with existing vendor system
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>