Copyright (C) 2024-2025 Chris R. (iAmGiG) | Licensed under AGPL-3.0 | See NOTICE
THIS SOFTWARE IS FOR EDUCATIONAL AND RESEARCH PURPOSES ONLY.
- Not Financial Advice: This system does not provide financial, investment, or trading advice
- Use at Your Own Risk: Trading involves substantial risk of loss
- No Warranties: Provided "as-is" without guarantees of accuracy or profitability
- Past Performance: Walk-forward validated results do not guarantee future performance
AutoTrader is a research-driven trading platform featuring a multi-agent AI architecture powered by Microsoft AutoGen. The system implements walk-forward validated strategies with rigorous statistical testing and human oversight for paper/live trading via Alpaca Markets.
Core Philosophy: Validated momentum + regime filtering + human decision making > curve-fit technical indicators
Recent rigorous validation experiments with corrected methodology:
- GEX Regime Filtering: Research contradiction identified - MACD+RSI and academic TSMOM behave differently in GEX regimes. Phase 3B on hold pending resolution. See project status.
- Transaction Cost Robustness: MACD+RSI shows 44% pass rate vs TSMOM's 19% despite 10x higher turnover (#519)
- MACD Parameter Stability: No robustly profitable MACD configs found out-of-sample. Best OOS Sharpe: -0.223 (#518)
- Simulation Fidelity Gap: Path-dependent backtesting engine created to address "wick risk" (#528)
| Issue | Strategy | Finding | Status |
|---|---|---|---|
| #516 | TSMOM+GEX Hybrid | Median improvement: -2.9% (worse than baseline) | CLOSED |
| #518 | MACD Stability | OOS Sharpe: -0.223 (least unprofitable) | CLOSED |
| #519 | Transaction Costs | MACD+RSI: 44% pass rate, TSMOM: 19% | CLOSED |
Methodology: Walk-forward validation, turnover-proportional transaction costs, look-ahead bias protection, median reporting for outlier robustness.
Note: Past performance does not guarantee future results. Research is ongoing with focus on simulation fidelity improvements.
| Component | Status |
|---|---|
| VoterAgent | Production Ready |
| CLI Trade Assistant | Complete |
| Alpaca Integration | Operational |
| Position Management | Complete |
| Trading Cycle | Complete |
| SQLite Cache | Complete (90%+ hit rate) |
| LLM Intent Routing | Complete |
| ScannerAgent | In Development |
| RiskAgent | In Development |
| ExecutorAgent | In Development |
Location: src/autogen_agents/voter_agent.py
- MACD Signal Generation: Optimized 13/34/8 Fibonacci parameters
- RSI Momentum Analysis: 14-period with 30/70 thresholds
- Consensus Voting: Strong signals when both indicators agree
- Validated Performance: 0.856 Sharpe ratio over 2024-2025
- Natural Language Commands: GPT-4o-mini parses trade requests
- Context-Aware Routing: Distinguishes "any open orders?" from ticker "ANY"
- Scalable Design: No hardcoded keyword patterns for ticker disambiguation
- ScannerAgent: Market opportunity identification
- RiskAgent: Position sizing and risk management
- ExecutorAgent: Trade execution via Alpaca API
- TradingOrchestrator: Multi-agent coordination
# Python 3.12+ required
conda create -n AutoTrader python=3.12
conda activate AutoTrader
pip install -e .Create config/config.yaml with API credentials:
POLYGON_IO: "your_key" # Required: Market data
ALPHA_VANTAGE_KEY: "your_key" # Required: Fallback data
ALPACA_PAPER_API_KEY: "your_key" # Required: Paper trading
ALPACA_PAPER_SECRET: "your_key" # Required: Paper trading
ALPACA_ENDPOINT: "https://paper-api.alpaca.markets/v2"
# Optional - VoterAgent uses pure math, no LLM required
OPEN_AI_KEY: "sk-..."python main.py
# Example session:
> buy 10 AAPL # Execute trade
> show portfolio # View positions
> check my alerts # Position alerts
> /schedule # Scheduler management
> /help # All commandspython main.py --daemon
# Runs twice daily:
# - Morning: 9:20 AM ET (reconciliation)
# - Evening: 3:50 PM ET (review)| Command | Description |
|---|---|
buy SYMBOL QTY |
Place buy order |
sell SYMBOL QTY |
Place sell order |
cancel ORDER_ID |
Cancel order |
| Command | Description |
|---|---|
show portfolio |
Portfolio summary |
show positions |
Open positions with P&L |
show orders |
Order history |
show account |
Account details |
| Command | Description |
|---|---|
show timeframe |
Current timeframe |
set timeframe 1d |
Change timeframe |
show config-file |
View YAML config |
show watchlist |
Scanner symbols |
| Command | Description |
|---|---|
morning-routine |
Morning scan and analysis |
evening-summary |
End-of-day report |
monitor |
Watch positions for exits |
forward-test start NAME |
Start validation test |
AutoTrader-AgentEdge/
├── src/
│ ├── autogen_agents/ # AI agents (AutoGen framework)
│ │ ├── voter_agent.py # Production MACD+RSI voting
│ │ ├── base_agent.py # Base agent class
│ │ └── ... # Other agents (in development)
│ ├── trading/ # Trading infrastructure
│ │ ├── broker/ # Alpaca integration
│ │ ├── orders/ # Order management
│ │ ├── positions/ # Position tracking
│ │ └── scheduling/ # Daily routines
│ ├── data_sources/ # Market data
│ └── cli/ # CLI tools
├── config/ # API credentials (local only)
├── config_defaults/ # Default YAML configs
├── docs/ # Documentation
├── reports/ # Trading reports
└── tests/ # Test suite
| Topic | Location |
|---|---|
| Architecture | docs/02_architecture/ |
| Development | docs/04_development/ |
| Design Decisions | docs/05_decisions/ |
| Features | docs/06_features/ |
| Testing | docs/07_testing/ |
# Unit tests
python -m pytest tests/ -v
# Code quality
ruff check src/
black --check src/
# VoterAgent validation
python -c "from src.autogen_agents.voter_agent import VoterAgent; print('OK')"- Pick an issue from GitHub Issues
- Create a feature branch
- Make changes following docs/05_decisions/
- Submit PR to
developmentbranch
AGPL-3.0 - See LICENSE file for details.