Algo Trading — Options & MCX
A high-frequency algorithmic trading system for Options and MCX markets — Python for strategy logic and market data ingestion, C++ for low-latency strategy execution and order placement, Redis for real-time state, and PostgreSQL for tick-level historical data with sub-millisecond precision.
Category
Fintech
Year
2026
Status
In Progress
The Problem
Manual trading in Options and MCX derivatives is too slow. Markets move in milliseconds — by the time a human spots a pattern, confirms it, and places an order, the opportunity is gone. Profitable strategies in Options (especially intraday) and commodity futures on MCX demand execution at tick-level granularity, where a few milliseconds of latency can be the difference between profit and slippage.
What I Built
An end-to-end algorithmic trading system with a two-language architecture designed around latency constraints.
Python layer handles strategy development, backtesting, market data ingestion, and position management. Strategies are prototyped and validated in Python against historical tick data, then handed off to the execution layer.
C++ layer handles the hot path — strategy signal evaluation and order execution. When a strategy fires, C++ places orders with minimal latency, managing order lifecycle (place, modify, cancel) directly against the broker API. This separation keeps the development cycle fast (Python) while keeping execution fast (C++).
Redis sits between the layers as the real-time state bus — live positions, order status, strategy signals, and market snapshots are all in-memory. Both Python and C++ read/write to Redis, making it the single source of truth for current state.
PostgreSQL stores tick-level historical data — every trade, every bid-ask update, timestamped to sub-millisecond precision. This data feeds backtesting and post-trade analysis. Schema is optimized for time-series queries across thousands of instruments.
Key Design Decisions
- Tick-level data capture — every market tick is recorded, not sampled. Strategies that work on 1-second candles miss microstructure patterns that tick data reveals
- HFT-grade precision — timestamps, prices, and quantities are stored and computed at maximum precision to avoid floating-point drift across thousands of trades per day
- C++ for the critical path — Python is fast enough for everything except order execution. The C++ execution engine eliminates the GIL bottleneck and garbage collection pauses that make Python unsuitable for latency-sensitive paths
- Redis as state bus — decouples strategy logic from execution logic without the overhead of a message queue. Both layers poll Redis at microsecond intervals
- Instrument coverage — supports Options (Nifty, BankNifty, stock options) and MCX commodities (Gold, Silver, Crude Oil, Natural Gas)
Interested in working together?
Get in Touch →