1 Introduction

The efficient market hypothesis (EMH) developed by Fama (1970) remains the dominant paradigm to understand asset price behaviour. It implies that prices should follow a random walk without any detectable patterns that can be exploited to generate abnormal profits. However, over the last 50 years a growing body of evidence has pointed to the existence of various anomalies (such as calendar and size effects, momentum and contrarian effects, market over- and underreactions, announcement drifts) that appear to be inconsistent with the EMH. For instance, Gao et al. (2018) found higher predictability in the US stock market on days with higher volatility and transaction volumes, as well as on days when important macroeconomic news are released. There is also extensive evidence of momentum and contrarian effects in various financial markets (Caporale and Plastun 2019; Wan and Kao 2009; Cox and Peterson 1994; Govindaraj et al. 2014) and of possible profitable trading strategies exploiting them.

Much less is known about price anomalies in the commodity markets given the dearth of papers analysing them. One of the few exceptions is the study due to Ham et al. (2019) who show that momentum effects in the Chinese commodity futures market can be exploited to make abnormal profits. The present paper contributes to this limited literature by examining not only whether there exist price (momentum or contrarian) effects after 1-day abnormal returns, but also estimating timing parameters for these effects. For these purposes oil and gold daily prices over the period 01.01.2009–01.09.2019 are analysed and a number of hypotheses of interest are tested using average analysis, t tests, cumulative abnormal returns (CAR) and trading simulation approaches. Related papers by Caporale and Plastun (2020a, b) have applied the same framework to the cryptocurrency and FOREX markets, respectively. In each case new valuable information about the behaviour of different asset prices has been obtained using an approach not previously used in the context of these markets.

The results suggest that hourly returns on the days with abnormal returns are significantly bigger than those during average “normal” days. A momentum effect is detected for both oil and gold prices on the days with abnormal returns—before the end of the day. On the days with abnormal returns prices tend to move in the direction of abnormal returns till the end of the day when these occur. Price effects are also found on the following day, specifically a momentum effect in the case of oil prices and a contrarian effect in the case of gold prices. These effects are limited in time, and the corresponding timing parameters are estimated. Trading simulations based on those show that these effects can be exploited to generate abnormal profits.

The remainder of the paper is organised as follows. Section 2 reviews the relevant literature. Section 3 describes the data and the methodology. Section 4 discusses the empirical results. Section 5 offers some concluding remarks.

2 Literature review

Numerous studies have been carried out to establish the empirical relevance of the EMH by testing for the existence of exploitable market anomalies. These could arise for a variety of reasons, such as the irrational behaviour of market participants (Barber and Odean 2001), new information arrivals such as earnings announcements (Rees and Thomas 2008), divergence between analysts' expectations and actual data (Doukas et al. 2006), insiders' purchases and sales (Inci et al. 2010), behavioural biases (Verousis and Gwilym 2013; Chen 2017), technical analysis and the execution of stop-losses (Osler 2002), etc.

The existence of anomalies has been confirmed by many researchers. For instance, Keim (1983) found a “January effect” (higher returns compared to the other months) and a “size effect” (large firms earn larger risk-adjusted returns than small firms). Ariel (1987) detected a “monthly effect” (the mean return for stocks is positive only for days immediately before and during the first half of calendar months). French (1980) provided evidence of a “weekend effect” (average returns on Monday are lower than on other days of the week). Branch and Ma (2012) spotted a very strong negative autocorrelation between overnight and intraday returns. Berkman et al. (2011) found intraday contrarian effects in the US stock market.

According to the overreaction hypothesis there should be price reversals after abnormal price changes (De Bondt and Thaler 1985). However, Cox and Peterson (1994) detected momentum effects instead. Bhattacharya et al. (2012) found excess buying (selling) at all price points one penny below (above) round numbers. Harris (1989) observed large mean price changes during the last daily NYSE transactions. Jegadeesh and Titman (1993, 2001) reported momentum effects in equity markets. Parikakis and Syriopoulos (2008) found price reversals in the Forex after 1-day abnormal returns. Contrarian effects were also detected in the US stock market by Ferri and Min (1996).

Only a few studies have focused on the commodity markets. Batten et al. (2017) analyzed statistical patterns in intra-day returns for the case of gold finding strong intraday periodicity linked to the opening and closing of major markets around the world. Caporin et al. (2015) reported similar results. Cai et al. (2001) found that periodicity can also be related to macroeconomic announcements.

Caliskan and Najand (2016) found that the price of gold tends to increase (decrease) following significantly positive (negative) stock returns, whilst Mollick and Assefa (2013) concluded that oil price returns exert mostly negative effects on US stock returns. Baur (2012) and Chiarella et al. (2015) analysed the relationship between price returns and volatility changes in the commodity futures markets and found a positive one in the gold futures market and a negative one in the crude oil futures market. Cunado et al. (2010) reported evidence of long memory in oil price volatility.

Spillover effects across commodity markets, especially the US and emerging stock markets, have been found by Antonakakis et al. (2020) and might provide useful information about other markets as well. Additional evidence of such effects has been provided by Arouri et al. (2011), Ewing and Malik (2016) and Mensi et al. (2013). Baur and Kuck (2020) analysed the reaction of gold prices to shocks to the US stock market and detected a momentum effect in gold prices resulting from negative abnormal returns in the US stock market. Elder et al. (2012) found a swift and significant response of gold prices to economic news surprises. Rosa (2014) showed that both gold prices and transaction volumes are also affected by monetary policy surprises. Finally, Roon et al. (2004) found a significant momentum effect in term premia across time in commodity markets.

Other studies have analysed whether there exist profitable trading strategies based on the detected anomalies. For instance, Miffre and Rallis (2007) identified 13 profitable momentum strategies in the commodity futures markets. Erb and Harvey (2006) showed that a momentum strategy with a 12-month ranking period and a 1-month holding period is profitable in the same markets. Switzer and Jiang (2010) identified significant momentum profits in both outright futures and spread trading strategies in the case of oil and gold when the spot premium and the term premium are used to form winner and loser portfolios. Wang and Yu (2004) found strong evidence of weekly return reversals in futures prices; they also showed that futures market overreactions exist, and that both past prices and trading activity contain useful information about future market movements.

As for 1-day abnormal returns and the price patterns they generate, Caporale et al. (2018) reported that a strategy based on counter movements after 1-day abnormal returns does not generate profits in the Forex and the commodity markets, but it is profitable in the case of the US stock market. Parikakis and Syriopoulos (2008) investigated patterns following excess 1-day fluctuations for various currencies and found that a contrarian strategy is profitable in the Forex.

Finally, Lo (2004) introduced the adaptive market hypothesis which implies that some patterns might disappear and then reappear in time. Neely and Weller (2013) showed that trading strategies evolve as traders adapt their behaviour to changing circumstances; specifically, Forex trading returns dipped significantly in the 1990s but recovered by the end of the decade and have been significantly higher than equity ones since 1998.

Despite the numerous papers mentioned above analysing abnormal returns there is still a gap in academic literature concerning the timing parameters for these effects. Can abnormal returns be detected before the end of the day? Is there a time gap between the detection of an “abnormal” day and the moment when the momentum effect fades? Are there any price effects on the next day? Do the detected effects last the whole day or there are timing patterns? Can the timing parameters be used to beat the market? Finding answers to these and related questions is the aim of this paper.

3 Methodology

Daily and hourly data for gold and oil over the period 01.01.2009–31.03.2020 (GMT + 3 time zone) are used. Gold and oil prices are chosen using the liquidity criterion. According to the CME Group (https://www.cmegroup.com/market-data/daily-bulletin.html) the most liquid commodities are oil, natural gas, gold, sugar, corn, wheat and coffee, but we do not consider agricultural commodities because of their seasonal nature. The data source is MetaQuotes Software Corp. The sample period has been chosen to include a sufficient number of abnormal price changes to be able to construct a data set suitable for performing t tests as well as conducting trading simulations whilst avoiding data snooping.

Returns (\({R}_{i}\)) are computed as follows:

$$ R_{i} = \left( {\frac{{{\text{Close}}_{i} }}{{{\text{Open}}_{i} }} - 1} \right) \times 100{\text{\% ,}} $$
(1)

where Ri, returns on the ith day (h) in %;\({\mathrm{Open}}_{i}\), open price on the ith day (h); \({\mathrm{Close}}_{i}\), close price on the ith day (h).

\({\mathrm{Open}}_{i}\) is used instead of \({\mathrm{Close}}_{i-1}\) in order to avoid the distortions caused by price gaps.

One of the most important issues in this context is the detection of abnormal returns. There are two different approaches, namely the static and dynamic trigger ones. In the former the trigger value used to define abnormal return is constant. For instance, Bremer and Sweeney (1991) set it equal to 10%, thus defining daily returns as abnormal if above this threshold. The main problem with this approach is that asset prices are in fact unstable (in particular, their volatility changes over time). Therefore, as shown by Cox and Peterson (1994), the use of constant values will bias the results.

By contrast, in the dynamic approach (Wong 1997) the appropriate number of standard deviations is added to obtain the threshold for abnormal returns (Caporale and Plastun 2019). This allows to take into account market instability and thus to reduce the probability of biased results. A key issue in the dynamic trigger approach is the number of standard deviations used to identify abnormal returns. In the case of oil our calculations suggest abnormal returns are 17%, 5% and 2%, respectively, depending on whether one adds 1, 2 and 3 standard deviations. The middle value is used for the following analysis.

Two types of abnormal returns are calculated: negative and positive.

A positive abnormal returns are defined as follows:

$$ R_{i} > \left( {\overline{R}_{n} + k \times \delta_{n} } \right) $$
(2)

and a negative abnormal returns as:

$$ R_{i} < \left( {\overline{R}_{n} + k \times \delta_{n} } \right) $$
(3)

where k is the number of standard deviations used to identify the abnormal returns (k = 2, this number allows to generate in each case a sufficient number of detected abnormal returns); \(\overline{{R_{n} }}\) is the average size of daily returns for period n.

The following hypotheses are then tested:

H1: There is a time gap between the detection of an abnormal return day and the end of that day;

H2: There are price effects after 1-day abnormal returns;

H3: Price effects after 1-day abnormal returns have identifiable timing parameters;

H4: The detected timing parameters can be used to “beat the market”.

To test the first three hypotheses average analysis, Student’s t tests and a modified cumulative abnormal returns (CARs) approach are used. Trading simulations are carried out to test the fourth hypothesis.

The CAR algorithm involves the following steps (MacKinlay 1997). First abnormal returns are calculated:

$${AR}_{t}={R}_{t}-E({R}_{t})$$
(4)

where \({R}_{t}\) is the return at time t and \(E\left({R}_{t}\right)\) is corresponding average return computed over the whole sample period as follows:

$$E\left({R}_{t}\right)=(\frac{1}{T})\sum_{i=1}^{T}{R}_{i}$$
(5)

where \(T\) is the sample size.

Next the cumulative abnormal return (\({\mathrm{CAR}}_{i}\)) is defined:

$${\mathrm{CAR}}_{i}=\sum_{i=1}^{24}{\mathrm{AR}}_{i}$$
(6)

where i starts with 1 (the first hour of trading day) and ends with 24 (the last hour of the trading day). A day consists of 24 h.

Parametric t tests are also carried out for Hypotheses 1–3. The null hypothesis (H0) is that the data (hourly returns on the abnormal returns day and in the full sample) belong to the same population, a rejection of the null suggesting the presence of a statistical anomaly in the price behaviour on the day with abnormal returns. The test is carried out at the 95% confidence level, and the degrees of freedom are N – 1 (N being equal to N1 + N2).

Hypothesis 4 is tested by means of a trading simulation approach. This replicates the actions of traders by using appropriate algorithms for trading strategies based on the observed price patterns and timing parameters. The aim is to establish whether the detected anomalies can be exploited to generate abnormal profits. Our analysis does not incorporate transaction costs (spreads, broker or bank fees, swaps etc.), and therefore it is only a proxy for actual trading. To find working trading algorithms one would need appropriate back testing procedures, tests for robustness, etc., which are beyond the scope of the present paper. Moreover, nowadays transaction costs play a much lesser role in trading. In the case of gold the spread is only 0.02% per trade, which implies that the error in our profit estimates is around 1%. Commission fees and broker fees have essentially disappeared thanks to the high degree of competitiveness on the Internet. Further, banking fees are generally insignificant owing to the scale effect.

The percentage results for an individual deal are computed as follows:

$$\%\mathrm{ result}=\left(\frac{{P}_{\mathrm{close}}}{{P}_{\mathrm{open}}}-1\right)\times 100\%$$
(7)

where \({P}_{\mathrm{open}}\), opening price for the trade; \({P}_{\mathrm{close}}\), closing price for the trade.

The sum of the results from each trade is the total financial result of trading. A strategy producing positive total profits implies that there might be an exploitable market anomaly.

Another important indicator is the percentage of successful trades:

$$\% \mathrm{successful trades}= \frac{100\mathrm{\%}\times \mathrm{number of successful trades}}{\mathrm{overall number of trades}}$$
(8)

A percentage higher than 50% provides additional evidence that the strategy is effective.

To establish whether or not the results obtained are statistically different from the random trading ones, t tests are carried out. These compare the means from two samples to see whether or not they come from the same population. The first sample consists of the trading results from the trading strategy, and the second one of random trading results. The null hypothesis is that the mean is the same in both samples, and the alternative that it is not. The computed values of the t test are compared with the critical ones at the 5% significance level. Failure to reject the null implies that there are no advantages from following the trading strategy being considered since the trading results do not differ from the random ones, whilst a rejection suggests that the adopted strategy can generate abnormal profits since the trading results are not random.

4 Empirical results

These section discusses the empirical findings. Summary tables are included in the main body of the paper, whilst detailed results are reported in Appendices.

Concerning gold prices (see Appendices A and B), Figure A.1 shows that average returns on days with positive abnormal returns are much higher than those on normal days; these differences are statistically significant for some hours of the day (Table A.2). Similarly, average returns on days with negative abnormal returns are much lower from those on normal days (Figure A.2) and these differences are statistically significant (Table A.3). The CAR analysis (Table A.4; Figure A.3) implies that abnormal returns can be detected before the end of the day. Table 4 reports the timing parameters, which imply that anomaly appears are after 5 p.m. in the case of positive abnormal returns and after 7 p.m. in the case of negative ones.

As for price behaviour on the day after abnormal returns, average hourly gold returns after a day with positive abnormal returns are initially much lower than on normal days (Fig. B.1), and in some cases these differences are statistically significant (Table B.1), which implies the existence of a contrarian effect. The same is true of negative abnormal returns (Fig. B.2; Table B.2), namely at the start of the following day prices tend to move in the opposite direction to abnormal returns. Using the modified CAR approach specific timings for trading can be determined (Table B.3; Fig. B.3) by being aware that the contrarian effect is most pronounced at 6am in the case of positive abnormal returns and it lasts till the end of the day in the case of negative abnormal returns.

A similar analysis is carried out for oil prices (see Appendices C, D). For the day of abnormal returns the overall conclusions are the same, i.e. returns on abnormal return days are higher than those on normal days (Figs. C.1, C.2) and these differences are statistically significant in most cases (Tables C.2, C.3). The anomaly can be detected before the end of the day, and the timing parameters imply that the anomaly appears after 4 p.m. in the case of positive abnormal returns and after 7 p.m. in the case of negative ones (Table C.4). The CAR analysis shows that the momentum effect is temporary (Figs. D.1, D.2): usually it lasts for a few hours, but during this time differences between hourly returns on the day after abnormal returns and normal days are statistically significant (Tables D.1, D.2). The biggest momentum effects are observed at 9 a.m. for positive abnormal returns and at 10 a.m. for negative ones (Table D.3).

The overall results are summarised in Table 1 (for positive abnormal returns) and Table 2 (for negative abnormal returns). Full estimation results are provided in Supplementary file.

Table 1 Overall results for the case of positive abnormal returns
Table 2 Overall results for the case of negative abnormal returns

This table presents the overall results for the case of positive abnormal returns. The first column reports the parameter being considered, and the second, third and fourth columns show the results for gold and oil prices, respectively.

This table presents the overall results for the case of negative abnormal returns. The first column reports the parameter being considered, and the second, third and fourth columns show the results for gold and oil prices, respectively.

As can be seen, abnormal returns can be identified before the end of the day. This allows to exploit the momentum effect which is present in both gold and oil prices. The latter tends to continue into the first few hours of the following day. The timing parameters for both the appearance of abnormal returns and the end of the momentum effect are shown in Tables 1 and 2. In the case of Gold prices the momentum effect disappears on the following day and a contrarian effect is detected instead.

The results can be summarised as follows:

  • H1 cannot be rejected, since there is a time gap between the detection of an abnormal return day and the end of that day;

  • H2 cannot be rejected, since oil prices tend to move in the direction of abnormal returns at the start of the day and gold prices in the opposite direction;

  • H3 cannot be rejected, since specific timing parameters can be estimated both for detecting abnormal returns on the day when they occur and the time horizon of price effects on the day after abnormal returns have occurred.

On the basis of these results, the following trading strategies are designed to test Hypothesis 4:

Strategy 1: when it becomes clear that the current day is characterised by abnormal returns (see the timing of the abnormal returns parameter in Tables 1, 2) a position in their direction should be opened. This should then be closed at the end of the day.

Strategy 2: at the beginning of the day after abnormal returns have been observed a position in their direction should be opened. This should then be closed on the basis of the timing parameters for the momentum effect displayed in Tables 1 and 2. If this effect is not present, a contrarian trading strategy should be used: at the beginning of the day after abnormal returns have occurred a position in the opposite direction should be opened.

The trading simulation results for the two strategies for positive and negative abnormal returns are presented in Tables 3 and 4, respectively.

Table 3 Trading simulation results for the case of positive abnormal returns
Table 4 Trading simulation results for the case of negative abnormal returns

This table presents the trading simulation results for the case of positive abnormal returns. The first column specifies the series used; the second column shows the number of trades in units; the third column provides the number of successful trades in units; and the fourth column shows this parameter in %; the fifth column shows the profit generated by the trading strategy over the whole period in %; the sixth column shows the annual profit in %; and the seventh column provides information about the size of profit per trade; the eighth column reports the t test statistics; and the ninth column reports whether or not they imply a rejection of the null.

This table presents trading simulation results for the case of negative abnormal returns. The first column specifies the series used; the second column shows the number of trades in units; the third column provides the number of successful trades in units; and the fourth column shows this parameter in %; the fifth column shows the profit generated by the trading strategy over the whole period in %; the sixth column shows the annual profit in %; and the seventh column provides information about the size of profit per trade; the eighth column reports the t test statistics; and the ninth column reports whether or not they imply a rejection of the null.

Strategy 1 is highly profitable for both positive and negative abnormal returns. The number of successful trades on average is close to 70%, and profits are positive and significant in all cases. The t statistics imply the rejection of the null, i.e. the trading simulation results differ from the random ones. Strategy 2 (momentum for oil and contrarian for gold) is less successful, but nevertheless the number of successful trades on average is close to 60% and profits are detected in all cases. The results in the case of oil are statistically different from random trading, but they are not so in the case of gold.

On the whole there is evidence that suitably designed trading strategies based on the detected price effects and the estimated timing parameters can “beat the market”. In particular, it is possible to exploit the momentum effects lasting the whole day on days with abnormal returns. It appears that, although the price effects caused by 1-day abnormal returns are generally short-lived, even the few hours they last are sufficient to generate extra profits from trading. These results are consistent with the previous ones reported by Caporale and Plastun (2020a, b) for both cryptocurrencies and other currencies. Daily abnormal returns generate specific patterns in price behaviour. On the day of abnormal returns there is a strong momentum effect which lasts till the end of the day. On the day after a momentum effect can be detected in the first few hours in the case of oil prices and a contrarian effect in the case of gold prices. These patterns provide an opportunity for suitably designed trading strategies to generate abnormal profits, as shown by the trading simulation. This is clearly inconsistent with the EMH.

5 Conclusions

This paper examines price (momentum and contrarian) effects in the gold and oil commodity markets in the presence of 1-day abnormal returns using a number of statistical methods (average analysis, t tests, CAR and trading simulation approaches). We find a momentum effect on the days with abnormal returns; further, the timing parameters imply that abnormal returns can be detected before the end of the day. Price effects are also detected on the following day, specifically a momentum effect in the case of oil prices and a contrarian effect in the case of gold prices. Normally these effects are short-lived and specific timing parameters can be estimated. Further, they give rise to exploitable profit opportunities. A trading simulation approach provides evidence of the profitability of appropriate strategies in the case of both gold and oil prices. The implication is that in these markets the EMH does not hold.

These findings are of interest to both academics whose aim is to establish whether or not markets can be characterised as being efficient, and to investors and traders aiming to maximise their profits and shed new light on two commodity markets (gold and oil) for whom the presence of anomalies and of possibly profitable trading strategies based on them had not been previously analysed.