Skip to navigation

CumulativeVariance

View as Markdown

The CumulativeVariance function calculates the variance of a column up to and including the current row value.

Syntax

CumulativeVariance([field])

Function argument:

fieldThe column to reference when calculating cumulative variance.

Cumulative functions depend on the order of the given column. If you change the sorting you will change the result.

Example

CumulativeVariance([Close Price])

A table contains the daily close price of a stock in 2016. Variance can be used to show the volatility of a stock, where a higher variance indicates higher risk. We can use the CumulativeVariance function to identify the change in variance over time.

Table with Day, Close Price, and Cumulative Variance columns for January 2016, where Cumulative Variance starts as null on 2016-01-04, peaks at 1.87 on 2016-01-19, and falls to 1.70 by 2016-01-28.