I'm in the process of learning the Quantopian backtesting system and have studied all of the sample algorithms in the help area though I am far from being proficient. Here's what I've missed despite looking a the multiple securities and set universe samples. Let's say I have an algo to buy (or sell) a security under a specified condition. It's easy to test that on 1 security or to build a portfolio of securities (I think). I'd like something a bit different. I'd like to run the algorithm on every security one at a time and analyze the results. That is I want to test 1 algo on 500 (or more) stocks individually. What was did the average or median return v a buy and hold? What's the batting average? Information ratio etc. Is there a way to do this more massive testing?
To add to this, but to put it in a different dimension, let me add the following. Let's say I have an algo that depends on 2 parameters such as a window length (20 day) and a threshold (3% e.g., buy if 3% above a moving average). If I want to test the algo varying both the window length and the threshold so that I can examine the results, is there a way to loop through the backtests recording the results?