<a id="skfolio-measures-standard-deviation"></a>

# skfolio.measures.standard_deviation

<a id="skfolio.measures.standard_deviation"></a>

### skfolio.measures.standard_deviation(returns, sample_weight=None, biased=False)

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

* **Parameters:**
  **returns** *ndarray of shape (n_observations,) or (n_observations, n_assets)*
  : Array of return values.

  **biased** *bool, default=False*
  : If False (default), computes the sample standard-deviation (unbiased);
    otherwise, computes the population standard-deviation (biased).

  **sample_weight** *ndarray of shape (n_observations,), optional*
  : Sample weights for each observation. If None, equal weights are assumed.
* **Returns:**
  **value** *float or ndarray of shape (n_assets,)*
  : Standard-deviation.
    If `returns` is a 1D-array, the result is a float.
    If `returns` is a 2D-array, the result is a ndarray of shape (n_assets,).

### Notes

NaN handling:
- Unweighted: NaNs are ignored; all-NaN inputs yield NaN.
- Weighted: NaNs propagate.

