apaStatFactors.PortfolioRisks(AssetReturns, nFactors, AssetWeights, IsCorrelElseCovar, DoForceUnitComponentVariances)
Excel
=apaStatFactors.PortfolioRisks(AssetReturns, nFactors, AssetWeights, IsCorrelElseCovar, DoForceUnitComponentVariances)Result
Returns the total portfolio variance, the systematic variance based on a statistical factor model and the residual variance of a portfolio with given constituent weights.
Syntax
AssetReturns: r x c matrix containing the asset returns. Each column contains an asset return time series.
nFactors: number of statistical factors
AssetWeights: 1 x c vector of constituent weights
IsCorrelElseCovar: TRUE to use the correlation matrix, FALSE to use the covariance matrix
DoForceUnitComponentVariances: TRUE to scale the factors (principal components) to unit variance
Remarks
Uses population covariances (denominator n).
