Subtract

<series> output = <series>.sub(<constant> Subtractor Value)

<series> output = <series>.sub(<series> Subtractor Series)

This function subtracts from the calling series either Subtractor Value or Subtractor Series.  If Subtractor Series is used, Subtractor Series and the calling series must have the same number of points and they are subtracted point-wise.  If they do not have the same number of points the function call will throw an exception.  This function requires exactly one argument.

Examples:

var mySeries2 = mySeries.sub(5);

var mySeries3 = mySeries.sub(mySeries2);