Switching between watchlists in Rotational Backtesting Mode

Hi, does anyone know the AFL for switching between watchlists in one single Rotaional backtest?

For example, I have 2 watchlists, namely “Watchlist_A” and “Watchlist_Z”. I’d like to do the backtest from year 2012-2016 but during 2012-2013 would like to trade on symbols from Watchlist_A, while from 2014-2016 switch to trade on symbols from Watchlist_Z.

In this case, Watchlist_Z contains newly added symbols from Watchlist_A while there are some deletion of symbols from Watchlist_A. This means that at the beginning of 2014, I might still have some open positions from Watchlist_A.

Can it be done?

Thank you

You can’t “switch” between watch lists, but you can run your back test against both Watchlist_A and Watchlist_Z (or a new watch list that combines the symbols from both) and then test for membership using InWatchListName(“Watchlist_A”) or InWatchListName(“Watchlist_Z”) as part of your entry criteria.



Thank you for the reply Matt.

Hi Matt

Could you expand a little about your comment that you could run the backtest against both Watchlist_A and Watchlist_Z. Certainly you could do that if you ran separate backtest runs, one using A and the other using Z. Is that what you meant or would it be possible, perhaps with custom backtest code to have just one backtest run that covers both A and Z separately then combines the results with a single performance chart and combined trading statistics.

Just thinking it through makes my hair hurt.

Best wishes


I'm saying that if you have sufficient skill to create a low-level CBT which executes a "normal" rotational test, then it is only moderately more difficult to write a CBT to draw symbols from two different pools (watch lists) and do two rotations in parallel, i.e. a single back test with a single set of results.

@kaspepe @mradtke a possible partial solution from this forum,