Check your backtest.

By Priyansh, project lead. Updated .

We are building TradeOnLogic to test options strategies with past data. This guide explains the planned backtest steps. We have not announced public access or prices. We must check the features and data coverage before release.

Learn the technical terms.

1. Select the market and date range.

Select an index and a past date range. Check that data covers each contract and trading session you need. Use the same rules across the selected range. Check different market periods before you judge the result.

A recorded price alone does not make a contract suitable for simulation. Check the contract name and the lot size for that date. Also check the trading calendar and settlement details.

2. Define the entry time and expiry.

Set the entry time and the final exit time. Select an expiry with recorded data for each leg. Check the time left until expiry. Different expiries can give different results with the same rules.

Use only information available at the selected time. The planned replay shows completed candles. Entry orders use the opening price of the next minute that the simulation allows. This price is a substitute for an actual fill price.

3. Define each leg and strike.

Select a call or put. Choose whether to buy or sell, and set the number of whole lots. Record the strike and expiry for each leg. The planned replay uses one clock for all legs and indices.

You can set an exact strike. A selection rule can also use the distance from the index value or the option premium. Check which methods the release supports. Record the rule so that you can explain why it chose each contract.

4. Define risk rules for each leg.

A stop loss (SL) requests an exit when a loss reaches a set limit. A target requests an exit when a profit reaches a set level. Set each limit and its unit before the test. Check whether the rule uses an option price, a percentage, or a money amount.

A trailing stop moves its exit level after the price moves in your favor. Set the price movement needed to start and adjust it. Re-entry means you open a position again after an exit. Set the trigger, maximum attempts, and last allowed entry time.

5. Define risk rules for the strategy.

Strategy rules use the combined result of all included legs. Set a strategy stop loss, target, and trailing stop where the product supports them. State whether a strategy exit closes all open legs. State whether strategy re-entry opens all legs again or only selected legs.

Check how leg rules and strategy rules work together. A rule for one leg can change the risk of the remaining position. Record which rule acts first when several rules trigger at the same time.

6. Check fills, costs, and data gaps.

Set the assumed costs before you compare results. Include the fees, taxes, and slippage that apply. List any costs that the simulation leaves out. A gross result excludes costs. A net result subtracts the costs included in the test.

Missing prices and repeated old prices do not guarantee a fill. Check how each data gap affects entries, exits, and position values. A price can pass a stop level between price records. The stop level does not guarantee the simulated exit price.

A candle can reach both a stop loss and a target in one minute. The planned simulation processes the event with the worse result first. It marks cases where the data cannot show which event happened first. Check this assumption when you compare results.

7. Review drawdown and the trade journal.

Check the result across the full date range. Check drawdown, each trade, and periods with missing data. A final profit can hide large falls in value during the test.

Use the trade journal to check entry times, exit times, contracts, quantities, prices, and exit reasons. Check each leg and the combined strategy result. Keep closed trade results separate from MTM estimates for open positions. Check the assumed costs and missing prices.

8. Check positions held until expiry.

If you hold a position until expiry, use an exchange calendar that the simulation supports. Use official final settlement data that has been checked. Missing settlement data blocks a final expiry result. Never treat missing values as zero payoff.

An expiry payoff shows the possible result at different final index values. It does not predict the final index value. Check the settlement rules before you judge a position held until expiry.

Know the current limits.

Use official contract information.

Check the exchange rules for the date you test. Current contract rules do not prove the rules on past dates.

NSE contract specifications explain the current NSE contract terms. This guide does not replace exchange rules.

Back to TradeOnLogic