Skip to main content

Leg Builder

This feature enables you to create a leg in your strategy.

For example - if you want to create an ATM Buy position of current week, next week, or monthly expiry with 1 Lot, you can do that using this feature.

Leg Builder on AlgoTest

:For any queries reach out to us!

Select Segments

This feature enables you to add a leg in either Futures or Options.

Leg Builder on AlgoTest

If you want to backtest your strategy on Futures select Futures as shown in the image below

Leg Builder on AlgoTest

If you want to backtest your strategy on Options select Options as shown in the image below

Leg Builder on AlgoTest

Total Lots

This feature enables you to enter desired quantity in terms of lots if you want to backtest each leg.
For example - If you want 10 lots then you can add 10 lots as shown in the image below.

Leg Builder on AlgoTest

Position

This feature enables you to select your position in a leg.

Leg Builder on AlgoTest

If you want to create Buy Options/Future position you can select Buy as shown in the image below.

Leg Builder on AlgoTest

If you want to create Sell Options/Future position you can select Sell as shown in the image below.

Leg Builder on AlgoTest

Option Type

This feature enables you to select CALL or PUT for your legs.

Leg Builder on AlgoTest

If you want to add a Call leg, you can select Call as shown in the image below

Leg Builder on AlgoTest

If you want to add a Put leg, you can select Put as shown in the image below

Leg Builder on AlgoTest

Expiry

This feature enables you to select the expiry of option contracts you want to backtest.
It provides you access to select different expiry contracts like weekly, next weekly, and monthly.

Leg Builder on AlgoTest

To select the current week's expiry select weekly from the dropdown menu under expiry as shown in the image below.

Leg Builder on AlgoTest

To select the next week's expiry, select next weekly from dropdown menu under expiry as shown in the image below.

Leg Builder on AlgoTest

To select the current month's expiry, select monthly from dropdown menu under expiry as shown in the image below.

Leg Builder on AlgoTest

Strike Selection

This section is all about the features available to select your desired option strike.
It provides you with different methods to select your desired option strike. You can select any of the available features to select a strike from the drop down under Select Strike Criteria as shown in the image below.

Leg Builder on AlgoTest

Strike Type

This feature enables you to select option strike based on their type.
For example, you can select ATM, OTM, ITM, etc.

An image from the static

  • Example 1- Assume our entry time is 09:18 and we want to enter in the 2 strike away OTM CE option strike at 09:18, so we will select OTM2 in strike type. So if at 09:18 the underlying will be at 20000, then it will select the 20100 CE strike.

  • Example 2- Assume our entry time is 09:30 and we want to enter in the 2 strike away ITM CE option strike at 09:30, so we will select ITM2 in strike type. So if, at 09:30, the underlying will be at 20000, then it will select the 19900 CE strike.

    There is a gap of 50 between strikes here. So the strikes here are 19900, 19950, 20000, 20050, 20100, etc.

An image from the static

Premium Range

This feature enables you to select an option strike based on the option premium range.
It will select a strike whose premium is in the range defined by you. According to the below image, it will select a strike whose premium is between 50 and 200.

An image from the static

  • Example :- Assume our entry time is 09:18 and we want to select a strike whose premium is between 40 and 80. So we will select Premium Range in Select Strike Criteria, with 40 in the lower and 80 in the upper. So it will enter a strike whose premium is between 40 and 80.

An image from the static

Closest Premium

This feature enables you to select a strike based on the nearest option premium value.
It will select an option strike whose premium is nearest to the premium value defined by you. Assuming you defined a value of 50, it will take entry in a strike whose premium is nearest to 50. If there are two strikes whose premiums are 49 and 52, it will select a strike whose premium is 49.

An image from the static

  • Example :- Assume our entry time is 09:18 and we want to select a strike whose premium is closest to 100. So we will select the Closest Premium in the Select Strike Criteria and put 100 in the premium. So it will enter into a strike whose premium is closest to 100.

An image from the static

Premium >=

This feature enables you to select a strike based on an option premium value that is either more than or equal to a specific value.
It will select an option strike whose premium is either equal to or more than the premium value defined by you. Assuming you define a value of 50, it will take entry in a strike whose premium is either equal to 50 or more than 50. If there are two strikes whose premiums are 49 and 52, it will select the strike whose premium is 52.

An image from the static

  • Example :- Assume our entry time is 09:18 and we want to select a strike whose premium is more than or equal to 100. So we will select Premium >= in Select Strike Criteria and put 100 in Premium. So it will enter at 09.18 in a strike whose premium is either 100 or more than 100.

An image from the static

Straddle Width

This is an advanced way to select a strike. It enables you to select a strike based on the straddle price (ATM CE + ATM PE).
In simple terms, what it is doing here is multiplying the ATM straddle price with a number defined by you and adding or subtracting (selected by you) it from the ATM strike at that time.

An image from the static

  • Example 1 :-
    Assume entry timing 09:18
    Nifty ATM Strike is 20000
    Nifty ATM Straddle Price 200 ( Straddle = ATM CE + ATM PE)
    If enter + and 0.5 as shown in the image below.

    An image from the static

    Strike it selects is
    Strike = ATM STRIKE + ( 0.5 _ ATM Straddle Price)
    Strike = 20000 + (0.5 _ 200)
    Strike = 20000 + (100)
    Strike = 20100
So it will select the 20100 strike at our entry time, i.e., 09:18.

  • Example 2 :-
    Assume our entry timing is 09:20
    Nifty ATM Strike is 20000
    Nifty ATM Straddle Price is 200 ( Straddle = ATM CE + ATM PE)
    We enter - and 1 as shown in the image below.

    An image from the static

    Strike it selects is
    Strike = ATM STRIKE - ( 1 * ATM Straddle Price)
    Strike = 20000 - (1 * 200)
    Strike = 20000 - (200)
    Strike = 19800
So it will select the 19800 strike at our entry time, i.e., 09:20.

% of ATM

This feature enables you to select strikes based on the percentage of ATM Strike. Assuming you want to select a strike that is 99% or 101% of the ATM Strike, you can do this using this feature.
We have 2 options here: “+ -” and “% of ATM." What it is doing here is subtracting or adding a % (which we define) from the ATM Strike. So if we want to select a strike that is 101% of the ATM, we just add(+) 1% to the ATM. If we want to select a strike that is 99% of the ATM, we just subtract (-) 1% from the ATM.

% of ATM for Strike Selection

  • Example 1 :-
    Assume entry timing 09:18
    ATM Strike at 09:18 is 20000
    We enter - and 1 as shown in the image below

    ATM Percentage

    Strike it selects is
    Strike = ATM - 1% of ATM
    Strike = 20000 - (1% of 20000)
    Strike = 20000 - 200
    Strike = 19800

So it will select the Nifty 19800 strike at our entry time i.e. 09 : 18.

  • Example 2 :-
    Assume entry timing 09:18
    ATM Strike at 09:18 is 20000
    We enter + and 1 as shown in the image below


    ATM Percentage

    Strike it selects is
    Strike = ATM + 1% of ATM
    Strike = 20000 + (1% of 20000)
    Strike = 20000 + 200
    Strike = 20200

So it will select the Nifty 20200 strike at our entry time i.e. 09 : 18.

Synthetic Future

This feature enables you to select your strike based on Synthetic Future.
We can select any type of strike like ATM, OTM, ITM etc based on Synthetic future. Synthetic Future is calculated as below :

Synthetic Future = Spot ATM Strike - Spot ATM PE + Spot ATM CE

Synthetic Future

Example : Let's assume we want to select an ATM strike based on Synthetic Future. We will select Synthetic Future and ATM from the dropdown under Select Strike Criteria as shown below.

Synthetic Future

Let's assume we have the following values:

  • Banknifty Spot = 45025
  • Spot ATM Strike = 45000
  • Spot ATM PE = 275
  • Spot ATM CE = 550

Synthetic Future = 45025 - 275 + 550 = 45300

Synthetic Future ATM = 45300

So it will select the 45300 strike at our entry time.

ATM Premium %

This feature enables you to select strikes based on the percentage of Premium of ATM Straddle.
For example ATM Straddle Premium (ATM CE + ATM PE) is 400 and you want to select an option whose premium is 30% of this ATM Straddle Premium then you can do so using this feature. It will select a strike whose premium is closest to 120 (30% of 400).

Synthetic Future

Example :

  • Nifty Spot = 20210
  • Spot ATM Strike = 20200
  • Spot ATM PE = 120
  • Spot ATM CE = 80
  • Straddle Premium = 120 + 80 = 200

If we select ATM Straddle Premium % and enter 20% as shown in the image below.

Synthetic Future

The Strike it will select is

Strike Premium = 20 % of ATM Straddle Premium Strike Premium = 20% of 200 Strike Premium = 40

So it will select a strike whose premium is Closest to 40.