Question to those that are proficient with Pandas data frames:
The attached notebook shows my atrocious way of creating a rolling linear regression of SPY. I know there has to be a better and more efficient way as looping through rows is rarely the best solution. I would really appreciate if anyone could map a function to data['lr'] that would create the same data frame (or another method). I'll continue to try and answer my own question and will post if I find a way.