Price Gaps: Another Market Anomaly?

This paper analyses price gaps (also known as trading, opening, common, stock, morning gaps – all these terms being used to indicate that the current day’s opening price is not the same as the previous day’s closing price), which have been detected at times in stock, FOREX and commodity markets. Applying a variety of statistical tests we are able to show that in most cases the observed price behaviour is not inconsistent with market efficiency, the exception being the FOREX: in this case a trading strategy based on exploiting this anomaly can generate abnormal profits.


Introduction
This paper analyses price gaps (also known as trading, opening, common, stock, morning gapsall these terms being used to indicate that the current day's opening price is not the same as the previous day's closing price), which have been detected at times in stock, FOREX and commodity markets. A positive (negative) gap corresponds to a higher (lower) opening price vis-à-vis the previous closing price. Applying a variety of methods we are able to show that in most cases the observed price behaviour is not inconsistent with market efficiency, the exception being the FOREX: in this case a trading strategy based on exploiting this anomaly generates abnormal profits.
Specifically, using data from different financial markets (FOREX, commodities, US and Russian stock markets) we analyse various hypotheses of interest by means of descriptive statistics, statistical tests such as t-tests, ANOVA and Kruskal-Wallis tests, and regression analysis with dummy variables. Then a trading robot approach is implemented to establish whether or not price gaps represent an exploitable profit opportunity.
The layout of the paper is as follows. Section 2 briefly reviews the relevant literature. Section 3 describes the data and outlines the empirical methodology. Section 4 presents the empirical results. Section 5 offers some concluding remarks.

Literature Review
According to the Efficient Market Hypothesis (EMH -see Fama, 1970), prices should fully incorporate available information and follow a random walk, therefore it should not be possible to make systematic profits on the basis of their past behaviour. However, several studies have provided evidence of abnormalities that could represent exploitable profit opportunities inconsistent with market efficiency (see, e.g., Schwert, 2003). Since the seminal work of Mandelbrot (1963), numerous papers have shown that the Gaussian distribution provides a poor fit for price dynamics: fat tails, clustered volatility, long memory etc. have become well-known "stylized facts" characterising the behaviour of asset prices. Shiller (2000) and Akerlof and Shiller (2009) among others attributed the presence of anomalies in financial markets to animal spirits, the herd instinct, mass psychosis, mass panic and other forms of irrational behaviour of investors. Jacobsen, Mamun and Vyshaltanachoty (2005) distinguished between calendar, pricing and size anomalies. Jensen (1978) argued that anomalies can only be considered statistically significant when they generate excess returns.
Anomalies could be fading over the time. For example Fortune (1998Fortune ( , 1999, Schwert (2003), andOlson et al. (2010) showed that the weekend effect has become less important over the years. In fact financial markets are always changing and evolving, and new anomalies might appear over time (Lo, 1991). Price gaps are one of them. They occur when the current day's opening price differs from the previous day's closing price. They might reflect buy or sell orders placed before the market opens that push the opening price above or below the previous day's close. This is a rather unusual situation (especially if the gap is sizeable) and may signal changes in investor's behaviour.
The following are the most common explanations for the existence of price gaps: 1. Unexpected events, such as earning or other important news announcements; 2. Dramatic changes in market conditions, such as sudden shifts in supplydemand for financial assets; 3. Development of after-hours trading; 4. Significant time lags between previous closing and current opening prices (caused by weekends or holidays); 5. Technical reasons (for example, a significant widening of the bid-ask spread); 6. Other reasons. It is also been noticed that such gaps are normally very short-lived. However, no systematic study of their behaviour has been carried out to date. Analysing it in depth is our objective. Moreover, we aim to establish whether such an anomaly can be exploited to make abnormal profits, which would represent evidence against the EMH (see Caporale et al., 2016, for details).

Data and Methodology
We examine the following series: FOREX (EUR/USD, GBP/USD and USD/RUB exchange rates), commodity prices (Oil, Gold), US stock market (Dow Jones index + one of the blue chips, IBM), and Russian stock market (MICEX + one of the blue chips, Sberbank). The US and Russian stock markets are selected as an example of an efficient and inefficient market respectively. The chosen frequency is daily because gaps are most noticeable in daily charts. The sample period is 2000-2015.
The following hypotheses are tested: H1: Prices tend to rise after positive gaps; H2: Prices tend to fall after negative gaps; H3: Prices tend to rise before positive gaps; H4: Prices tend to fall before negative gaps; H5: Price gaps are short-lived; H6: Returns around price gaps differ from normal ones.
Testing H1 and H2 provides information about price behaviour after gaps appear. Testing H3 and H4 sheds light on whether or not the emergence of gaps is predictable. Testing H5 is informative about the validity of the old saying "the market abhors a vacuum and all gaps will be filled". Finally, testing H6 allows to establish whether or not price gaps are an anomaly that is inconsistent with market efficiency.
To test H1-H2 we calculate the number of days with positive (negative) returns after positive (negative) gaps divided by the number of gaps. To test H3-H4 we use the same procedure but for the number of days before gaps occur. This yields the probability of price movements in a given direction for a positive (negative) gap. If it is significantly higher than 50% it may be seen as evidence in favour of the null hypothesis. The time horizon varies from 1 to 3 days. The testing approach for H5 is very similar: we calculate the number of gaps filled after 1-5 days divided by the total number of gaps; if this number is significantly higher than 50% it suggests a specific pattern in price behaviour.
Finally, to test H6 we use the following techniques:  parametric tests (Student's t-tests, ANOVA);  non-parametric tests (Kruskal-Wallis test);  regression analysis with dummy variables.
Returns are calculated in the standard way as follows: where i R returns on the і-th day in %; i Openopen price on the і-th day; i Closeclose price on the і-th day.
Essentially, the statistical tests carried out aim to establish whether or not returns follow the same distribution during "normal" and "abnormal" periods, the latter being characterised by the presence of price gaps. Both parametric and nonparametric tests are carried out given the evidence of fat tails and kurtosis in returns. The Null Hypothesis (H0) in each case is that the data belong to the same population, a rejection of the null suggesting the presence of an anomaly.
We also run regressions including a dummy variable to identify statistically significant differences between "normal" and "abnormal" periods: Y t = a 0 + a 1 D t + ε t (3) where:return in period t; a 0mean return in a "normal" period; a 1mean return in an "abnormal" period; D ta dummy variable equal to 1 in "abnormal" periods and 0 in "normal" periods; ε t -Random error term for period t. The size, sign and statistical significance of the dummy coefficients provide information about possible anomalies. When anomalies are detected using the previous methods we examine whether they give rise to exploitable profit opportunities using a trading robot approach. This considers the detected anomalies from the point of view of a trader who is interested in making abnormal profits by exploiting them. The trading robot simulates the actions of a trader according to an algorithm (trading strategy). This is a programme in the MetaTrader terminal that has been developed in MetaQuotes Language 4 (MQL4) and used for the automation of analytical and trading processes. Trading robots (called experts in MetaTrader) allow to analyse price data and manage trading activities on the basis of the signals received. One of the biggest advantages of this approach is that a wide range of parameters can be tested. Further, it incorporates in the analysis transaction costs. A strategy resulting in a number of profitable trades > 50% and positive total profits is seen as evidence of an exploitable market anomaly.
To make sure that the results we obtain are statistically different from the random trading ones we carry out z-tests. A z-test compares the means from two samples to see whether they come from the same population. In our case the first is the average profit/loss factor of one trade applying the trading strategy, and the second is equal to zero because random trading (without transaction costs) should generate zero profit. The null hypothesis (H0) is that the mean is the same in both samples, and the alternative (H1) that it is not. The computed values of the z-test are compared with the critical one at the 5% significance level. Failure to reject H0 implies that there are no advantages from exploiting the trading strategy being considered, whilst a rejection suggests that the adopted strategy can generate abnormal profits.

Empirical Results
First an appropriate gap size should be chosen as a criterion for gap detection. For that purpose we analyse the commodity markets (Oil and Gold pricessee Table  1). It is apparent that choosing a relatively small gap size of 0.1% would generate too many gaps (almost 20% in the case of Gold) to consider them abnormalities in price dynamics. On the other hand, a big gap size would yield very few cases. In order to have a sufficient number of observations to carry out statistical tests we choose therefore a gap size of 0.2% for Gold and Oil; this gives more than 100 observations, which is sufficient for statistical inference; further, they represent only 5%-6% of the population, and hence can be considered anomalies. The selected gap size, generating the same percentage of gaps (5-6%) in the data set, is instead 8% for the Russian stock market. Table 2 sheds light on the extent to which the time interval between the closing and reopening of markets might account for the emergence of gaps by calculating the number of gaps for different days of the week. Gaps in the commodity and FOREX markets appear to emerge mainly after weekends, whilst there is no clear pattern in the case of stock markets. Next we test Hypotheses H1-H5. The results for commodity, FOREX and stock markets are presented in Appendices A, B and C respectively. There is not much evidence that prices tend to increase after positive gaps (H1) in any of the markets examined over time horizons from 1 to 3 days (see Tables A1, B.1 and C.1), although there are a few exceptions such as the Dow Jones Index (prices increase in 80% of the cases after positive gaps). As for H2, prices fall in 50% of the cases after negative gaps (see Tables A1, B.1 and C.1 for details). Overall, it appears that gaps do not affect price dynamics and cannot be considered an anomaly. The results for H3 and H4 (see Tables A.2, B.2 and C.2) suggest that gaps are not generated by previous price dynamics (the Russian Ruble is an exception: positive gaps appear in 70% of the cases after upward price movements), at least over a time horizon from 1 to 3 days before the gap. As for H5 (see Tables A.3, B.3 and C.3), the evidence suggests that up to 80% of gaps are not filled within 5 days.
Overall, the results for H1-H5 lead to the conclusion that price gaps are not an anomaly in probabilistic terms. Testing H6 instead provided information on whether they can be seen as an anomaly in terms of size (see Appendices D, E and F). Tables 3-6 provide a summary of the results based on the various techniques used for each of the markets in turn. * "+"null hypothesis not rejected, "-" -null hypothesis rejected As can be seen, there is no indication that gaps play any role in the case of commodity prices.
In the FOREX (EUR/USD and GBP/USD exchange rates) instead it is clear that price dynamics in gap days differ from normal ones; specifically, they are affected by positive gaps (see Tables E.1, E.2, E.4, E.5, E.7, E.8 for details). Since the sign of the dummy coefficient in the regression is negative after a positive gap, the following trading strategy should be tested to see if it is profitable: sell and close the position at the end of the day. As for the EURUSD and GBPUSD USD/RUB exchange rate, there is some evidence that price dynamics before gaps are abnormal and might be generating them. * "+"null hypothesis not rejected, "-" -null hypothesis rejected The results for the US stock market are mixed, but there is some evidence that price dynamics in the gap day differs from normal ones. In case of the Dow Jones Index when positive gaps emerge prices tend to increase, whilst the price of IBM shares moves down after any gaps, whether positive or negative. Therefore profitable trading strategies might be the following: in the case of the Dow Jones index long positions should be opened after positive gaps; as for IBM shares, short positions should be opened after any gaps. In both cases the opened positions should be closed at the end of the day.
The results for the Russian stock market differ from those for the US one, possibly reflecting lower efficiency, but are consistent with those for the USD/RUB exchange rate: abnormal price dynamics signal forthcoming gaps in less efficient markets. In the specific case of Sberbank price dynamics differ from normal ones only after a negative gap. Therefore a profitable trading strategy would be to sell in the day after a negative gap, and to close the opened positions at the end of the day.
Because the clearest evidence of abnormal price behaviour associated with the emergence of gaps is found in the case of the FOREX, we implement for this market a trading robot approach to test whether the trading strategy already mentioned (sell the currency pair EUR/USD 1 or GBP/USD after positive gaps and close the position at the end of the day) is indeed profitable. The only parameter to be set is the gap size, which is chosen using an optimisation procedure with 0.05%-1% as the range of possible values and with 0.05% steps. The five most profitable strategies are shown in Table 7. Clearly, there is a profit/risk trade-off. For the EUR/USD the most profitable strategy corresponds to a gap size of 0.05%, but the drawdown (risk) is almost double compared to the case with gap size 0.1%, therefore the latter is preferable. For the GBP/USD a gap size of 0.05% should be chosen on the basis of the same trade-off. The results based on these gaps are displayed in Table 8. As can be seen, they are rather stable over time. The average probability of profitable trading is higher than 60%. Losses are incurred in only 3 out of 16 years in the case of the EUR/USD, and 2 out of 16 in the case of the GBP/USD. The ztests in Table 9 show that the results obtained using the trading strategy are statistically different from the random ones.

Conclusions
In this paper we have analysed price dynamics around gaps in various (stock, commodity and FOREX) financial markets by testing six different hypotheses by means of appropriate statistical methods. We find that in most cases there is no significant evidence of anomalous price behaviour associated with the emergence of gaps that could be inconsistent with market efficiency. Further, in the FOREX and commodity markets gaps usually appear after weekends; in less efficient markets (in Russia) previous price dynamics signal the emergence of gaps. The exception is the FOREX, for which there is some evidence of abnormal returns around gaps, which could indicate that this market is not efficient. A trading robot approach confirms that there exist profitable strategies based on exploiting these anomalies. The probability of profitable trading is higher than 60%, and these results are significantly different from the random ones. Further investigation of these issues, for a wider set of markets, should be carried out in the future.

Appendix A
Testing results for H1-H4: the case of commodities