skfolio.measures.gini_mean_difference#

skfolio.measures.gini_mean_difference(returns)[source]#

Compute the Gini mean difference (GMD).

The GMD is the expected absolute difference between two realisations. The GMD is a superior measure of variability for non-normal distribution than the variance. It can be used to form necessary conditions for second-degree stochastic dominance, while the variance cannot.

Parameters:
returnsndarray of shape (n_observations,)

Vector of returns.

Returns:
valuefloat

Gini mean difference.