MultivariateRisk {PerformanceAnalytics} | R Documentation |
Functions to calculate Guassian and modified VaR and Expected Shortfall.
Note that these functions generally expect the moments to be passed in directly; this was done to eliminate repetitive calculations in a portfolio optimization context. We'll write "friendly" wrapper functions that take the return vector when we have time.
GVaR.MM (w, mu, sigma, p) mVaR.MM(w, mu, sigma, M3, M4, p) SR.mVaR.MM (w, mu, sigma, M3, M4, p) GES.MM (w, mu, sigma, p) mES.MM(w, mu, sigma, M3, M4, p) SR.mES.MM (w, mu, sigma, M3, M4, p) SR.GVaR.MM (w, mu, sigma, p) SR.GES.MM (w, mu, sigma, p) SR.StdDev.MM (w, mu, sigma)
w |
a vector of weights to be applied to each asset in trhe joint distribution |
mu |
mean or first centered moment of the distribution, normalley provided by Return.centered |
sigma |
variance or second centered moment of the distribution |
M3 |
The third mathematical moment of the joint distribution, provided by M3.MM |
M4 |
The fourth mathematical moment of the joint distribution, provided by M4.MM |
p |
confidence level for calculation, default p=.99 |
These functions were first utilized in Boudt, Peterson, and Croux (2008), and have been subsequently used in our other research.
~~ Additional Details will be added to documentation as soon as we have time to write them. ~~
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
...
....
~~further notes~~
~Make other sections like Warning with section{Warning }{....} ~
Kris Boudt, Brian Peterson
Boudt, Kris, Brian G. Peterson, and Christophe Croux. 2008. Estimation and Decomposition of Downside Risk for Portfolios with Non-Normal Returns. Journal of Risk. Winter.
Martellini, Lionel, and Volker Ziemann. 2007. Improved Forecasts of Higher-Order Comoments and Implications for Portfolio Selection. EDHEC Risk and Asset Management Research Centre working paper.
Ranaldo, Angelo, and Laurent Favre Sr. 2005. How to Price Hedge Funds: From Two- to Four-Moment CAPM. SSRN eLibrary.
Scott, Robert C., and Philip A. Horvath. 1980. On the Direction of Preference for Moments of Higher Order than the Variance. Journal of Finance 35(4):915-919.
MultivariateMoments
, centeredmoment
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as function (w, mu, sigma, M3, M4, p) { skew = skewness.MM(w, sigma, M3) exkurt = kurtosis.MM(w, sigma, M4) - 3 z = qnorm(1 - p) h = z + (1/6) * (z^2 - 1) * skew h = h + (1/24) * (z^3 - 3 * z) * exkurt - (1/36) * (2 * z^3 - 5 * z) * skew^2 return(-mean.MM(w, mu) - h * StdDev.MM(w, sigma)) }