Skip to main content
Skip table of contents

Abbreviated notation

In the abbreviated MM-Talk notation, the parameters of a function are expressed by other functions. This allows you to considerably shorten even long formulas by cleverly nesting them.

In the Create macros section, a formula was developed that provides a time series of all prices that have risen over n periods in the observation period.

CODE
$Zeitreihe:=Object;
$ZeitreiheVorN:=$Zeitreihe.Before[$N];
$Gestiegen:=$Zeitreihe>$ZeitreiheVorN;
$Gestiegen.Count[$Zeitraum]

With the shortened MM-Talk notation, the same formula can be written in a single line:

  1. A time series that is to be compared with another time series is expected as the input object. The corresponding function is"Greater[]".
  2. The argument of the"Greater[]" function is the time series shifted into the past; this isdescribedwith the"Before[]"function. The argument of the"Before[]" function is the period by which the time series is shifted, i.e. n periods. So the formula is:

    CODE
    Greater[Before[$N]]

    This formula corresponds to the first two lines of the original formula.

  3. The number of cases in which this functionassumesthe Boolean value "True"must now be read out. This is done in the same way as in the original formula with the"Count[]"function.
  4. Only the cases that fall within the"$period" observation period are to be taken into account; this is defined with the argument of the"Count[]" function:

    CODE
    Count[$Zeitraum]
  5. This function is applied to the function defined in step 2:

    CODE
    Greater[Before[$N]].Count[Zeitraum]

    Although this function is much shorter, its result is identical to that of the original four-line formula.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.