Analytic functions
Analytic functions perform complex calculation over a window of grouped events
Objective
Analytic functions are used when calculations over a event window is required. These functions are executed on each window generation trigger, windows are generated when the window policy is satisfied.
Joule is shipped with a starter pack of stateful and stateless functions to support initial use cases. The platform can be extended using the Analytics API to build custom functions.
Example
This code defines a sliding time window for calculating and emitting additional attributes.
window functions
ema rates Calculates the exponential moving average (EMA) for
ask
andbid
with a smoothing factor of 0.001996007984032.ranges Calculates the min-max range for
ask
andbid
.norms Computes the Z-score for
ask
andbid
.
policy
slidingTime The window slides every 500 milliseconds.
window size The window covers 2500 milliseconds (2.5 seconds).
This configuration calculates attributes like ask_EMA
, bid_EMA
, ask_MINMAX_NORM
, bid_MINMAX_NORM
, ask_ZSCORE
, and bid_ZSCORE
over a sliding time window.
Available options
Last updated