This chapter is devoted to estimating various factor models in Python. The idea behind these models is to explain the excess returns (over the risk-free rate) of a certain portfolio or asset using one or more factors (features). These risk factors can be considered a tool for understanding the cross-section of (expected) returns.
In general, factor models can be used to identify interesting assets that can be added to the investment portfolio, which— in turn—should lead to better performing portfolios.
By the end of this chapter, we will have constructed some of the most popular factor models. We will start with the simplest, yet very popular, one-factor model (the Capital Asset Pricing Model, or CAPM) and then explain how to estimate more advanced three-, four-, and five-factor models. We will also cover the interpretation of what these factors...