One of the big issues of ML algo design is run-time optimization - usually at the cost of losing performance. This time I tried to simply the Perceptron Algo I posted earlier by using only the result after the last iteration, and as suggested by Fawce, tried set_universe() method to reduce bias. Also thanks to Grant, me censix, and Chris for pointing out a few typos and limitations of batch_transform, I reduced some excessive code here.
But it still a long time to backtest - and that's why I only included test results since the last quarter of 2012. Meanwhile, using set_universe() makes perceptron returns more volatile, as max drawdown is dramatically increased. But overall performance remains decent, and I'm looking forward to more suggestions on how to improve this idea. Thanks in advance!
NOTE: Please refer to the next backtest for a better design. This algorithm has a flaw in that when indicator is negative, I set it as buying (negative sign cancelled)