riskDecomp.ffm {facmodCS}R Documentation

Decompose Risk into individual factor contributions

Description

Compute the factor contributions to Sd, VaR and ES of returns based on Euler's theorem, given the fitted factor model.

Usage

riskDecomp.ffm(
  object,
  risk,
  weights = NULL,
  portDecomp = TRUE,
  factor.cov,
  p = 0.05,
  type = c("np", "normal"),
  invert = FALSE,
  ...
)

Arguments

object

fit object of class tsfm, or ffm.

risk

one of "Sd" (Standard Deviation) or "VaR" (Value at Risk) or "ES" (Expected Shortfall)

weights

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.

portDecomp

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

factor.cov

optional user specified factor covariance matrix with named columns; defaults to the sample covariance matrix.

p

tail probability for calculation. Default is 0.05.

type

one of "np" (non-parametric) or "normal" for calculating Es. Default is "np".

invert

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

Value

A list containing

portES

factor model ES of portfolio returns.

mES

length-(K + 1) vector of marginal contributions to Es.

cES

length-(K + 1) vector of component contributions to Es.

pcES

length-(K + 1) vector of percentage component contributions to Es.

Where, K is the number of factors.

Author(s)

Eric Zivot, Yi-An Chen, Sangeetha Srinivasan, Lingjie Yi and Avinash Acharya

See Also

fitFfm for the different factor model fitting functions.

portSdDecomp for factor model Sd decomposition. portVaRDecomp for factor model VaR decomposition.


[Package facmodCS version 1.0 Index]