Hi, I am just getting started with quantopian. I decided to create my own moving average algorithm similar to the example. I wanted to create an algorithm that buys stocks where the 20 day moving average is greater than the 50 day moving average and sells the stock if the 20 day moving average is less than the 50 day moving average. I have attached the algorithm with the backtest. There seems to be a lot of volatility. Any tips on what I'm doing wrong or how to improve?
Thanks in advance!