QuantaLab
A stock market simulation and analytics tool — a virtual trading platform built on a pipeline that ingests and validates five years of historical market data, with strategy backtesting and portfolio risk/return dashboards.
The problem
Learning how markets behave is expensive, and the expensive part is not the tuition — it's the money you lose while forming intuition. Paper trading fixes the risk but usually keeps the worst property of the real thing: you make a decision, then wait weeks to find out whether it was any good.
QuantaLab compresses that loop. Trade against real historical data with simulated capital, then backtest the strategy over five years of it and see the answer immediately — including the part most beginner tools omit, which is the risk you took to get the return.
Approach
Built as part of a team. The layer I want to talk about is the least glamorous one, because it turned out to be the one that mattered.
- The data pipeline is the product. Five years of historical data pulled via yfinance is not clean data. There are missing sessions, holidays that differ by exchange, splits and dividends that silently rewrite price history, and tickers that stop existing. Every one of those produces a backtest that looks fine and is wrong. So ingestion is paired with a validation step — gaps, continuity and adjustment checks — before anything downstream is allowed to touch it.
- Simulation on top of validated data. Users buy and sell against real market prices with simulated capital, so positions, cash and portfolio value move exactly as they would have. The mechanics are real; only the money isn't.
- Backtesting as a first-class feature. A strategy is run over the full historical window rather than a hand-picked slice, which is what stops a strategy from looking brilliant purely because it was tested on a bull run.
- Dashboards that show risk, not just return. Matplotlib visualisations of portfolio performance and risk/return — because a strategy that returns 30% with wild drawdowns and one that returns 25% smoothly are not the same strategy, and a returns-only chart makes them look identical.
Stack
- yfinance Free, no-key access to years of historical OHLCV data. The trade-off is data quality, which is precisely why the validation layer exists.
- Pandas / NumPy Time-indexed operations — resampling, rolling windows, alignment across tickers — are what backtesting is. Doing this by hand in loops would be both slower and more error-prone.
- Scikit-learn Predictive modelling on the validated dataset, with a consistent fit/predict interface that makes swapping models a one-line change rather than a rewrite.
- Matplotlib Full control over the analytical charts. For dashboards where the axes and annotations carry the meaning, being able to specify every element beats a prettier default.
Outcome
5 yrs
of historical market data ingested and validated
₹0
of real capital at risk while learning
Full-window
backtesting, not cherry-picked date ranges
What I took away: in anything data-driven, the validation layer is where correctness is won or lost. A model trained on unvalidated market data doesn't fail loudly — it produces confident, plausible, wrong numbers. That's a far more dangerous failure than a crash.