I have been working here on an algorithm that tries to combine the mean reversal strategy while also accounting for momentum. I am getting an error on line 77 so it must have to do with that line and my GenerateMomentumList function. The code runs perfectly without the momentum piece. I am currently an undergraduate student trying to learn all of this by doing it. If anyone has any advice or could help fix my code in anyway it would be greatly appreciated.