Hello,
I am exploring the strategies and AFLs to find out different ways to improve.
I was curious if there's any way to add a filter at the backtest level so that the trades will not happen if a particular condition is met.
Just like, if someone just trades on SP500 and puts a condition that sell everything when it closes below EMA 50D at the month end and buy again when it closes above EMA 50D.
The same way if the backtest equity curve closes below its EMA 50D, it will sell everything but keep considering the stocks (but not trade) so that the equity curve goes above EMA 50D at month end, it will buy and keep going.
Can any one please provide any pointers here?
Thanks in advance !!
Thanks for the reference, in the article, it is referencing the GSPC, but how would reference the equity curve created by the backtest itself? Basically my portfolio is my index and I want to create a filter (like I mentioned for SP500) during the backtest itself.