VaR.Marginal {PerformanceAnalytics}R Documentation

Calculate the Marginal VaR of each element of a portfolio

Description

Marginal VaR is the difference between the VaR of the portfolio without the asset in question and the entire portfolio. This function calculates Marginal VaR for all instruments in the portfolio.

Usage

VaR.Marginal(R, p = 0.99, modified = TRUE, weightingvector=NULL)

Arguments

R a vector, matrix, data frame, timeSeries or zoo object of asset returns or the components
p confidence level for calculation, default p=.99
modified TRUE/FALSE whether to use Cornish-Fisher VaR
weightingvector vector of weights for each element in the portfolio

Value

matrix of Marginal VaRs

Note

Different papers call this different things. In the Denton and Jayaraman paper referenced here, this calculation is called Incremental VaR. We have chosen the more common usage of calling this difference in VaR's in portfolios without the instrument and with the instrument as the “difference at the Margin”, thus the name Marginal VaR. This is incredibly confusing, and hasn't been resolved in the literature at this time.

Author(s)

Brian G. Peterson

References

Denton M. and Jayaraman, J.D. Incremental, Marginal, and Component VaR. Sunguard. 2004.

See Also

VaR.CornishFisher

Examples

    data(edhec)
    # construct a weighting vector for an equally weighted portfolio
    assets=dim(edhec)[2]
    eqweight=t(rep(1/assets, assets))
    VaR.Marginal(R=edhec,p=0.99,weightingvector=eqweight)

[Package PerformanceAnalytics version 0.9.7 Index]