Statistic functions

Standard Deviation

Rolling population standard deviation of closing prices with a configurable multiplier.

Engine
TA-Lib
Function
STDDEV
Input series
close
Outputs
1

How it works

STDDEV calculates rolling population variance over the close series, takes its square root, and multiplies the result by nbdev; non-positive variance outputs zero.

Use case

Use Standard Deviation as a rolling dispersion and volatility feature or as an input to deviation-based bands and thresholds.

Parameters

ParameterTypeDefaultBounds or optionsDescription
Time Periodinteger52…100000Number of closing-price observations in each standard-deviation window.
Deviation Multipliernumber1-3e+37…3e+37Multiplier applied to the calculated population standard deviation.

Outputs

OutputTypeDescription
Standard DeviationnumberScaled rolling population standard deviation for the bar.

Reading the result

Rolling standard deviation describes dispersion of the input values inside the configured window. It remains in source-price units after applying the configured multiplier, so its magnitude grows with both variability and nominal price scale.

It measures dispersion around a local mean, not market direction and not necessarily the same concept as volatility calculated from returns.

Common mistakes

  1. Comparing price-level standard deviation across differently priced assets.
  2. Confusing dispersion of closes with standard deviation of returns.
  3. Interpreting a high value as bullish or bearish.
  4. Forgetting that a multiplier rescales the output without changing the underlying dispersion pattern.

DataCat workflow notes

For cross-symbol analysis, consider a documented downstream normalization such as division by a local price baseline. Keep the raw output available for audit and handle near-zero denominators explicitly.

Resources

Search documentation

Search across 46 documentation pages.