DIFFERENCER

Create a GTSTRANSFORMER which applies time differencing to any GTS via the FIT TRANSFORM/INVERSETRANSFORM pattern. The differencing can compound multiple seasonalities.

Signature

Examples

NEWGTS 1 100 <% NaN NaN NaN 4 PICK ADDVALUE %> FOR [ SWAP bucketizer.last 0 1 0 ] BUCKETIZE 0 GET [ 1 ] DIFFERENCER FIT TRANSFORM
NEWGTS 1 100 <% NaN NaN NaN 4 PICK 2 * PI * 24 / COS ADDVALUE %> FOR [ SWAP bucketizer.last 0 1 0 ] BUCKETIZE 0 GET [ 1 24 ] DIFFERENCER FIT 'differencer' STORE $differencer TRANSFORM 1 + $differencer INVERSETRANSFORM