Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Factor Regression

Could someone please help me proof read this code. If this is the right approach to calculate the factor return and checking how it is changing daily. Newbie here, trying to learn. I am not sure if I am doing everything correctly here.

I am not able to add a constant to regression. I just dont know how to. Is it really required to add a constant? Will it change the result.

Would be appreciated if someone can help modify this on how I can track R-Square, Standard Error of the Beta together with Beta.