Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Idiosyncratic volatility (based on Fama-French 3 factors)

Hello, guys. I need to calculate idiosyncratic volatility based on Fama-French 3 factors. That is, I have to calculate the standard deviation of the residuals from regressing the stock’s daily excess returns on Fama-French’s three factors. Accounting to what I found, excess returns are the return earned by a stock (or portfolio of stocks) and the risk-free rate, which is usually estimated using the most recent short-term government treasury bill. Can somebody please help me with the excess return part? How should I obtain the T-Bill data on Quantopian and include it to my algo?