$ wf g -w /path/to/warp10 io.warp10 warp10-ext-forecasting

/path/to/warp10/ is where Warp 10 is physically located.



This repository only contains the documentation of warp10-ext-forecasting.

The documentation is located under src/main/warpscript/io.warp10/warp10-ext-forecasting/.

These functions are available on the Warp 10 instance of the sandbox.

To install this extension on-premise or to make it available on your saas plan, please contact us.

Forecast extension for the WarpScript language

Functions that build GTS forecast models:

RANDOMWALK           // build a random walk model
SRANDOMWALK          // build a random walk model that is seeded with PRNG function
LSTM                 // build an LSTM neural network model
NNETAR               // build a neural network auto-regressive model
SES                  // build a simple exponential smoothing model
HOLT                 // build a Holt's linear model (SES + trend)
HOLTWINTERS          // build a Holt-Winters' model (SES + trend + seasonal)
ARMA                 // build an auto-regressive moving average model
ARIMA                // build an auto-regressive integrated moving average model
SARMA                // build a seasonal auto-regressive moving average model
SARIMA               // build a seasonal auto-regressive integrated moving average model
SEARCH.ETS           // search for a suitable exponential trend-seasonal model (include SES, HOLT and HOLTWINTERS)
SEARCH.ARIMA         // search for a suitable Arima model (include ARMA and ARIMA)
SEARCH.SARIMA        // search for a suitable Sarima model (include SARMA and SARIMA)
SEARCH.NNET          // search for a suitable neural network model (include LSTM and NNETAR)
AUTO                 // automatically choose a forecast model (non-seasonal), using AIC
SAUTO                // automatically choose a seasonal forecast model, using cross-validation

Functions that uses a GTSFORECASTMODEL:

FORECAST                 // forecast values in the future
FORECAST.ADDVALUES       // forecast values in the future and append them to observation GTS
INFORECAST               // produce in-sample one-step ahead forecasts
CROSSFORECAST            // forecast values given a model fitted with another GTS
CROSSFORECAST.ADDVALUES  // forecast values given a model fitted with another GTS and append them to input GTS
FORECAST.ANOMALIES       // detect anomalies in in-sample forecast
FORECAST.ANOMALIES.DROP  // detect anomalies in in-sample forecast and drop them from input GTS

Functions that gives info on a GTSFORECASTMODEL

MODELINFO                // return map of information about the model
OBSERVATIONS             // observation GTS used for fitting the model
AIC                      // Akaike information criterion
AICC                     // corrected Akaike information criterion
BIC                      // bayesian information criterion
NPAR                     // number of parameters
LOGLIKELIHOOD            // estimated log-likelihood

Functions related to stationarity and differencing:

STATIONARY     // test whether input GTS is stationary
SEARCH.FOR.D   // search for the number of times a GTS needs differencing to become stationary
DIFF           // apply time differencing with one or more seasonalities
INVERTDIFF     // integrate with one or more seasonalities
DIFFERENCER    // build a GTS transformer for time differencing

Fit / Transform / Inverse-Transform programming pattern (similar to sklearn)

GTSTRANSFORMER    // create a GTS transformer from a set of macros
FIT               // fit a GTS transformer
TRANSFORM         // transform a GTS using a GTS transformer
INVERSETRANSFORM  // inverse-transform a GTS using a GTS transformer


<GTS> AUTO 5 FORECAST creates a GTS containing the 5 forecast ticks using an automatically selected model.

<GTS> AUTO 5 FORECAST.ADDVALUES merges a GTS with its forecast.

<GTS> 24 SAUTO 48 FORECAST creates a GTS containing the 48 forecast ticks using a model considering that there is a 24-tick seasonal cycle.

NEWGTS RANDOMWALK 1000 FORECAST populates a new GTS with random walk

Recommendations and troubleshooting

The input GTS needs not be bucketized and filled, but it will work better if it is the case.

Each next forecast will be on tick = last_tick + (last_tick - penultimate_tick).

Use UNBUCKETIZE first if the last bucket does not match the tick of the last non-null value, or else there will be a gap between the last non-null value and the first forecast value.

The forecast functions have an optional argument that defines the maximum number of past ticks they use to build their model (max input size). The default value is dependent on the model so that their default time to execute is roughly equivalent.


Jean-Charles Vialatte





Last published



SenX private



Path Size Creation time
  AIC 1089 bytes 2020-09-09
  AICC 1102 bytes 2020-09-09
  ARIMA 1719 bytes 2020-09-09
  ARMA 1648 bytes 2020-09-09
  AUTO 1051 bytes 2020-09-09
  BIC 1091 bytes 2020-09-09
  CROSSFORECAST 1550 bytes 2020-09-09
  CROSSFORECAST.ADDVALUES 1325 bytes 2020-09-09
  DIFF 807 bytes 2020-09-09
  DIFFERENCER 1202 bytes 2020-09-09
  FIT 837 bytes 2020-09-09
  FORECAST 1573 bytes 2020-09-09
  FORECAST.ADDVALUES 1337 bytes 2020-09-09
  FORECAST.ANOMALIES 1336 bytes 2020-09-09
  FORECAST.ANOMALIES.DROP 1341 bytes 2020-09-09
  GTSTRANSFORMER 1145 bytes 2020-09-09
  HOLT 1967 bytes 2020-09-09
  HOLTWINTERS 2306 bytes 2020-09-09
  INFORECAST 1144 bytes 2020-09-09
  INVERSETRANSFORM 776 bytes 2020-09-09
  INVERTDIFF 960 bytes 2020-09-09
  LOGLIKELIHOOD 1090 bytes 2020-09-09
  LSTM 1805 bytes 2020-09-09
  MODELINFO 1108 bytes 2020-09-09
  NNETAR 2239 bytes 2020-09-09
  NPAR 1089 bytes 2020-09-09
  OBSERVATIONS 1073 bytes 2020-09-09
  RANDOMWALK 1342 bytes 2020-09-09
  SARIMA 2069 bytes 2020-09-09
  SARMA 1920 bytes 2020-09-09
  SAUTO 1149 bytes 2020-09-09
  SEARCH.ARIMA 1534 bytes 2020-09-09
  SEARCH.ETS 1363 bytes 2020-09-09
  SEARCH.FOR.D 1243 bytes 2020-09-09
  SEARCH.NNET 1586 bytes 2020-09-09
  SEARCH.SARIMA 1788 bytes 2020-09-09
  SES 1633 bytes 2020-09-09
  SRANDOMWALK 1415 bytes 2020-09-09
  STATIONARY 1099 bytes 2020-09-09
  TRANSFORM 763 bytes 2020-09-09
Versions Published
2.0.0 2020-09-09
1.0.5 2020-02-07
1.0.3 2020-01-16
1.0.2-uberjar 2019-11-14
1.0.1-uberjar 2019-11-13
1.0.0-uberjar 2019-11-13