Note: This repository serves as an architectural overview and portfolio showcase for my proprietary trading engine developed at TBTFW Ventures. Due to the proprietary nature of the algorithms and market strategies, the source code remains closed.
This project is a fully automated algorithmic trading system designed to operate daily across Forex and Gold (XAU/USD) markets. It requires zero manual input and executes trades based on a highly sophisticated scoring system that analyzes multiple real-time market indicators.
- Languages: Python
- APIs & Data: Broker APIs, WebSockets (for live tick data), Pandas, NumPy
- Machine Learning: Scikit-Learn (Market-regime detection)
- Infrastructure: Cloud-hosted Virtual Machines (VPS) for low-latency execution
-
Live Trading Engine & Broker Integration
- Engineered a robust event-driven trading engine that connects directly to the broker's API.
- Fetches real-time tick and minute-candle data, processes the indicators, and executes trades with sub-second latency.
- Designed with strict risk-management guardrails, including clean end-of-day shutdown protocols and max-drawdown circuit breakers.
-
Advanced Scoring System
- Implemented a composite scoring matrix that reads and weights 6 distinct market indicators simultaneously.
- Dynamically calculates trade position sizing (lot sizes) based on the current indicator score and account equity to optimize the risk/reward ratio.
-
Machine Learning for Market Regime Detection
- Researched and integrated ML models to classify current market regimes (e.g., trending, ranging, highly volatile).
- The engine uses this classification to dynamically adjust its entry conditions and indicator weights, avoiding trades during unfavorable market conditions.
-
Backtesting & Simulation Framework
- Built a comprehensive backtesting framework mirroring the live trading environment.
- Ensures that the execution logic and indicator processing on historical data perfectly match the live event loop, preventing look-ahead bias and guaranteeing reliable simulation results.
-
Automated Reporting
- Generates automated end-of-day HTML/PDF reports summarizing trade executions, slippage, fees, and net profit/loss for non-technical stakeholders.
- State Management & Consistency: Ensuring the backtesting engine and the live execution engine shared the exact same core logic without state bleeding. Achieved by heavily decoupling the data-feed adapters from the core strategy logic.
- Network Resilience: Handling broker disconnects and WebSocket drops during highly volatile news events. Solved by implementing exponential backoff reconnection strategies and state reconciliation upon reconnection.
If you're interested in quantitative development, algorithmic trading architectures, or have a project in mind, let's connect!