Algorithmic Backtesting
Quantitative Finance
QuantLab
Event-Driven Simulation with Indian Market Friction
GTU Diploma Semester 5 minor project (DI05000341). An event-driven backtesting engine modeling statutory Indian taxes (STT, stamp duty, GST) and Almgren-Chriss nonlinear slippage, using Combinatorial Purged Cross-Validation (CPCV) with embargo and Deflated Sharpe Ratio to assess overfitting.
Hardware-Verified Benchmarks
0.73 DSR
Deflated Sharpe
Multi-testing penalty applied across 10 trial strategies
31% Decay
OOS Sharpe Decay
In-sample Sharpe 2.84 degrades to 1.96 under CPCV embargo
28.9% → 37.8%
AR(1) Embargo Shift
Probability of Backtest Overfitting exposed by 5% purge
₹384.81 / trade
Statutory Drag
Taxes consume ~3.85% of profit on ₹1L round-trip
T+1 Invariant
Execution Model
Signal evaluated at Day t Close; filled at Day t+1 Open
NIFTY 50 + Midcaps
Universe Scope
Daily bars from 2019–2024 with split and dividend adjustments
Technical Specification Sheet
ARCArchitectural Overview
Engineering Architecture
Grounded in the SEBI 2024 retail trading study—which revealed 93% of active retail traders in India lost money, with transaction friction accounting for 28% of gross losses. QuantLab exposes the statistical illusions in retail trading strategies by enforcing rigorous empirical friction. It replaces naive frictionless backtests with discrete event simulation, modeling Almgren-Chriss square-root market impact and the exact Indian statutory tax schedule (STT, stamp duty, GST, SEBI turnover, brokerage caps). Overfitting is audited using Combinatorial Purged Cross-Validation (N=10, k=2, 45 paths) with 10-bar embargoes and Deflated Sharpe Ratio penalties.
Key Technical Innovations:
- ›Models statutory Indian taxes that wipe out typical algorithmic paper gains.
- ›Incorporates Combinatorial Purged Cross-Validation with 10-bar embargoes.
- ›Deflated Sharpe Ratio penalizes multi-testing data snooping bias across strategy trials.
VFDGround-Truth Verification
Empirical Test Record
Evaluated against 5 years of National Stock Exchange historical EOD data (2019-2024).
SRCSource & Artifacts
CHT6 Simulation Exhibits (Full Uncropped Curves)

Simulated Equity Curve
SMA crossover strategy on NIFTY50 universe with full Almgren-Chriss impact and statutory costs.

Drawdown Profile
Max drawdown analysis showing 23.4% peak-to-trough decline under market stress periods.

In-Sample vs OOS Sharpe
In-sample Sharpe ratio of 2.84 falls to 1.96 under out-of-sample combinatorial purged testing.

CAGR vs Sharpe Ratio
Comparison of 3 strategies under gross vs net performance; momentum survives friction while RSI collapses.

Almgren-Chriss Impact Calibration
Square-root market impact curve calibrated on National Stock Exchange tick volumes.

Monthly Returns Distribution
5-year monthly return heatmap revealing regime changes and cost drag distribution shift.