Free trial
Menu
Tutorial

Run a Strategy Backtest in QuantPower

This tutorial runs a backtest of a Nifty short straddle in QuantPower: choosing the period, setting costs and slippage, running the test and comparing versions. It takes about 10 minutes once the strategy is built.

QuantPower Research · Updated 3 Nov 2026 · 3 min read

Before you start

  • A saved strategy. The create a strategy tutorial shows how to build one.
  • A Professional or Ultimate plan, which include backtesting. There is no charge per backtest. See pricing.
  • A question to answer. For example: "Does a 30% stop loss on each leg work better than 25%?" A backtest is most useful when it tests one idea.

Step 1: Open the backtest

  1. Open your strategy in Strategy builder.
  2. Select Backtest.
Backtest settings for a Nifty short straddle, with the period, costs, a run in progress and recent runs.Backtest settings for a Nifty short straddle, with the period, costs, a run in progress and recent runs.
Backtest settings for a Nifty short straddle, with the period, costs, a run in progress and recent runs.

Step 2: Choose the period

Choose a period that includes different kinds of markets: trending months, range-bound months and at least one sharp fall or volatility spike. In this example the period runs from 1 January 2025 to 30 September 2026.

Short periods can mislead. A strategy that sells options can look excellent for months and then give back the gains in a few days. The longer the period, the more of those days it includes.

Step 3: Set the instrument and quantity

SettingExampleNotes
Underlying and expiryNIFTY weekly options, nearest expiryNifty weekly options expire on Tuesdays
Quantity1 lot (65)Nifty's lot is 65 from the January 2026 series and was 75 before it. Check which size older trades use
Starting capital₹2,00,000Used to show returns and drawdown as percentages

Step 4: Add costs and slippage

Costs decide whether many option strategies make money at all.

  • Brokerage: for example ₹20 per order. A short straddle with two entries and two exits a day pays four times that.
  • Statutory charges: STT on options is 0.15% of the premium on sell orders from 1 April 2026, plus exchange, SEBI and stamp charges and GST. The STT tax calculator shows the full breakdown.
  • Slippage: the gap between the price in the data and the price you would get. One point per order is a cautious starting point for liquid Nifty strikes; use more for thinner contracts. The slippage calculator helps estimate it.

Step 5: Run the test

Select Run backtest. The engine applies the rules on each trading day in the period and shows its progress. When it finishes, the run appears in the list of recent runs with its net P&L and maximum drawdown.

Step 6: Compare versions

Change one setting, run again and compare:

RunChangeWhat to compare
AStop loss 30% on each legNet P&L and maximum drawdown
BStop loss 25%Whether the smaller stop cut the drawdown
CEntry 09:30 instead of 09:20Whether timing matters

If a small change swings the result from profit to loss, the strategy is fragile. Our guide to overfitting explains why the best-looking run is often not the one to trade.

Step 7: Read the results

The next tutorial, reading backtest results, goes through each metric, the equity curve and the trade list.

Common problems

ProblemLikely causeWhat to do
Very few tradesPeriod too short or conditions too strictLengthen the period or loosen a condition
Results look too goodCosts or slippage left out, or rules that use future dataAdd costs and check the rules for look-ahead bias
Large single-day lossesGap or event daysKeep them in the test. They will happen live too
Results change after editingA setting changed with the editCompare the saved settings of both runs

Next steps

Frequently asked questions

How long should the backtest period be?

Long enough to include calm and volatile markets. For intraday option strategies, a year or more is a sensible minimum.

Does the backtest include costs?

Yes, when you set them. Include brokerage, statutory charges and slippage so the results reflect what live trading would cost.

Can I backtest a TradingView strategy?

Backtests run on strategies from the strategy builder. Test TradingView strategies in TradingView, then paper trade them with signal trading.

Screens in this tutorial are illustrations with sample data. Labels in the app may differ slightly.
Backtest results are hypothetical and do not guarantee future returns. Trading involves substantial risk.