A comprehensive algorithmic trading system implementing systematic trading strategies with paper trading execution, extensive backtesting, and Monte Carlo simulation capabilities. This project demonstrates enterprise-level quantitative finance software engineering practices using Interactive Brokers' paper trading environment.
- Real-time paper trading execution via Interactive Brokers API with multi-strategy portfolio management
- Dynamic position sizing with automated rebalancing across 8 strategy allocations
- Risk management with 3x leveraged positions and threshold-based rebalancing (5% drift tolerance)
- Market hours awareness with automated scheduling and portfolio state persistence
- Multi-asset support across ES, YM, GC, NQ futures with proper contract specifications
- Monte Carlo simulations with bootstrap resampling and GARCH volatility modeling
- Comprehensive backtesting framework implementing multiple systematic strategies
- Performance attribution with drawdown analysis, Sharpe ratios, and fat-tail statistics
- Strategy comparison tools with visual equity curve analysis
- 75 instruments with 2-25 years of daily OHLCV data per instrument
- Automated data collection and validation pipelines
- Multi-timeframe support (1-minute, 5-minute, daily bars)
- Real-time market data integration with historical data alignment
Last Updated: 2025-08-01 23:16 UTC | Trading Days: 31
| Metric | Value |
|---|---|
| Account Value | $30,734.16 |
| Total P&L | 📈 $563.80 |
| Unrealized P&L | $0.00 |
| Realized P&L | $563.80 |
| Total Return | +1.87% |
| Max Drawdown | 7.2%* |
No positions currently open - waiting for entry signals
📝 Metrics automatically updated via GitHub Actions from paper trading IBKR account
- IBS (Internal Bar Strength) - Mean reversion strategy across 4 futures contracts
- Williams %R - Momentum strategy with 2-day lookback periods
- Trend Following - Multi-timeframe momentum with forecast scaling
- Long-Short Equity - Market-neutral statistical arbitrage
- Portfolio-level position sizing based on volatility forecasting
- Dynamic capital allocation with monthly rebalancing
- Commission and slippage modeling for realistic P&L attribution
- Drawdown controls with maximum position limits
├── portfolio/live_port.py # Paper trading engine
├── rob_port/ # Systematic trading framework
│ ├── chapter*.py # Strategy implementations
│ └── tests/ # Comprehensive test suite
├── Data/ # Market data warehouse
│ ├── instruments.csv # Contract specifications
│ └── *_daily_data.csv # Historical price data
├── results/ # Backtest outputs and visualizations
└── account_snapshots/ # Paper trading performance tracking
- Python 3.8+ with NumPy, Pandas for quantitative analysis
- ib_insync for Interactive Brokers API integration
- ARCH/GARCH models for volatility forecasting
- Matplotlib/Seaborn for performance visualization
- JSON/CSV for data persistence and configuration management
- Multi-strategy portfolio with dynamic allocation across 8 strategies
- Real-time P&L tracking with unrealized/realized profit attribution (paper money)
- Automated position management with market hours integration
- Daily portfolio snapshots for performance monitoring
- Comprehensive strategy testing with walk-forward validation
- Monte Carlo simulation with 1000+ iterations for statistical significance
- Performance metrics: Sharpe ratio, Calmar ratio, maximum drawdown analysis
- Strategy comparison tools with visual performance attribution
- 75 futures instruments across asset classes:
- Equity Indices: ES, NQ, YM, Russell 2000
- Fixed Income: Treasury bonds, notes across yield curve
- Commodities: Gold, Silver, Oil, Natural Gas, Agricultural
- FX: Major currency pairs (EUR, JPY, GBP, etc.)
- Volatility: VIX, VSTOXX indices
- 2-25 years of historical data per instrument
- Daily OHLCV bars with volume validation
- Corporate actions and contract roll adjustments
- Missing data interpolation and outlier detection
- Bootstrap resampling with configurable block sizes
- GARCH volatility modeling for realistic return distributions
- Parameter uncertainty analysis across strategy configurations
- Stress testing with extreme market scenario generation
# Example: Monte Carlo simulation with 1000 iterations
num_iterations = 1000
block_size = 5 # Bootstrap block size
results = run_monte_carlo_simulation(
strategy_returns,
iterations=num_iterations,
garch_model=True
)# Dynamic position sizing based on current equity
def calculate_position_size(current_equity, target_allocation_pct,
price, multiplier, risk_multiplier=3.0):
target_dollar_amount = current_equity * target_allocation_pct * risk_multiplier
contract_value = price * multiplier
return max(1, round(target_dollar_amount / contract_value))- 50% IBS strategies (12.5% each: ES, YM, GC, NQ)
- 50% Williams %R strategies (12.5% each: ES, YM, GC, NQ)
- Automated rebalancing when allocation drift exceeds 5%
- Monthly rebalancing regardless of drift
# Python dependencies
pip install pandas numpy matplotlib ib_insync arch- Install IB Gateway or Trader Workstation
- Enable API connections (port 4002 for paper, 4001 for live)
- Configure API settings and permissions
# Start paper trading engine
python portfolio/live_port.py
# Run backtests
python rob_port/chapter4.py
# Generate Monte Carlo analysis
python ES/ibs_monte.py
# Monitor account status
python account_summary.pyThe system generates comprehensive performance reports including:
- Equity curves with drawdown overlays
- Strategy comparison charts with performance attribution
- Monte Carlo confidence intervals for expected returns
- Risk metrics dashboards with Sharpe ratios and volatility analysis
This is a demonstration system for educational and professional development purposes using paper trading only - no real money is involved. All trading is conducted in Interactive Brokers' paper trading environment with simulated funds. The strategies and code provided are for illustrative and educational purposes. While the paper trading results provide valuable insights into strategy performance, actual trading involves real financial risk and should not be undertaken without proper risk management, regulatory compliance, and thorough understanding of the strategies involved.
- Options strategies integration with Greeks calculation
- Machine learning signal generation with feature engineering
- Real-time risk monitoring with VaR calculations
- Multi-broker support beyond Interactive Brokers
- Cloud deployment with AWS/Azure integration
This project demonstrates production-ready quantitative finance software development practices including systematic strategy research, robust backtesting frameworks, real-time execution systems, and comprehensive risk management.
