divRatio: Compute the Diversification Ratio for a portfolio.

Description Usage Arguments Value See Also Examples

View source: R/divRatio.R

Description

This function computes the Diversification Ratio (DR) for a portfolio, given a weight vector, w, a set of asset returns, R, and a covariance matrix, sigma. This ratio is a measure of how well diversified a portoflio is. The square of this number is a proxy for the number of unique sources of variation exist in a portfolio. The higher the number, the more diversified the portfolio.

Usage

1
divRatio(w = NULL, R, sigma, scale = 12)

Arguments

w

a vector of weights.

R

an xts object or matrix of asset returns.

sigma

a covariance matrix for R.

scale

the annualization factor for R. Default = 1. This parameter is passed through to wtdAvgVol() and portfolioVol().

Value

the Diversification Ratio (DR) for the portfolio.

See Also

wtdAvgVol, portfolioVol

Examples

1
2
3
4
5
dts <- seq(Sys.Date()-199, Sys.Date(), 1)
returns <- matrix(rnorm(1000),ncol = 5) / 100
ret.xts <- xts(returns, dts)
cm <- cov(ret.xts)
divRatio(R = ret.xts, sigma = cm)

gtog/dMisc documentation built on May 17, 2019, 8:57 a.m.