What brokerage and taxes do to a backtest in India.
STT, stamp duty, brokerage, the spread and tax on profits, set against Finertia’s Nifty 50 study run at half, default and double the cost. Where the result goes as costs rise.
The short answer
Costs decide whether a lot of backtests are worth anything. In Finertia’s Nifty 50 study, every rule was charged 0.1% each time it moved in or out of a stock, and the whole study was re-run at half and at double that. The typical strategy-and-stock pair scored a Sharpe ratio of −0.11 on the later years at half the cost, −0.18 at the default and −0.31 at double. On delivery trades in India, the taxes alone come to about the default, before brokerage or the spread.
Taxes on profits are not in that number at all. A backtest’s returns are before income tax.
What a share trade costs in India
The charges on a delivery trade in listed shares, as they stood in November 2026. Rates change with each budget, so check them against a current contract note.
| Charge | Delivery trade | On which side |
|---|---|---|
| Securities transaction tax (STT) | 0.1% | Buy and sell |
| Stamp duty | 0.015% | Buy |
| Exchange transaction charge and SEBI fee | a few thousandths of a percent | Buy and sell |
| GST | 18% of brokerage and exchange charges | Buy and sell |
| Brokerage | set by the broker, often zero on delivery | Buy and sell |
| Depository charge | a flat amount per stock sold | Sell |
Intraday trades pay less tax per trade (STT of 0.025% on the sell side only, stamp duty of 0.003%), but rules like the ones tested here hold positions for days or weeks, so the delivery rates are the ones that apply.
None of these include the spread: the gap between the price you see and the price you get. It is small on the largest stocks and much larger on thinly traded ones, and it never appears on a contract note.
How a backtest charges them
Finertia charges the cost on every unit of position change. Buying a stock is one unit and selling it is another, so a round trip pays 0.1% twice. Turning a long position straight into a short one is two units at once. At the default, a round trip costs 0.2%, which is about what STT and stamp duty take on their own. Brokerage, GST and the spread come on top, so for delivery trades the real figure sits between the default and the double-cost columns below.
The rules tested here also go short. In India a short sale of shares has to be closed the same day; holding one for longer means futures or borrowing the shares through the exchanges’ lending scheme, each with its own costs and rules. The study’s short positions are a simplification of that.
The Nifty 50 study at three costs
Momentum, MACD and Bollinger bands on 43 stocks, 2011–2025, 129 pairs in all:
| Half cost | Default | Double cost | |
|---|---|---|---|
| Typical Sharpe, tuning years | 0.18 | 0.09 | −0.04 |
| Typical Sharpe, later years | −0.11 | −0.18 | −0.31 |
| Above zero on the later years | 50 | 41 | 33 |
| Beat holding on the tuning years | 56 | 50 | 42 |
| Still ahead on the later years | 8 | 7 | 6 |
| Passed three checks for luck | 4 | 4 | 3 |
At double the cost, even the tuning years, where the settings were picked to look their best, came out below zero for the typical pair. Rules that trade often pay most: the Bollinger-band results went from 21 stocks ahead of holding on the tuning years at half cost to 11 at double.
The cost at which a result disappears
A better question than “what did it cost” is “how much could it cost before the result is gone”. Every backtest in Finertia’s workspace answers it with a break-even cost: the charge per unit of position change at which the strategy’s return falls to zero. The demo, momentum on AAPL 2019–2024 with 164 trades, shows it:
| Cost per unit of position change | Sharpe ratio |
|---|---|
| None | 0.52 |
| Half the assumed cost | 0.45 |
| Assumed, 0.1% | 0.39 |
| Double | 0.26 |
| Five times | −0.10 |
It breaks even at 0.41%, 4.1 times the cost it assumed. That sounds like room to spare, but every step up in cost took a slice off the Sharpe ratio, and the strategy trailed simply holding AAPL at every one of them.
Tax on the profits
A backtest reports returns before income tax, and a rule that trades often realises nearly all its gains within a year. As of November 2026, gains on listed shares held for twelve months or less are taxed as short-term capital gains at 20%; held longer, at 12.5% on gains above ₹1.25 lakh a year. Intraday profits count as business income and are taxed at your slab rate. Holding a stock for years defers the tax until it is sold; trading it often does not. For your own situation, ask a tax professional.
How to check your own backtest
- Find out what cost it assumed, and whether it charges both the buy and the sell.
- Run it again at double the cost. If the result is gone, it was never far from gone.
- Read the break-even cost, and compare it with what your trades actually pay.
- Compare the after-cost result with holding the same stock, which pays almost nothing.
- Remember the figure is before income tax.
The other steps of a fair test are in how to backtest a trading strategy without fooling yourself.
What this does not cover
The figures are from three rules on one market over one period, with a flat cost per trade. Real costs vary by broker, by stock and by the size of the trade, and the tax rules above are a summary, not tax advice. The full study: Of 129 Nifty strategies, four survived honest testing.
On real stocks
Each stock page runs the same three rules on one stock, 2019–2024, against holding it. 14 of them are Indian large caps.
- Nifty 50 · Sharpe 0.78 holding it
- Reliance Industries (RELIANCE) · Sharpe 0.56 holding it
- HDFC Bank (HDFCBANK) · Sharpe 0.38 holding it
- Tata Consultancy Services (TCS) · Sharpe 0.68 holding it
- Infosys (INFY) · Sharpe 0.81 holding it
- State Bank of India (SBIN) · Sharpe 0.58 holding it
See it on a real strategy.
Finertia runs these checks on any stock you pick. The free plan runs the backtest; Pro adds the validation.