VAR
VAR
Summary
Rolling population variance of a real series over a given period. Measures dispersion of values around their mean. Higher values indicate greater dispersion; 0 means constant input.
Formula
, over the last = optInTimePeriod values (population, divides by ).
Notes
- Computes population variance (divides by the period), not the sample variance (n-1) used by some definitions.
- The deviation-count parameter is accepted but has no effect on the result.
Inputs
inReal— Source series
Outputs
outReal— Rolling population variance
Parameters
| Parameter | Type | Default | Accepted values | Description |
|---|---|---|---|---|
optInTimePeriod | integer | 5 | 1–100000 | Window length for the variance |
optInNbDev | real | 1 | any real | Deviation count accepted by the API but never used in the computation |
Properties
Numerical Stability: Start-Independent
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
Implementation
TA-Lib Definition: var.c · var.yaml
| Native | File |
|---|---|
| C | ta_VAR.c |
| Rust | var.rs |
| Java | Core_VAR.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Variance