All indicators

Stationarity Test: Dickey-Fuller & KPSS [Pinescriptlabs]

Created by PINE_LABS

Save
Stationarity Test: Dickey-Fuller & KPSS [Pinescriptlabs] chart preview

Stationarity Test: Dickey-Fuller & KPSS [Pinescriptlabs]

Stationarity Test: Dickey-Fuller & KPSS [Pinescriptlabs] full chartOpen original image in a new tab ↗

A statistical model analyzing price spread between two instruments using stationarity tests and Z-score to determine potential trading signals based on market deviation.

Explore complementary indicator roles
UNDERSTAND THE TOOL

How it works

The Kwiatkowski-Phillips-Schmidt-Shin (KPSS) model performs statistical tests on price spreads between two financial instruments to assess their relationship's stationarity. It uses Augmented Dickey-Fuller (ADF) and KPSS tests to determine whether the spread between instruments exhibits consistent statistical properties over time.

The algorithm calculates a Z-score representing how many standard deviations the current spread deviates from its historical mean, creating dynamic thresholds that adjust based on recent market volatility. By comparing current market conditions against historical data, the model generates visual signals indicating potential trading opportunities when the spread significantly diverges from its expected range.

Why it may be useful

This statistical approach provides traders with a sophisticated method of understanding complex market relationships beyond simple price movement analysis. By examining the stationarity and correlation between different financial instruments, traders can identify potential mean reversion opportunities and assess market stability more comprehensively.

The model's ability to dynamically adjust thresholds and provide detailed statistical insights helps traders make more informed decisions, reducing emotional trading and offering a more quantitative approach to market analysis. It enables traders to recognize subtle market inefficiencies and potential trading signals that might be overlooked by traditional technical analysis methods.

When to explore it

The KPSS & ADF model is most effective in markets with established historical relationships between different financial instruments, such as currency pairs, stocks within the same sector, or correlated assets. It works best when both instruments being analyzed have sufficient historical data and demonstrate some degree of price correlation.

Traders should use this indicator during periods of relative market stability and when seeking mean reversion opportunities. It is particularly useful for identifying potential trading signals in range-bound markets or when analyzing spread relationships between different financial instruments that typically move in predictable patterns.

Keep exploring

CHECK THE DETAILS

What we’ve verified

Access, alerts and repainting behaviour have not been independently verified for this indicator. Check the creator’s current publication and settings.

General descriptions and classifications are recovered research. Verified details above identify the specific checks we have completed. Check the creator’s current publication for later changes.