Commit Graph

14 Commits

Author SHA1 Message Date
Joseph O'Brien 85992fc05b chore: remove unused imports across codebase
Removed unused imports from 36 files including:
- Unused stdlib imports (json, time, re, os, signal, etc.)
- Unused typing imports (List, Dict, Optional, Tuple, Sequence, etc.)
- Unused langchain imports (AIMessage, ChatOpenAI, etc.)
- Unused langgraph imports (END, StateGraph, START, ToolNode, etc.)
- Unused project imports (DataLoader, get_config, parse_date, etc.)

Preserved intentional re-exports in:
- tradingagents/agents/utils/agent_utils.py (re-exports tool functions)
- tradingagents/dataflows/alpha_vantage.py (re-exports submodule functions)
- All __init__.py files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 04:44:37 -05:00
Joseph O'Brien 293df9c552 refactor: split cli/main.py into modular components
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>
2025-12-03 03:29:42 -05:00
Joseph O'Brien f70874982a feat: add backtesting framework and fix code quality issues
- 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>
2025-12-03 02:55:28 -05:00
Joseph O'Brien 3c85b21e0b Improve CLI with loading indicators and enhance discovery pipeline
- 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>
2025-12-03 00:49:49 -05:00
Joseph O'Brien a4916039a1 Update main.py 2025-12-02 20:40:26 -05:00
Joseph O'Brien 3f6b1e9f39 Add trending stock discovery feature
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>
2025-12-02 20:19:34 -05:00
luohy15 a6734d71bc WIP 2025-09-26 16:17:50 +08:00
Huijae Lee ee3d499894
Merge branch 'TauricResearch:main' into save_results 2025-06-25 08:43:19 +09:00
Edward Sun 52284ce13c fixed anthropic support. Anthropic has different format of response when it has tool calls. Explicit handling added 2025-06-21 12:51:34 -07:00
Edward Sun da84ef43aa main works, cli bugs 2025-06-15 22:20:59 -07:00
ZeroAct 417b09712c refactor 2025-06-12 13:53:28 +09:00
ZeroAct 9647359246 save reports & logs under results_dir 2025-06-12 11:25:07 +09:00
maxer137 99789f9cd1 Add support for other backends, such as OpenRouter and olama
This aims to offer alternative OpenAI capable api's.
This offers people to experiment with running the application locally
2025-06-11 14:19:25 +02:00
Yijia-Xiao cc97cb6d5d chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00