Skip to content
All library documents

Modeling Intraday ARIMA with Overnight Gaps

Article Quant Q&A · Author: Mateusz Zaborski

Summary

The document considers whether an ARIMA model for intraday trading should omit inactive or less liquid hours, using EUR/GBP as an example of a market whose variability changes over the day. Its main guidance is to distinguish modeling the full time-series process from forecasting only during selected trading hours. If overnight movements are related to daytime movements, including those observations may improve estimates even when the forecast target is a daytime period. Removing hours and treating the remaining observations as consecutive instead assumes a form of continuity in trading time, which may suit some markets but not others.

Other suggestions include adjusting for deterministic intraday periodicity before fitting ARIMA, then rescaling forecasts, or interpolating missing values when appropriate. The answers offer no empirical comparison of these approaches and do not establish that one is universally best. Interpolation can introduce bias, while ignoring overnight data relies on assumptions about the instrument and its off-hours behavior. The proposed idea of mirroring daytime data into gaps is mentioned without a method or supporting evidence.

Key ideas

  • Modeling only trading hours can discard information when overnight and daytime price movements are related.
  • Treating selected trading hours as continuous time is an assumption whose suitability depends on the market.
  • Adjusting for intraday periodicity before fitting ARIMA is one proposed way to use observations across the day.
  • Interpolation can fill gaps, but different methods may introduce different biases.

Tags

Full text
# ARIMA model coefficients from discontinuous data series


# ARIMA model coefficients from discontinuous data series












Stock prices are not stationary processes during all week or all day. For example EURGBP has low variability at night in Europe but during working hours is changing much more dynamic because of market liquidity.

I want to collect history data (15 minutes interval), calculate ARIMA coefficients and get prediction in R. But it is sensless to include data from night hours if I trade only during day.

So, is it possible to create ARIMA model based on discontinous data series (like 10:00 - 16:00 Monday, 10:00 - 16:00 Tuesday, 10:00 - 16:00 Wednesday, etc.)? How to merge this data minimizing the error (price from Tuesday 10:00 de facto is not next price after Monday 16:00)?

## Answer by Richard Hardy (score 2, accepted)

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

> But it is sensless to include data from night hours if I trade only during day.

This kind of thinking seems to be a common beginners' fallacy in econometrics and related fields (nothing personal). You have to distinguish two elements of your problem:

- understanding how a time series develops (e.g. by building a model for it);

- utilizing your understanding to find out a function of this development (e.g. a forecast for a specific time period).

Think of an analogy: if the true model is $$ y=\beta_0+\beta_1 x_1 + \beta_2 x_2 + u $$ and you are only interested in $\beta_0$ and $\beta_1$ but not $\beta_2$, you are still better off estimating $\beta_0$ and $\beta_1$ from the true model rather than the submodel $$ y=\beta_0 + \beta_1 x_1 + v. $$ Your estimates from the full model will be more accurate, and considerably so if $x_1$ is (highly) correlated with $x_2$.

Now back to your original problem: if the time series development at night were totally unrelated to its development at daytime, you could just ignore the night hours. But in all likelihood the relation is there, so better account for it. In other words, I would address the two core elements of your problem in turn without taking shortcuts.

## Answer by Will Gu (score 1)

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

When you say discontinuous, you are referring to the clock time. So depending on your assumptions, it may not be discontinuous in trading time.

For some securities that are not trading over night and are relatively stable during off hours, you might as well safely ignore the off hours and make the time series continuous. While for others that trade continuously, in case you have NA's in your data after aggregation, you might need to interpolate the time series, although various interpolation method introduces different biases.

## Answer by Malick (score 0)

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

I would recommend you to use the whole information (to include data from night hours) : firstly adjust your data for the intra-day periodicity with a deterministic function, secondly you can fit your arima on the periodicity adjusted series. You'll be able to recover the original non-adjusted series by post-multiplying your mean estimates by the deterministic factor.

See also here : Is that a good way to work with the ARMA model?

## Answer by Farleycs (score 0)

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

Have you thought about mirroring the data? So you would have in the missing data period the replication of what happened during the day, but in an inverse way.

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.