Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Trying to Understand Trendline CustomFactor

Can anyone explain to me the math behind how this Trend Line Custom Factor works? I attached a notebook where I was trying to convince myself of the math, but I still don't quite understand
1) Why the X and Y matrices are made the way they are
2) Why dividing the dot product of X and Y by the variance is done

Thanks.

1 response

Looks like the answer to my question is contained in the following post:
https://www.quantopian.com/posts/building-a-better-beta