Apama 10.3.1 | Apama Capital Markets Foundation Documentation | Capital Markets Foundation | Finance Smart Blocks for Developing Scenarios | CMF financial analytic smart blocks | EWMA Calculator v2.0
 
EWMA Calculator v2.0
EWMA calculates the exponentially weighted moving average of a data feed. This is generated from a set of data which may be constrained by the maximum age of samples, or unconstrained, and a single weighting value. This weighting is the weight to give the most recent value. The next value is then given the weighting weight * (1-weight).
Description
The next value is given the weighting weight * (1-weight)2 and so on, and a weighting of (1-weight)number of samples obtains the mean.
To make this block available to your scenario, you must add the Analytics APIs bundle to your project.
Parameters
Parameter
Description
duration
The maximum age in seconds for samples, or 0 if all samples should be used to calculate the EWMA.
weight
The weight of the most recent sample. Must be greater than 0 and less than or equal to 1.
Operations
Operation
Description
start
Starts the calculation of weightings. Must be called before the calculator will generate any statistics.
stop
Stops the calculation of further weightings. Any subsequent input feeds are ignored.
clear
Clears the current data set.
Input feeds
Feed
Fields
Description
data
value
The feed of values.
Output feeds
Feed
Fields
Description
ewma
value
The exponentially-weighted average.
samples
The number of samples that have been used to produce the average value.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.