risk: Second centered moments

Description Usage Arguments Value References Examples

Description

These functions relate to the computation of second centered moments (M2()), the portfolio variance risk (pm2() and PortRisk()), the partial derivatives (dm2() and PortRiskDeriv()) and the risk contributions of the assets (cm2() and PortRiskContrib()).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
M2(r)

pm2(r, w)

dm2(r, w)

cm2(r, w, percentage = TRUE)

PortRisk(r, w)

PortRiskDeriv(r, w)

PortRiskContrib(r, w, percentage = TRUE)

Arguments

r

matrix, a (T x N) array of returns.

w

numeric, a (N x 1) vector of portfolio weights.

percentage

logical, whether risk contributions are expressed as percentages.

Value

numeric

References

Boudt, K. and Peterson, B. and Croux, C. (2008/09), Estimation and decomposition of downside risk for portfolios with non-normal returns, The Journal of Risk, 11(2), Winter 2008/09, 79–103.

Jondeau, E. and Rockinger, M. (2006), Optimal portfolio allocation under higher moments, European Financial Management, 12(1), 29–55.

Examples

1
2
3
4
5
6
7
8
data(MultiAsset)
MA <- as.timeSeries(MultiAsset[, 1:4])
r <- na.omit(diff(log(MA)) * 100)
N <- ncol(r)
w <- rep(1 / N, N) ## equal weight allocation
M2(r)
pm2(r, w)
dm2(r, w)

bpfaff/mcrp documentation built on May 13, 2019, 2:24 a.m.