Previous topic

fynance.features.metrics.calmar

Next topic

fynance.features.metrics.drawdown

fynance.features.metrics.diversified_ratio

fynance.features.metrics.diversified_ratio(X, W=None, std_method='std', axis=0)

Compute diversification ratio of a portfolio.

Parameters:
X : np.ndarray[ndim=2, dtype=np.float64] of shape (T, N)

Portfolio matrix of N assets and T time periods, each column correspond to one series of prices.

W : np.array[ndim=1 or 2, dtype=np.float64] of size N, optional

Vector of weights, default is None it means it will equaly weighted.

std_method : str, optional /!Not yet implemented /! Method to compute variance vector and covariance matrix.
axis : {0, 1}, optional

Axis along wich the computation is done. Default is 0.

Returns:
np.float64

Value of diversification ratio of the portfolio.

Notes

Diversification ratio, denoted D, is defined as the ratio of the portfolio’s weighted average volatility to its overll volatility, developed by Choueifaty and Coignard [4].

\[D(P) = \frac{P' \Sigma}{\sqrt{P'VP}}\]

With \(\Sigma\) vector of asset volatilities, \(P\) vector of weights of asset of portfolio, and \(V\) matrix of variance-covariance of these assets.

References

[4]Choueifaty, Y., and Coignard, Y., 2008, Toward Maximum Diversification.