In finance, beta measures a stock’s volatility with respect to the overall market. It is used in many areas of financial analysis and investment, for example in the calculation of the Weighted Average Cost of Capital, in the Capital Asset Pricing Model and market-neutral trading. In this post, we present a concrete example of calculating the beta of Facebook, a technology stock. As for the market benchmark, we utilize SPY.
http://tech.harbourfronts.com/trading/stock-beta-calculate-stock-beta-python/