Compute the factor contributions to Sd, VaR and ES of returns based on Euler's theorem, given the fitted factor model.
riskDecomp.ffm(
object,
risk,
weights = NULL,
portDecomp = TRUE,
factor.cov,
p = 0.05,
type = c("np", "normal"),
invert = FALSE,
...
)A list containing
factor model ES of portfolio returns.
length-(K + 1) vector of marginal contributions to Es.
length-(K + 1) vector of component contributions to Es.
length-(K + 1) vector of percentage component contributions to Es.
Where, K is the number of factors.
fit object of class tsfm, or ffm.
one of "Sd" (Standard Deviation) or "VaR" (Value at Risk) or "ES" (Expected Shortfall)
a vector of weights of the assets in the portfolio, names of the vector should match with asset names. Default is NULL, in which case an equal weights will be used.
logical. If True the decomposition of risk is done for the portfolio based on the weights.
Else, the decomposition of risk is done for each asset. Default is TRUE
optional user specified factor covariance matrix with named columns; defaults to the sample covariance matrix.
tail probability for calculation. Default is 0.05.
one of "np" (non-parametric) or "normal" for calculating Es. Default is "np".
a logical variable to choose if change ES to positive number, default is False
other optional arguments passed to quantile and
optional arguments passed to cov
Eric Zivot, Yi-An Chen, Sangeetha Srinivasan, Lingjie Yi and Avinash Acharya
fitFfm
for the different factor model fitting functions.
portSdDecomp for factor model Sd decomposition.
portVaRDecomp for factor model VaR decomposition.