Quantitative analysis is the practice of turning market data into rules you can test. Instead of judging a trade by feel, you write down what you believe, measure whether it held historically, and estimate what it would have cost to trade. If the rule survives honest testing, you run it. If it does not, you discard it and keep the finding.
That is the whole discipline. Everything below is detail.
The detail matters, because the ways market data misleads you are specific, unglamorous and easy to skip. This article covers the method, with worked examples drawn from Indian equities where a concrete case helps, though every principle here applies wherever you trade. For the two other lenses on the same problem, see fundamental analysis, which asks what a business is worth, and technical analysis, which asks when price may move.
What separates a quant approach from a discretionary one
The difference is not mathematics. It is falsifiability.
A discretionary view can absorb any outcome. If the trade works the thesis was right, and if it fails the market was irrational. A quantitative rule cannot do this. It says: rank the NIFTY 50 by twelve-month return, buy the top ten, rebalance monthly. That statement produces a specific series of positions over any historical period, and either that series made money after costs or it did not.
This is why quants seem obsessed with process. The process is the only thing standing between a real edge and a story fitted to noise.
The data problems that break naive analysis
Most quant tutorials are written against US data, where decades of clean, survivorship-adjusted history are a paid API call away. Work anywhere else and the data is perfectly usable but will mislead you in three specific ways if you take it at face value. The examples below use Indian equities because they make the problems concrete, and all three appear in every market.
Corporate actions are not optional. A bonus issue or a stock split changes the price series without changing anyone’s wealth. A 1:1 bonus halves the quoted price overnight. If your dataset is unadjusted, your return series records a 50 percent single-day loss that never happened, and any volatility or drawdown measure computed on it is wrong. Adjust for splits, bonuses, rights issues and dividends before computing a single return.
Index membership changes, and your universe changes with it. The NIFTY 50 is reconstituted semi-annually, with changes generally effective from the last trading day of March and September, based on six months of data ending January and July. The index methodology document sets out the eligibility rules, including the impact-cost threshold that governs liquidity. If you backtest “the NIFTY 50” using today’s constituent list across ten years of history, you have built a portfolio of companies selected because they survived and grew large enough to still be in the index. That is survivorship bias, and it inflates returns in a way that looks like skill.
Weighting is free-float, not full market cap. The NIFTY 50 weights constituents by free-float market capitalisation, so promoter holdings do not count toward index weight. Indian promoter stakes are often large. If you reconstruct index weights from total market cap, your replication will drift from the published index and you will spend a day hunting a bug that is really a specification error.
None of this is difficult. It is just work that has to happen before the interesting part, and skipping it produces results that are confidently wrong rather than obviously wrong.
The statistics that earn their place
You need fewer statistical tools than most curricula suggest. These five do the majority of the work.
| Concept | What it tells you | Where it misleads |
|---|---|---|
| Log returns | Additive over time, so multi-period aggregation is clean | Diverge from simple returns at large moves |
| Volatility | Standard deviation of returns, the usual risk proxy | Assumes symmetry that equity returns do not have |
| Correlation | How two assets move together | Rises toward 1 in a crisis, exactly when you need it low |
| Autocorrelation | Whether past returns predict future ones | Weak and unstable; easy to find by accident |
| t-statistic | Whether an effect is distinguishable from chance | Meaningless once you have tested a hundred variants |
The one worth dwelling on is volatility, because the assumption underneath it is false in a way that matters. Standard deviation treats returns as roughly normal. Equity index returns are not normal. They have fat tails, meaning extreme moves happen far more often than a normal distribution predicts, and they are skewed, meaning the large moves cluster on the downside.
The practical consequence is that a position sized to a normal-distribution assumption is too large. How much too large depends on the instrument and the period, which is precisely why this belongs in your own testing rather than in a rule of thumb you read somewhere. Risk management covers the measures that address this directly.
Factors, and what changes between markets
A factor is a characteristic that explains differences in returns across a group of stocks. Value, momentum, size, quality and low volatility are the classical set, and they are well documented across many markets.
Two things change once you leave the deepest, widest markets, and Indian equities illustrate both clearly.
The first is universe size. A long-short factor portfolio wants enough liquid names to form meaningful top and bottom buckets. Below the NIFTY 100 or so, impact cost rises quickly, and a strategy that looks profitable on paper becomes a strategy that moves the price against itself on entry. Test the same rule on the top 50, the top 100 and the top 200. If the edge only exists in the smallest and least liquid names, you have found an illiquidity premium and named it alpha.
The second is concentration. Indian indices carry substantial sector concentration, particularly in financials. A value screen on the NIFTY 50 will often hand you a portfolio that is mostly banks. That is a sector bet wearing a factor costume, and it will behave like one when rates move. Neutralise by sector, or at least measure how much of your return came from the sector tilt rather than the factor. Portfolio construction deals with this properly.
The four ways a backtest lies to you
If you torture the data long enough, it will confess to anything. Ronald Coase
Every one of these has cost someone real money, and the first three are avoidable with discipline alone.
Look-ahead bias. Using information that was not available at decision time. In Indian data this hides in reported fundamentals: a quarterly result belongs to the date it was published, not the quarter it describes. If you rank on March-quarter earnings using March dates, you are trading on numbers that did not exist for weeks afterward.
Survivorship bias. Covered above, and worth repeating because it is the most common single error in amateur Indian backtests. Build your universe as it existed on each historical date, not as it exists now.
Cost naivety. This is where most retail backtests quietly break. A round trip on Indian equities carries brokerage, exchange transaction charges, GST, stamp duty, SEBI turnover fees and securities transaction tax. Individually they look small. On a strategy that rebalances weekly, they compound into the difference between a good result and a losing one. Rates change with each Budget, so rather than reproduce a table that will be stale within a year, take the current figures from the NSE securities transaction tax page and put real numbers into your own cost model.
The discipline that follows is simple: compute your strategy’s annual turnover first, multiply by a realistic round-trip cost, and see what is left of the edge. If a 4 percent annual edge disappears under 3 percent of costs, no amount of model refinement will save it. Better to learn that in an afternoon than after six months of live trading.
Overfitting. The subtlest one, because it feels like work. Every parameter you tune and every variant you test uses up some of the information in your sample. Test enough combinations and one will look excellent purely by chance. Guard against it by deciding your rules before you look, keeping a holdout period you touch once, and treating a t-statistic from the hundredth variant you tried as the meaningless number it is.
Position sizing, which decides more than the signal
Two traders with the same signal and different sizing rules get different outcomes. Sizing is not an implementation detail bolted on afterward; it is a large part of the strategy.
| Approach | Idea | Trade-off |
|---|---|---|
| Fixed fractional | Risk a set percentage of equity per position | Simple, but ignores that volatility changes |
| Volatility targeting | Scale position by target volatility divided by asset volatility | Keeps portfolio risk stable; needs a volatility estimate that is not itself stale |
| Kelly fraction | Size by edge divided by variance | Growth-optimal in theory, uncomfortably aggressive in practice |
In practice most systematic traders run a fraction of Kelly, often a quarter or less, because full Kelly assumes you know your edge exactly. You do not. You have an estimate from a finite sample, and it is probably optimistic.
Tooling
Python has effectively won this space, on ecosystem rather than language design. pandas and NumPy for data handling, statsmodels and scikit-learn for modelling, matplotlib for research plots that only you will see.
For pricing and risk specifically, I maintain quantflow-finance, an open-source library covering options pricing, risk analytics and portfolio tools. It is MIT licensed and the source is on GitHub, so you can read exactly what any function does rather than trusting a number it returns. That is worth insisting on generally: a risk figure you cannot derive yourself is a risk figure you do not really have.
Where to go from here
Quantitative analysis is not a set of formulas. It is a habit of writing down what you believe precisely enough that the data can contradict you, then giving it every opportunity to do so.
The foundations here lead in three directions. Portfolio construction takes single-asset signals and combines them into something with a coherent risk profile. Risk management turns the tail-risk problem sketched above into measures you can act on. And machine learning for stock selection extends factor thinking to models that find relationships you did not specify, along with all the extra ways those models can fool you.
Start with data hygiene and honest costs. Almost everyone who fails at this fails there, long before the modelling gets difficult.