Stock Wars is an innovative framework for autonomous stock trading, powered by advanced Large Language Models. It combines comprehensive backtesting and live trading capabilities, utilizing cutting-edge integrations for accurate financial data. With an interactive CLI and robust portfolio management, it empowers users to navigate the stock market intelligently.
Stock Wars is an advanced framework for autonomous stock trading, leveraging the power of Large Language Models (LLMs) and the OpenBB/Financial Modeling Prep (FMP) APIs. This innovative system facilitates comprehensive backtesting and reliable live trading, all while utilizing a ReAct (Reasoning + Acting) loop to effectively analyze market data and execute trades.
backtesting/start_agent_backtest.py, ensuring strict adherence to lookahead constraints, thereby eliminating bias.llm_stock_manager_cli.py.Assess your agent's past performance on historical datasets:
# General usage for backtesting
python3 backtesting/start_agent_backtest.py --symbol AAPL --start-date 2023-01-01 --end-date 2023-01-31
# Single day analysis
python3 backtesting/start_agent_backtest.py --symbol NVDA --date 2024-03-15
The live trading system is designed for continuous operation or one-time analysis.
To monitor and manage the daemon:
pm2 list # Check current status
pm2 logs trading-daemon # Access live logging output
pm2 monit # Real-time performance dashboard
The repository features a well-organized structure:
stock_agent_eval_clean/
├── backtesting/ # Backtesting scripts and logic
│ └── start_agent_backtest.py # Main entry point for backtesting
├── custom_TradingBot/ # Core trading logic
│ ├── live_trade/ # Live trading components
│ │ ├── ReasoningAgent.py # Main LLM agent class
│ │ ├── live_trading_loop.py# Main loop for live trading
│ │ ├── OpenBBMCPServer.py # MCP Server for OpenBB tools
│ │ └── ...
│ └── requirements.txt # Python dependencies
├── tests/ # Unit and integration tests
├── PM2_SETUP.md # PM2 setup instructions
├── QUICK_START.md # Quick start guide
└── README.md # Documentation
Through its sophisticated module support and comprehensive trading functionality, Stock Wars is well-equipped to serve traders looking for an intelligent and automated approach to stock market engagement.
No comments yet.
Sign in to be the first to comment.