Cumulative Product (CPRD#)

Cumulative Product (CPRD#)

This function multiplies recursively over time at the display frequency. It is especially useful for calculating multi period returns or growth rates based on single period growth rates. The expression entered as the first parameter should contain what is called a gross rate of return: one plus proportional rate of return or growth rate.

Format

CPRD#(Expression, Date parameter)

The date parameter sets the start date for the calculations. Actual dates are typed using either the standard format DD/MM/YY or the displacement date format, for example -NY. No nested function can be used when a start date parameter is set.

CPRD#(Expression)

The display or request start date determines the start date for the function.

CPRD#(Expression, Date Parameter, Restart parameter)

The trailing parameter allows the cumulative product to restart periodically.

Possible values are here WY, MY, QY, YR for weekly, monthly, quarterly and yearly restarts, respectively. It is also possible to use for example 15D for a restart every 15 days, 2M, 2MM.

The last one means that the number of days used for the bi-monthly restarts is recalculated at each restart point.

Examples

(CPRD#(1+(PCH#(FTSE100~EUR,1D)+PCH#(DAXINDX,1D)+PCH#(FRCAC40,1D))/300)-1)*100

This calculates from a given display start date the percentage price return for an equally weighted portfolio of three equity indices.

REBE#(CPRD#(1+(PCH#(FTSE100~EUR,1D)+PCH#(DAXINDX,1D)+PCH#(FRCAC40,1D))/300))

This calculates a price index for the portfolio used in the previous example.

CPRD#(1+PCH#(USHPAVGEA,1M)/100,,YR)*100

If the start date is the first month of a year this calculates the price performance year to date as an index for a house price datatype. The value is 100 the previous December. Subtract 100 for the percentage change YTD.