Skip to main content

DTE Filter

Days To Expiry(D.T.E.) Filter

Have you ever considered backtesting your strategy only on the expiry day? Have you ever thought about how your strategy performs as the expiry day approaches?

At AlgoTest, we understand the importance of customizing your strategy to maximize results.

Our convenient DTE filter allows you to tailor your approach based on the days remaining until expiry. This feature is designed to optimize and fine-tune your strategy according to the specific distance from the expiry day of the instrument.

What is DTE?

DTE stands for "days to expiry." In simple terms, you can adjust your strategy based on the number of days remaining until the contract expires.

For example, if you want to backtest a strategy only on the day of expiry, the distance from expiry is 0 days. This is commonly referred to as "0 DTE." This approach will display the results specifically for the day of expiry for the particular contract.

Lets take an example of Nifty and assume Thursday is the expiry. How are the days selected based on the distance from the expiry?

DTENo. of Days from Expiry
Day to Expiry = 0Expiry day, i.e., Thursday
Day to Expiry = 11 day before expiry, i.e., Wednesday
Day to Expiry = 22 days before expiry, i.e., Tuesday
Day to Expiry = 33 days before expiry i.e., Monday
Day to Expiry = 44 days before expiry i.e., Sunday
Day to Expiry = 55 days before expiry i.e., Saturday
Day to Expiry = 66 days before expiry i.e., Friday

How to Use the DTE Filter

In Strategy BackTest

  • To utilize this feature, begin by creating and backtesting your strategy. Click the "Start Backtest" button to get started...

  • To proceed, please scroll down and click on the "DTE" button as depicted in the image below.

  • Now you can filter the strategy results based on the selected days' distance from expiry. This will help you focus on specific days according to your preferences.

  • For example, if you want to filter the strategy only for the expiry day and 1 day before expiry, then you may select 0 and 1 in DTE as shown in the image below.

In Portfolio BackTest

  • Before using the DTE filter in the Portfolio section, make sure to visit the portfolio section and backtest your portfolio.

  • You can find the DTE feature at the top of this page. In the image below, you can see how to enable or disable this feature.

  • You can also individually use the DTE feature on each strategy in the portfolio.