Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

statistical.factor.model

Statistical Factor Model


Description

Fit a statistical factor model using Principal Component Analysis (PCA)

Usage

statistical.factor.model(R, k = 1, ...)

Arguments

R

xts of asset returns

k

number of factors to use

...

additional arguments passed to prcomp

Details

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.

Value

#'

  • factor_loadings N x k matrix of factor loadings (i.e. betas)

  • factor_realizations m x k matrix of factor realizations

  • residuals 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.


PortfolioAnalytics

Portfolio Analysis, Including Numerical Methods for Optimization of Portfolios

v1.1.0
GPL-2 | GPL-3
Authors
Brian G. Peterson [cre, aut, cph], Peter Carl [aut, cph], Kris Boudt [ctb, cph], Ross Bennett [ctb, cph], Hezky Varon [ctb], Guy Yollin [ctb], R. Douglas Martin [ctb]
Initial release
2018-05-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.