Cumulative Window Functions (cumfunctions)
The cumulative window starts from a specified data/time point and aggregates data over consecutive data points or time intervals. DolphinDB provides the cumulative window functions (cumfunctions) for cases involving cumulative windows.
Introduction

higherorder function accumulate:
accumulate(func, X, [init])
If init is specified, the result for the first window is
init + X[0]
. 
Syntax templates for the cumfunctions:
cumfunc(X) cumfunc(X, Y)
Parameters:
X (Y) is a scalar/vector/matrix/table/tuple with equallength vectors.
List of Functions
Windowing Logic
The cumfunction performs a cumulative calculation on each element, then returns a vector of the same length (or matrix of the same size) as the input.
The following example illustrates the calculation rules:
X = 1 1 2 3 4 5 NULL 8 9 1 3
cumsum(X)
// output
[1, 2, 4, 7, 11, 16, 16, 24, 33, 34, 37]