TuringTrader showcase algorithms

Status
Not open for further replies.
I'm not arguing for or against S&P 500 as an investable universe, but in a backtest you need to have a rolling set of constituents that are valid for that particular date, not just valid for the current date.

Hi JHarmon,

As said before TuringTrader *does* work with a rolling set of constituents, and the algorithm uses that feature. As an example, MON no longer exists, and will drop out of the simulation at some point. Similarly, FB didn't exist at the start of the situation, and is added on the fly. This all happens in line 313 when determining activeInstruments.

With this feature, the survivorship bias can be fixed on the data side and does not necessarily require more or different code. Of course it could also be solved by adding some additional properties with date properties to the _tradingInstruments structure, which can then be evaluated when determining the list activeInstruments in line 313.

Your point is well taken, and I will make the latter change in a future release.

Cheers, Felix
 
Status
Not open for further replies.
Back
Top