Vignettes are long form documentation commonly included in packages. This vignette gives an overview of the factorModel package and describes the other vignettes.
This vignette gives an overview of factor models and how this package helps build and test them.
The premise of a factor model is that a fund's (fund and ETF are used interchangeably) performance can be explained by one or more factors such as the market return. Factors might include the overall market return, value, quality, low volatility, and momentum to name a few.
Building a model involves identifying the factors to explain fund returns as well as defining how a fund will perform based on the performance of a factor. For example, if there are two factors in the model, the return of the market (mktcap) as measured by a broad index such as the S&P 500 and another that captures size (size) as measured by the return of small stocks (Russell 2000) minus large stocks (S&P 500), then the model for a fund will be $$Return_{fund} = \alpha + \beta_{mktcap}Return_{mktcap} + \beta_{size}Return_{size} + residual$$
Building a model involves the selection of factor and estimating the value of the coefficients (betas) of those factors for each fund. This package helps to do those and to evaluate the results.
get_monthly_returns
function helps with this.AddFactor
function helps with this.addFactor
function which is used to manipulate a set of factors. The RAFI factors have some high correlations. There are also other series we might want to add to the set of factors. The addFactor
function helps manipulate an original table of factor data (e.g. the RAFI data) into one we want to use to build models. Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.