Intraday Anomalies and Market Efficiency: A Trading Robot Analysis

One of the leading criticisms of the Efficient Market Hypothesis (EMH) is the presence of so-called “anomalies”, i.e. empirical evidence of abnormal behaviour of asset prices which is inconsistent with market efficiency. However, most studies do not take into account transaction costs. Their existence implies that in fact traders might not be able to make abnormal profits. This paper examines whether or not anomalies such as intraday or time of the day effects give rise to exploitable profit opportunities by replicating the actions of traders. Specifically, the analysis is based on a trading robot which simulates their behaviour, and incorporates variable transaction costs (spreads). The results suggest that trading strategies aimed at exploiting daily patterns do not generate extra profits. Further, there are no significant differences between sub-periods (2005-2006 – “normal”, 2007-2009 – “crisis”, 2010-2011 – “post-crisis).


Introduction
The Efficient Market Hypothesis (EMH) has been highly criticised during the last twenty years, especially on the basis of empirical evidence suggesting the presence of so-called "anomalies", i.e. abnormal behaviour of asset prices which is seen as inconsistent with market efficiency.
One of the best known anomalies is the presence of intraday patterns, i.e. more intensive trading at the beginning and the end of the trading day combined with higher price volatility (Admati and Pfleiderer, 1988). For example, Wood et al. (1985) reported that all positive returns are earned during the first thirty minutes and at the market close. Harris (1986) showed that prices and last trades tend to be up during the first 45 minutes of trading sessions (all days except Monday). Such patterns were also mentioned by Thaler (1987) and Levy (2002). Strawinski and Slepaczuk (2008) found evidence of intraday patterns in the Warsaw Stock Exchange as well.
The main limitation of the above mentioned studies is that they neglect transaction costs: incorporating spreads, commissions and other fees and payments connected with the trading process can change the picture dramatically. Specifically, it can become clear that some of these "anomalies" cannot in fact be exploited, i.e. profitable trading is not possible, and this inability to obtain extra profits is fully consistent with the EMH.
The present study examines intraday patterns using a trading robot which simulates the actions of the trader and incorporates some transaction costs (spreads) into the analysis.
The aim is to show that, as mentioned above, the presence of anomalies by itself does not necessarily represent evidence of market inefficiency, since it might not be possible to exploit them in practice. We analyse both a mature and an emerging stock market, namely 27 US companies included in the Dow Jones index, as well as 8 Blue-chip Russian companies. Further, we examine different sub-periods (2005-2006 -"normal"; 2007-2009 -"crisis"; 2010-2011 -"post-crisis") to establish whether there is evidence of changing behaviour depending on the phase of the economic cycle.
The remainder of the paper is structured as follows: Section 2 briefly reviews the literature on the efficient market hypothesis and market anomalies. Section 3 explains the method used for the analysis. Section 4 presents the empirical results. Section 5 offers some concluding remarks.

Literature Review
The EMH was initially formulated by Fama (1965), who argued that in an efficient market prices should fully reflect the available information and be unpredictable (see also Samuelson, 1965). Fama (1970) then defined three forms of market efficiency (weak, semistrong and strong). This theory has been used for the valuation of financial assets in terms of risk and uncertainty, and for devising portfolio strategies (see, inter alia, Sharpe, 1965;Lintner, 1965;Mossin, 1966, andTreynor, 1962). In the 1980's, it was highly criticized as overlooking transaction costs, information asymmetry (Grossman and Stiglitz, 1980), irrational behaviour etc. As a result many alternative theories and approaches were developed (behavioural finance, the adaptive market hypothesis, the fractal market hypothesis, etc.).
The main implication of the EMH is that traders should not be able to "beat" the market and make abnormal profits. An extensive literature analyses whether instead there exist market anomalies that can be exploited through appropriate trading strategies. This term was first used by Kuhn (1970). Schwert (2003) is an example of a study providing evidence of abnormalities which are inconsistent with asset pricing theories. Shiller (2000) and Akerlof and Shiller (2009) take the view that there are deep reasons for the presence of anomalies in financial markets, namely irrational behaviour of investors (animal spirits, the herd instinct, mass psychosis, mass panic), which is inconsistent with the EMH paradigm. Jensen (1978) argued that anomalies can only be considered statistically significant when they generate excess returns. Raghubir and Das (1999) classify them as follows: -Anomalies related to prices and returns (contrarian trading, value investing, the size effect, momentum effect, the effect of closed-end funds); -Anomalies associated with trading volume and volatility (panic, bubbles on the markets); -Anomalies associated with the time series (the M&A effect, the IPO effect); -Other anomalies.
Jacobsen, Mamun and Vyshaltanachoty (2005)   Harris (1986) and Thaler (1987) examined 15-minute intervals in asset prices movement to identify patterns in (the volatility of) returns (see also Levy, 2002, andDimson, 1988). Harris (1986) found a time of the day anomaly in the first 45 minutes of a trading session of all days of the week except Monday and at the end of a trading day (approximately the last 5 minutes of the session). In his study of the Spanish stock market, Camino (1996) found positive returns in the first hour of the trading session in all trading days except Monday and Wednesday, and a strong tendency for prices to rise in the first and last 15-minute periods of trading (see also Coroneo and Veredas, 2006). Wood, McInish and Ord (1985) reported jumps at the opening and closing of trading. Brooks, Hinich, Patterson (2003) found higher trading volumes in the NYSE at the beginning and the end of the day.
The possibility of using the U-shaped pattern by market participants to build trading strategies was emphasized by Abhyankar, Ghosh, Levin and Limmack (1997). The same pattern was found with respect to trading volume, return volatility and liquidity profile by Tissaoui (2012) in the Tunisian Stock Exchange. Table 1 gives details of additional relevant studies.

Data and Methodology
Although most studies suggest the presence of anomalies in the first 45 minutes (or first hour) of the trading session, their results differ in terms of the exact time when the end-of-the-day anomaly emerges: the last transaction, the last 5 minutes, the last 15 minutes, the last hour. Chan (2005) reported that the overall average returns per minute in the Hong Kong stock market (over the last 30 min, over the last 10 min, over the last 5 min, and over the last 1 min) are statistically positive. However, the majority of studies consider 15-minute intervals. Since the empirical literature does not provide clear evidence on intraday effects on specific weekdays (see, e.g., Strawinski andSlepaczuk, 2008, andHarris, 1989), and since it is difficult to distinguish between time of the day and day of the week effects, we focus specifically on the last 15 minutes before the end of the trading session (see Levy, 2002).
We look at the intraday anomaly from the trader's viewpoint: is it possible to make profits from trading on intraday patterns (which would indicate market inefficiency)? In particular, we test the following hypotheses: For Russia, owing to lack of data, the analysis is carried out only for the period 2011-

2013.
Most studies on intraday anomalies do not incorporate transaction costs, even though trading is inevitably connected with spreads, fees and commissions to brokers. These costs can be divided into fixed and variable ones. The latter are present in each transaction. A typical example is the spread, which is incorporated into our analysis. Specifically, we programme a trading robot which automatically opens and closes positions according to the time of the day effect. Positions (in our case only the "long" ones) will be opened on "ask" price and closed on "bid" price, though we will incorporate the variable part of transactional costs in our analysis. The algorithm is constructed such that long positions are opened at the beginning of the trading session and are closed after 45 minutes (the first 45 minutes up effect mentioned by Harris, 1986, andLevy, 2002), and are also opened at the end of the day. As we consider 15-minute intervals, they are opened in the last 15 minutes of the trading session and are closed at the end of the session (the last 15 minutes of the day up effect mentioned by Levy, 2002). To test this algorithm (trading strategy) on historical data we use a MetaTrader trading platform which provides tools for replicating price dynamics and trades according to the trading strategy.
Positive profits > 50% imply that H1 and H2 cannot be rejected. As for H3, we carry out t-tests: H3 is rejected if t < tcritical.

Empirical Results
The testing procedure comprises two steps, i.e. initially testing the first 45 minutes up effect, and then the last 15 minutes up effect.
The complete results for the former are presented in Appendix A. A summary for different time periods is shown in Table 1a.  Table 1c shows that H3 is not rejected for net profit per deal in any of the sub-periods.   The t-tests for H3 for different sub periods are displayed in Table 2b: this hypothesis cannot be rejected, and this applies to all sub-periods.  Table 2c shows that H3 is rejected for net profit per deal. There is no evidence of differences between sub-periods. The complete results for Russia are presented in Appendix C. A summary is provided in Table 3: H1b and H2b are rejected again, indicating the absence of the intraday anomaly being considered in a less developed market as well.

Conclusions
The empirical relevance of the EMH has been called into question by many studies finding evidence of so-called anomalies seemingly giving agents the opportunity to make abnormal profits. This paper argues that the presence of anomalies does not necessarily represent evidence of market inefficiency (risk-free profit opportunities): using a trading robot simulating the actions of a trader we show in the case of intraday patterns that, if transaction costs are taken into account, there are no profitable trading strategies (i.e. opportunities to make abnormal profits exploiting this type of anomaly), and therefore no evidence against the EMH.
Specifically, we consider a well-known "time of the day anomaly": prices tend to be up during the first 45 minutes and the last 15 minutes of the trading session.
We test 3 hypotheses: On the whole, our analysis implies that it is not possible to exploit intraday patterns to make abnormal profits. This suggests that the results from previous studies purporting to provide evidence of exploitable profit opportunities resulting from market anomalies (which would be inconsistent with the EMH) were in fact misleading because they did not take into account transaction costs. The trading robot approach used in the present study can also be used to analyse other anomalies, but this is left for future work.