STDDEV
STDDEV
Summary
Rolling standard deviation of a series over a window, scaled by a deviations multiplier. Delegates to VAR, then takes the square root.
Formula
, where (population variance, timePeriod)
Notes
- Uses population variance (divides by the period, not period minus one), so results differ slightly from the sample standard deviation used by some tools.
Inputs
inReal— Series to measure dispersion of
Outputs
outReal— Standard deviation at each bar, scaled by optInNbDev
Parameters
| Parameter | Type | Default | Accepted values | Description |
|---|---|---|---|---|
optInTimePeriod | integer | 5 | 2–100000 | Window length |
optInNbDev | real | 1 | any real | Multiplier applied to the standard deviation |
Properties
Numerical Stability: Start-Independent
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
Implementation
TA-Lib Definition: stddev.c · stddev.yaml
| Native | File |
|---|---|
| C | ta_STDDEV.c |
| Rust | stddev.rs |
| Java | Core_STDDEV.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Standard Deviation, SD, sigma