Skip to content
Arthvyuh

How to backtest an options strategy without coding

You do not need to write Python to test an options idea. You need precise rules, clean historical prices and an honest way to read the result. This article walks through a no-code backtest of a NIFTY options strategy from the first sentence to the final check.

On this page
  1. What a backtest is, and what it is not
  2. Step 1: write the idea as rules
  3. Step 2: build it in a no-code builder
  4. Step 3: choose dates, capital and charges
  5. Check the data before the result
  6. Step 4: read the result like a sceptic
  7. Common mistakes
  8. After the backtest

What a backtest is, and what it is not

A backtest applies a fixed set of rules to past prices and records every trade the rules would have taken. It answers one question: how did these exact rules behave over this period, under these assumptions about prices and costs?

It does not answer whether the rules will make money from now on. Markets change, and a backtest cannot know what would have happened to your orders in a real order book. Treat it as a careful experiment, not a forecast.

Step 1: write the idea as rules

Start with one sentence and remove every word that needs judgement. “Sell options when the market is quiet” becomes: every Tuesday at 09:30, sell one lot of the NIFTY call and one lot of the put whose strikes are 200 points from the index, nearest weekly expiry; exit each leg if its premium doubles; exit everything at 15:15.

Each part is now a setting: index, day, time, strike rule, expiry, side, lots, stop and square-off. If a part of your idea cannot be written this way, the backtest will not be testing your idea.

Step 2: build it in a no-code builder

In Arthvyuh’s Strategy builder you choose the index (NIFTY, BANKNIFTY or SENSEX), the start and square-off times and the weekdays. Then you add legs: buy or sell a call, a put or the index future.

For each option leg you choose the expiry (weekly, next weekly or monthly; BANKNIFTY is monthly only) and how the strike is picked: at the money plus or minus points or a percentage; a multiple of the at-the-money straddle premium; the strike whose delta is nearest to a number such as 0.3; or by premium, for example the strike closest to ₹50.

Exits are stop-loss, target and trailing stop, in percentages or rupees, plus the square-off time. A strategy can be time based, indicator based (for example a moving-average cross on the index, on the at-the-money straddle chart, or on the ATM call or put chart), intraday, BTST or positional. Save it with a clear name. Saving does not place any order.

Step 3: choose dates, capital and charges

Open the backtest, pick the saved strategy, a date range and starting capital. Arthvyuh’s option prices are one-minute bars since 2019 for NIFTY and BANKNIFTY and since 2023 for SENSEX; some days or contracts have gaps, and the screen shows the history available.

Keep charges on. Arthvyuh estimates them by trade date since April 2021: brokerage, STT, exchange charges, SEBI fee, stamp duty and GST. A switch shows the result before charges for comparison. Slippage is not deducted, so a strategy that trades often or in thin strikes may look better than it would have been live.

Split the dates. Develop on an earlier period, for example 2021 to 2024, and keep 2025 onwards aside as an unseen check. Write the split down before you look at any result.

Check the data before the result

Before reading any profit figure, check what the test actually used. Did every day in your range have option prices for the strikes your rules picked? A day with missing data may simply have no trade, which can flatter or hurt the total without anyone noticing.

Check a few individual trades by hand. Open one entry, look at the time, the strike chosen and the price, and ask whether a person following the rules on that morning would have picked the same contract. Two or three careful checks catch most set-up mistakes, such as a wrong expiry or a stop measured on the index when you meant the premium.

Check the lot size and capital. A NIFTY lot is 65 units today; a rule tested with 10 lots on ₹2 lakh of capital may show trades that no broker would have allowed on that margin.

Step 4: read the result like a sceptic

Look past the final profit. Check the largest drawdown, the fall from a peak to the next low, and how long the account stayed below its old high. Invented example: an account goes from ₹2,00,000 to ₹2,60,000, falls to ₹1,95,000 and ends at ₹2,40,000. It ends 20% up, but the drawdown was ₹65,000, a quarter of the peak.

Read the trade list. Do a handful of days make most of the profit? Do losses cluster around expiry days or around big gap openings? Compare each year separately; a rule that only worked in one year is fragile.

Compare the result with and without charges. If the edge mostly disappears after charges, it was too small to begin with. Then run the unseen period once. If it fails there, accept it rather than tuning again.

Common mistakes

Look-ahead: using information the trader did not have at that moment, such as the day’s close or a candle that had not finished. A completed-candle rule should act only after the candle ends.

Too many knobs: adding filter after filter until the curve is smooth. Each extra setting makes it easier to fit the past by accident.

Ignoring size: a backtest with ₹10 lakh and 5 lots is a different experiment from ₹2 lakh and 1 lot. Lot sizes change over time, and a small account cannot always hold a scaled-down version of a big position.

Forgetting execution: the backtest fills at the minute’s price. A real order meets a real bid and ask. Practice replay and paper trading are the next steps for seeing that difference.

After the backtest

If the rules survive the unseen period, replay a few hard days in Practice replay: an expiry day, a day with a gap, a day with a big trend. Then run the strategy in paper trading with virtual money and compare paper fills and charges with the backtest’s.

Each step is a filter. Most ideas do not pass all of them, and that is useful information you got without risking money.

Test your own rules for free

Create a free account

Related on Arthvyuh

Education only, not investment advice. Examples are invented arithmetic, not anyone’s results, and do not predict any future result. Arthvyuh is not registered with SEBI as an investment adviser or research analyst.

Continue learning

The tools