Estimates the VaR of a multi position portfolio by principal components analysis, using chosen number of principal components and a specified confidence level or range of confidence levels.
Ra: Matrix return data set where each row is interpreted as a set of daily observations, and each column as the returns to each position in a portfolio
position.data: Position-size vector, giving amount invested in each position
number.of.principal.components: Chosen number of principal components
cl: Chosen confidence level
Returns
VaR
Examples
# Computes PCA VaR Ra <- matrix(rnorm(4*6),4,6) position.data <- rnorm(6) PCAVaR(Ra, position.data,2,.95)