---
title: ARIMA Filter
slug: litmusedge/ARIMA-filter
docTags: 
createdAt: 2026-07-24T12:01:53.512Z
---

The ARIMA Filter forecasts the next value in a time series. It fits an ensemble of ARIMA (AutoRegressive Integrated Moving Average) models to a rolling window of recent values and averages their forecasts into a single prediction. Use it when you want a short-term forecast of a noisy or trending signal rather than a raw reading.

## Why use ARIMA Filter

Use this processor when a simple trend line isn't enough to model a noisy or seasonal signal, for example, forecasting the next reading from a sensor whose values trend and cycle at the same time.

## How it works

The processor keeps a rolling window of the most recent values and forecasts from it.

- While the window fills, the processor passes the current value through as the prediction.
- Once the window is full, the processor fits several candidate ARIMA (p, q) models and selects the best fit by minimizing the Akaike Information Criterion (AIC).
- The processor fits as many models as **Number Of Models** specifies, then averages their forecasts. Averaging diverse models reduces the influence of any single poorly fit model.
- The window updates only with messages where `success` is `true`, so failed reads do not distort the forecast.

## Differencing

**Seasonality Size** controls how the processor differences the series before it fits a model:

- `0` fits the series directly. Use this for a stationary series with no trend.
- `1` applies a first difference to remove a linear trend.
- `2` or more applies a seasonal difference at that lag for a repeating cycle.

## Output

The processor adds a `prediction` field that holds the forecasted next value.

## Parameters

:::hint{type="info"}
**Note:** The processor produces predictions only after the window fills. Until then, it forwards the current value unchanged. A larger window and a higher model count improve the forecast but increase the processing cost of each fit.
:::

| **Parameters**     | **Details**                                                                                                         |
| ------------------ | ------------------------------------------------------------------------------------------------------------------- |
| Window Size        | Number of historical values used to fit the model. Default is `100`.                                                |
| Seasonality Size   | Differencing lag. `0` is none, `1` is a first difference, and `2` or more is a seasonal difference. Default is `7`. |
| Number Of Models   | Number of diverse models to fit and average for the ensemble prediction. Default is `5`.                            |
| Pass Through Value | Joins the input with the output of the processor.                                                                   |

