Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Moving Average Crossover Rolling Optimization

This algorithm trades off of moving average crossovers, but every 30 minutes, it calculates what would have been the best short and large averages for the past 200 minutes, then switches the live trading algorithm to the new parameters.

My theory is that for individual stocks, you might have:
--big orders broken up into a bunch of little orders every few minutes,
--people or algos only trading a stock when some other condition is going on
--a whole bunch of other criteria that may cause technical indicators to work for a day or two, and then fall off when an underlying cause disappears

If i can improve this algorithm until it's relatively profitable, I'd like to update it to look at a bunch of stocks, and to use the same rolling optimization concept to add in some different technical indicators.

But before I go too far down this path, is anyone working on algorithms that are remotely similar? I'm new to python and trading, and I'd love to collaborate with someone. Also, I feel like I did a lot of stuff super inefficiently. Is there any other way to come up with optimized parameters aside from doing a bunch of nested loops?

Any other feedback would be greatly appreciated!