Skip to main content

How to Backtest Positional Strategies

Indices are divided according to two expiry dates:​

If you trade in indices with weekly and monthly expiry, these two indices are available.

Weekly and Monthly Expiry Indices

If you trade in indices with monthly expiry, these four indices are available.

Monthly Expiry Indices

When you trade in monthly expiry, you also get the option to get weekly expiries from the previous regime.

Toggle for Weekly Expiries

Toggle Options:​

  • Toggle ON includes:
    Previous Regime Weekly Data & New Regime Monthly Data
  • Toggle OFF includes:
    Previous Regime Monthly Data & New Regime Monthly Data

Once you have selected the index, you can choose which market you want to trade in. We have cash and a future market.

Market Selection


Let’s say we are trading in Nifty in the cash market. Now the next step is to make our strategy.​

Here we are talking about Positional Strategies.

Positional​

  • Entry Time: The time we want to enter our strategy.
  • Exit Time: The time we want to exit our positions.
  • Trading days before expiry: The number of market days remaining until the expiration.

If the expiry for a monthly option is the last Thursday of the month:

  • If today is Monday, December 18, 2024, and the expiry date is Thursday, December 26, 2024, there are 5 trading days remaining (excluding weekends and holidays).

You can also select the day when you want to enter and exit the market.

Average Trading Days to Expiry:​

Expiry periods usually have 15–16 average trading days, though in rare cases, there may be up to 24 trading days.


Example: Counting 15–16 Trading Days for Monthly Expiry​

Assume the monthly expiry is on Thursday, January 25, 2024 (the last Thursday of January). Here's how to count backward:

  • Mark the expiry day:
    Expiry date: Thursday, January 25, 2024.

  • Exclude weekends (Saturday & Sunday):
    Trading days are only Monday to Friday.

  • Count backward from the expiry date:
    Start counting trading days from Thursday, January 25.

DateDay of WeekTrading Day?Trading Days Count
January 25, 2024ThursdayYes0
January 24, 2024WednesdayYes1
January 23, 2024TuesdayYes2
January 22, 2024MondayYes3
January 19, 2024FridayYes4
January 18, 2024ThursdayYes5
............
January 01, 2024ThursdayYes20

In this example, there are 20 trading days.

Positional Expiry (Weekly vs. Monthly):​

  • Weekly Expiry: The position will expire every week, i.e., the Thursday of that specific week.
  • Monthly Expiry: The position will expire monthly, typically the last Thursday of the month.

Strategy Settings​

Legwise Settings:​

Once you have selected the strategy type, you can choose to square off partially or completely.

Legwise Settings


Leg Builder Settings:​

To fine-tune your strategy, you can choose different settings in the Leg Builder:

  • Segment: Future or Options
  • Lot: Number of Lots
  • Position: Buy or Sell
  • Option Type: Call or Put
  • Expiry
  • Select Strike Criteria
  • Strike Type

Leg Builder Settings


Adding a Leg:​

Once you are done with these settings, you can also add a leg. To add a leg, click on Add Leg.

Add Leg


Customizing Strategy Settings:​

Then you can choose to customize settings according to your strategy.

Customize Settings

You can add:

  • Target Profit
  • Stop Loss: Select one option from the dropdown and create the strategy accordingly.
  • Trail SL
  • Re-entry on Tgt
  • Re-entry on SL
  • Simple Momentum
  • Range Breakout

Overall Strategy Settings:​

Once you are done with these settings, you can move to the overall strategy settings.

Overall Settings

These settings are applied to all of your strategies.


Saving and Backtesting the Strategy:​

Click on the save button at the bottom right & save this strategy with any name. Now to backtest this strategy:

  1. Select the time for which you want to backtest.
  2. Click on Backtest.

It will give you the backtest results and stats of this strategy.

Backtest Results

You will find a toggle as shown in the image. If you turn this OFF, it will exclude backtesting data before the implementation of the latest SEBI changes.

SEBI Changes Toggle