Function format

All functions share a common format:

Function#(Expression,Parameters)

where:

Function# is a function code, for example, MAV#

Expression can be a series mnemonic, a combination of series using mathematical operators, a nested function or an Ennn number (an expression stored by a user via the Expression Builder) or an nnnE number (a Datastream expression available for all users).

Parameters vary according to function, but generally relate to time e.g. Start date

Examples

To calculate a 30 day moving average of Marks and Spencer share price, type:

MAV#(MKS,30D)

You can combine or nest up to 50 functions in a single expression. For example, to calculate a moving 5 day percentage change of a 30 day moving average in Marks and Spencer share price, type:

PCH#(MAV#(MKS,30D),5D)

You can enter functions anywhere in an expression. For example, to show the deviation of the actual Marks and Spencer share price around the 30 day moving average (by subtracting the moving average from the actual price; positive values indicate a rising average), type:

MKS-MAV#(MKS,30D)

See also

Nested functions.