skfolio.measures.semi_deviation#

skfolio.measures.semi_deviation(returns, min_acceptable_return=None)[source]#

Compute the semi standard-deviation (semi-deviation) (square root of the second lower partial moment).

Parameters:
returnsndarray of shape (n_observations,)

Vector of returns.

min_acceptable_returnfloat, optional

Minimum acceptable return. It is the return target to distinguish “downside” and “upside” returns. The default (None) is to use the returns mean.

Returns:
valuefloat

Semi-standard-deviation.