@cumprod |

Cumulative products of a series or of the elements of a matrix.

• Compute the cumulative product of the values in the series x from the start of the workfile or sample s, up to the current observation:

Syntax: @cumprod(x[, s])

x: series, matrix, vector

s: (optional) sample string or object

Return: series, matrix, vector

• Compute the cumulative product of the elements of the matrix in vec order.

Syntax: @cumprod(m)

m: matrix, vector

Return: matrix, vector

This function is panel aware.

Note that this function is prone to numeric overflow.

Examples

show @cumprod(x)

produces a linked series whose elements are the cumulative products of the elements in x.

Cross-references

For the backward variant of this function for series, see
@cumbprod.