This template algo is broken and unfortunately i'm only 6 months into my coding "career" and unable to posses the intellect to fix it. I was trying to use it to teach myself how to fill in the "guts" of my new template algo i made using the new "create algo" template feature. 

https://github.com/QuantConnect/Lean/blob/master/Algorithm.Framework/Alphas/PearsonCorrelationPairsTradingAlphaModel.py