Hello Market Tech,
Nothing fancy to pick the securities. As I said above:
Please note that the backtest is biased by the selection of some high-performance securities (i.e. intentional look-ahead bias).
As I recall, I did a Google search for the top Nasdaq 100 stocks of 2013 & 2014. I found that a couple of them did not trade all the way into 2015, so I just replaced them with a couple big tech names off the top of my head.
At this point, the algo only handles long positions, so I figured why not work with a portfolio that has some umph.
Besides the look-ahead bias, there may be a risk of over-fitting here, too. There are enough knobs to turn that with high-performing stocks, a little tweak here and there could end up making a big difference in returns. So, it would be reasonable to wonder if the algo is working at all. I've played around with a very different set of securities, and the performance is ugly:
context.stocks = [sid(19662), # XLY Consumer Discrectionary SPDR Fund
sid(19656), # XLF Financial SPDR Fund
sid(19658), # XLK Technology SPDR Fund
sid(19655), # XLE Energy SPDR Fund
sid(19661), # XLV Health Care SPRD Fund
sid(19657), # XLI Industrial SPDR Fund
sid(19659), # XLP Consumer Staples SPDR Fund
sid(19654), # XLB Materials SPDR Fund
sid(19660)] # XLU Utilities SPRD Fund