Hi Anant,
See the reply to your queries:
I am trying to back test a strategy, where my exit criteria is if the stock falls below the low of its previous 4 trading days from the day when the stock was bought. How can I set up this?
“From the day stock was bought” is not a unique timestamp because same stock can be bought multiple times. For example you buy RELIANCE on 1st Jan 2025 and on next rebalancing, if RELIANCE still meets your exit criteria, depending on position sizing (weights), it is possible that the strategy could top up more of reliance.
The best way to achieve what you are looking for is to build this condition in your entry model itself and set it up for weekly rebalancing. So if the stock does not qualify the condition 5 days after it was bought in the last rebalancing, it will be sold automatically on next rebalancing. You can add this condition with “AND” after your main condition using Period Low function and offset of 1. See screenshot:

Suppose your rebalancing is on Monday, the stocks will be bought at market open on Tuesday. On next Monday close, if the stock closed below lowest low of Tuesday to Friday, the stock will be sold. This will be the behaviour in back testing. To replicate this behaviour in paper trading, do set the signal generation flag to “After Market Close”.
I am trying to back test a strategy, where my exit criteria is if the stock falls below the low of its previous 4 trading days from the day when the stock was bought. How can I set up this?
We have not allowed daily rebalancing due to extreme compute loads on our server on back testing. However, we are working on introducing on daily entries with limited back testing period and should introduce this by end of March.
One more thing- can we clean out the ASM/ GSM/ ESM framework stocks while back testing?
You can easily achieve this by adding the metric “Is not in surveillance” after your main entry condition. See screenshot. Similarly, you can also add a condition that the stock should not be an SME stock using “Is not SME stock”
