Mean Reversion Score Pass Node
Mean Reversion Score — Series Input
Overview
The Mean Reversion Score Pass Node combines a rolling Z-score with autocorrelation analysis to produce a composite mean-reversion signal. A high positive score indicates the series is stretched above its mean and likely to revert; a high negative score indicates the opposite.
This node is ideal as a single-indicator mean-reversion filter, combining the deviation signal (Z-score) and the serial correlation structure (autocorrelation) into one output.
Formula
Parameters
| Parameter | Default | Description |
|---|---|---|
| period | 20 | Rolling window in bars for both Z-score and autocorrelation |
Inputs & Outputs
| Slot | Direction | Type | Description |
|---|---|---|---|
| input | Input | { values, timestamps } | Any upstream numeric series (spread, indicator, price) |
| values | Output | (number | null)[] | Composite mean-reversion score per bar; nulls during warm-up |
| timestamps | Output | number[] | Unix timestamps aligned to input |
Use Cases
Mean Reversion Entry Signal
Enter short when score > threshold (e.g. +2) and long when score < −threshold. Uses both deviation and reversal tendency.
Single-Node Mean Reversion
Combines Z-score + autocorrelation into one signal, reducing the need to wire multiple nodes for a simple mean-reversion strategy.
Spread Trading
Apply to a cointegrated spread series for a ready-to-use entry signal that adapts to the current reversal dynamics.
Tips & Best Practices
Use on Mean-Reverting Series
This node is most effective when applied to spreads or residuals confirmed to be cointegrated — not on raw trending prices.
Verify with Half-Life
Combine with the Half-Life Pass node to ensure your hold period aligns with the reversion speed of the series.
Score Magnitude Varies by Input
The score scale depends on the input series. Normalise or backtest to determine appropriate threshold values for your data.