Skip to content
All library documents

Choosing Return Windows for Intraday Stationarity Tests

Article Quant Q&A · Author: Krzysztof Fajst

Summary

The document considers whether changing performance across symbols and weeks might reflect shifts between stationary and nonstationary behavior. Its response recommends testing returns rather than price levels under a weak-stationarity framework, since price levels are treated as nonstationary. It also cautions that returns sampled at intervals shorter than 15 minutes can be dominated by bid-ask bounce, making those observations unreliable for this purpose.

The suggested window length is tied to the trading system’s holding period: use a window shorter than the holding time divided by a factor of two to four. A unit-root test p-value, including tests such as those raised in the question, may offer limited evidence to assess stationarity in the context of a particular strategy. The answer does not compare DF, ADF, or KPSS methods, report empirical tests on forex or S&P data, or establish a universally suitable window; the guidance is a heuristic and depends on the system’s holding time.

Key ideas

  • Test returns rather than price levels when assessing weak stationarity.
  • Very short interval returns may be dominated by bid-ask bounce.
  • The suggested return sampling interval is longer than 15 minutes.
  • Choose a rolling window shorter than the system’s holding time divided by two to four.
  • Interpret a unit-root test p-value in the context of the specific trading system.

Tags

Full text
# Real time stationarity test


# Real time stationarity test












I have a trading system based on Machine Learning which is trading 8 symbols intraday. From the results I found out that some weeks of trading are successful for some symbols, then it usually switches to unsuccessful next week for previously successful symbol. At the same time another symbol which was unsuccessful previous week start to be successful this week.

As an explanation to this phenomenon it comes to my mind that the underlying symbol series switching from stationary to non stationary and vice versa.

So my question is: did somebody tried intraday (1 min data) stationarity test on FOREX or S&P ??? I believe such test should be'data window based' with sliding window than what would be a size of such window ???

What method would be the best for such test (DF, ADF, KPSS ) or other ???

regards, Krzysztof

## Answer by dkhokhlov (score 1, accepted)

https://quant.stackexchange.com/a/26000

We assume weak stationarity definition. Price level is non-stationary. Trend-stationarity is like following a trend, not working on this time scale. So need to use returns. Returns on interval <15min are dominated by bid-ask bounce. Useless, trap. So test should be using >15min returns on window interval W < (hold time / N), N = 2-4. Then Unit root test p value can give some degree of stationarity to speculate further in context of specific trading system.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.