1
$\begingroup$

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)?

$\endgroup$
1
$\begingroup$

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:

  1. understanding how a time series develops (e.g. by building a model for it);
  2. 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+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 turns without taking shortcuts.

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ It is the easiest way to ignore off hours. But if I want to trade e.g on specyfic hours like 11:00-14:00 on Mondays I need create model based on previous Mondays 11:00-14:00. Time beetween Monday 14:00 and next Monday 11:00 is not off-hour so I cannot just ignore it. Or I can? $\endgroup$ – Mateusz Zaborski Oct 3 '16 at 7:14
  • $\begingroup$ @MateuszZaborski I just realized that you mentioned "it is sensless to include data from night hours if I trade only during day". I personally wouldn't agree with this opinion. It seems arguable that previous day's prices have larger impact on current day's prices than that of the overnight's. So depend on your model, you may be safe using the returns series without overnight information. But for ARIMA, which is essentially some filter, the intrinsic delay would probably undermine some useful recent information, and not including night prices would make it worse for sure. $\endgroup$ – Will Gu Oct 3 '16 at 15:52
0
$\begingroup$

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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.