View source: R/stat.factor.model.R
statistical.factor.model | R Documentation |
Fit a statistical factor model using Principal Component Analysis (PCA)
statistical.factor.model(R, k = 1, ...)
R |
xts of asset returns |
k |
number of factors to use |
... |
additional arguments passed to |
The statistical factor model is fitted using prcomp
. The factor
loadings, factor realizations, and residuals are computed and returned
given the number of factors used for the model.
#'
N x k matrix of factor loadings (i.e. betas)
m x k matrix of factor realizations
m x N matrix of model residuals representing idiosyncratic risk factors
Where N is the number of assets, k is the number of factors, and m is the number of observations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.