skfolio.uncertainty_set.UncertaintySet#

class skfolio.uncertainty_set.UncertaintySet(k, sigma)[source]#

Ellipsoidal uncertainty set dataclass.

An ellipsoidal uncertainty set is defined by its size \(\kappa\) and shape \(S\). Ellipsoidal uncertainty set can be used with both expected returns and covariance:

Expected returns ellipsoidal uncertainty set:

\[U_{\mu}=\left\{\mu\,|\left(\mu-\hat{\mu}\right)S^{-1}\left(\mu-\hat{\mu}\right)^{T}\leq\kappa^{2}\right\}\]

Covariance ellipsoidal uncertainty set:

\[U_{\Sigma}=\left\{\Sigma\,|\left(\text{vec}(\Sigma)-\text{vec}(\hat{\Sigma})\right)S^{-1}\left(\text{vec}(\Sigma)-\text{vec}(\hat{\Sigma})\right)^{T}\leq k^{2}\,,\,\Sigma\succeq 0\right\}\]
Attributes:
kfloat

Size of the ellipsoid \(\kappa\) that defines the confidence region

sigmandarray of shape (n_assets)

Shape of the ellipsoid \(S\)