{"id":38550892,"url":"https://github.com/zoharbabin/quantum-trader","last_synced_at":"2026-01-17T07:33:37.770Z","repository":{"id":262015935,"uuid":"885983756","full_name":"zoharbabin/quantum-trader","owner":"zoharbabin","description":"🤖 An intelligent stock trading bot combining technical \u0026 qualitative analysis with Interactive Brokers TWS API integration","archived":false,"fork":false,"pushed_at":"2024-11-17T16:07:21.000Z","size":274,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-17T16:37:47.198Z","etag":null,"topics":["agentic","agentic-trader","ai-trader","algorithmic-trading","fintech","interactivebrokers","quantitative-trading","real-time","sentiment-analysis","stock-market","technical-analysis","trading-bot","tws"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zoharbabin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-09T21:59:56.000Z","updated_at":"2024-11-17T16:07:24.000Z","dependencies_parsed_at":"2024-11-12T18:45:36.308Z","dependency_job_id":null,"html_url":"https://github.com/zoharbabin/quantum-trader","commit_stats":null,"previous_names":["zoharbabin/quantum-trader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zoharbabin/quantum-trader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoharbabin%2Fquantum-trader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoharbabin%2Fquantum-trader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoharbabin%2Fquantum-trader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoharbabin%2Fquantum-trader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoharbabin","download_url":"https://codeload.github.com/zoharbabin/quantum-trader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoharbabin%2Fquantum-trader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic","agentic-trader","ai-trader","algorithmic-trading","fintech","interactivebrokers","quantitative-trading","real-time","sentiment-analysis","stock-market","technical-analysis","trading-bot","tws"],"created_at":"2026-01-17T07:33:37.648Z","updated_at":"2026-01-17T07:33:37.751Z","avatar_url":"https://github.com/zoharbabin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quantum Trader\n\n🤖 An intelligent autonomous trading system using a multi-agent architecture for algorithmic trading via Interactive Brokers\n\n## Overview\n\nQuantum Trader is a sophisticated algorithmic trading system that leverages Interactive Brokers' API to make trading decisions. The system uses a multi-agent approach where specialized components collaborate to analyze market data, assess risks, and execute trades.\n\n## Key Features\n\n### Multi-Agent Architecture\n\n1. **Technical Analysis Agent**\n    - Analyzes market data using multiple indicators:\n        - SMA (20, 50, 200 periods)\n        - EMA (12, 26 periods)\n        - RSI\n        - MACD\n        - Bollinger Bands\n    - Identifies trading patterns and signals\n\n2. **Sentiment Analysis Agent**\n    - Analyzes market sentiment from news and social media\n    - Monitors multiple platforms (Twitter, Reddit)\n    - Provides weighted sentiment signals\n\n3. **Risk Management System**\n    - Position size and portfolio exposure limits\n    - Daily loss limits and drawdown protection\n    - Trade frequency controls\n    - Dynamic stop-loss using ATR\n\n4. **Trade Execution System**\n    - Supports market and limit orders\n    - Slippage tolerance controls\n    - Position sizing based on risk or fixed size\n    - Order timeout management\n\n## Training Program\n\nA comprehensive training program is included to help you understand and effectively use Quantum Trader.\n\n### Running the Training Program\n\n1. Start the training server:\n\n```bash\ncd training\npython3 server.py  # Runs on default port 7555\n# Or specify a custom port:\npython3 server.py --port 8000\n```\n\n2. Open your web browser and visit: `http://localhost:7555` (or your custom port if specified)\n\n### Training Structure\n\n1. **Level 1: Getting Started (Trader - Basic)**\n    - Prerequisites\n    - System Setup\n    - Basic Operations\n    - Risk Management Fundamentals\n\n2. **Level 2: Intermediate Trading**\n    - Advanced configuration\n    - Portfolio management\n    - Technical analysis implementation\n\n3. **Level 3: Advanced Operations**\n    - Custom strategy development\n    - Advanced risk metrics\n    - System optimization\n\n### Training Resources\n\n- Interactive tutorials with step-by-step guidance\n- Practical exercises to reinforce learning\n- Progress tracking\n- Quizzes to test understanding\n- Comprehensive documentation for each module\n\n## Prerequisites\n\n1. **Python 3.10+**\n\n2. **Interactive Brokers TWS or IB Gateway**\n    - Download and install from [Interactive Brokers](https://www.interactivebrokers.com)\n    - Enable API connections in TWS/Gateway\n    - Configure the socket port (default: 7497)\n    - Enable auto-restart in TWS/Gateway\n    - Disable 'Read-Only API' in TWS/Gateway configuration\n\n3. **Market Data Subscriptions**\n    - Appropriate market data subscriptions for your symbols\n    - Permissions for the markets you want to trade\n\n## Quick Start\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/zoharbabin/quantum-trader.git\ncd quantum-trader\n```\n\n2. Create and activate a virtual environment:\n\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n```\n\n3. Install dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n4. Configure the system:\n    - Review and modify `src/config/config.yaml` for your needs\n    - Key configurations include:\n        - API connection settings\n        - Risk management parameters\n        - Trading execution preferences\n        - Analysis thresholds\n\n5. Start trading:\n\n```bash\npython -m src.cli.cli_interface --symbols AAPL MSFT GOOGL --mode paper\n```\n\nRequired arguments:\n- `--symbols`: List of stock symbols to trade\n- `--mode`: Trading mode ('paper' or 'live', default: paper)\n\n## Configuration\n\nThe system is configured through `src/config/config.yaml`. Key sections include:\n\n### API Configuration\n\n```yaml\napi:\n  tws_endpoint: \"127.0.0.1\"\n  port: 7497\n```\n\n### Risk Management\n\n```yaml\nrisk_management:\n  position_limits:\n    max_position_size: 100\n    max_portfolio_exposure: 0.25\n  loss_limits:\n    daily_loss_limit: 1000\n    max_drawdown: 0.15\n  trade_frequency:\n    min_time_between_trades: 300\n    max_daily_trades: 10\n```\n\n### Technical Analysis\n\n```yaml\ntechnical_analysis:\n  indicators:\n    sma_periods: [20, 50, 200]\n    rsi:\n      period: 14\n      overbought: 70\n      oversold: 30\n    macd:\n      fast_period: 12\n      slow_period: 26\n      signal_period: 9\n```\n\n### Trading Execution\n\n```yaml\nexecution:\n  order_types: [\"market\", \"limit\"]\n  default_order_type: \"limit\"\n  limit_order_timeout: 60\n  slippage_tolerance: 0.001\n```\n\n## System Output\n\nThe system provides detailed logging of all operations:\n\n```log\n2024-11-10 18:24:20,523 - INFO - === Quantum Trader Starting ===\n2024-11-10 18:24:20,523 - INFO - Mode: paper\n2024-11-10 18:24:20,523 - INFO - Symbols: ['AAPL', 'MSFT', 'GOOGL']\n2024-11-10 18:24:20,524 - INFO - Checking Interactive Brokers prerequisites...\n2024-11-10 18:24:20,525 - INFO - Successfully connected to Interactive Brokers\n```\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Connection Problems**\n    - Verify TWS/Gateway is running\n    - Check API connection settings in TWS/Gateway\n    - Confirm port configuration matches config.yaml\n    - Ensure proper permissions in TWS/Gateway\n\n2. **Market Data Issues**\n    - Verify market data subscriptions\n    - Check symbol validity\n    - Confirm market hours\n    - Monitor data synchronization logs\n\n3. **Trading Issues**\n    - Check risk limits in config.yaml\n    - Verify account permissions in TWS/Gateway\n    - Monitor order status in logs\n    - Review execution reports\n\n## Documentation\n\nDetailed documentation is available in the `docs` directory:\n\n- [CLI Interface](docs/cli_interface.md)\n- [IB Connector](docs/ib_connector.md)\n- [Trading Logic](docs/trading_logic.md)\n- [Technical Analysis](docs/technical_analysis.md)\n- [Sentiment Analysis](docs/sentiment_analysis.md)\n\n## Testing\n\nRun the test suite:\n\n```bash\npython -m unittest discover tests\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoharbabin%2Fquantum-trader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoharbabin%2Fquantum-trader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoharbabin%2Fquantum-trader/lists"}