Dangers of Relying on OHLC Prices – the Case of Overnight Drift in GDX ETF

Introduction

Can we truly rely on the opening price in OHLC data for backtesting? While the overnight drift effect is well-documented in a lot of asset classes, we investigated its presence in gold using the GLD ETF and then extended our analysis to the GDX – Gold Miners ETF, where we observed an unusually strong overnight return exceeding 30% annualized. However, when we tested execution at 9:31 AM using 1-minute data, the anomaly diminished significantly, suggesting that the extreme return was partially a data artifact. This finding highlights the risks of blindly trusting OHLC open prices and underscores the need for higher-frequency data to validate execution assumptions.

Background

The overnight effect and drift in quantitative finance refer to the phenomenon where stock returns during non-trading hours, particularly overnight, exhibit significant patterns that differ from those observed during trading hours. The overnight effect refers to the tendency of stock returns to exhibit substantial movements during the night, often influenced by market dynamics and investor sentiment.

One of the more recent papers in this domain is “The Cross-Section of Intraday and Overnight Returns” by Vincent Bogousslavsky (2021). This influential work investigates the patterns of intraday and overnight returns and their implications for asset pricing models, providing valuable insights into the behavior of financial markets during non-trading hours.

The paper “Overnight Drift” by Boyarchenko, Larsen, and Whelan (2023) also explores this interesting effect. The main finding is that U.S. equity returns are notably positive during the opening hours of European markets, driven by order imbalances from the previous trading day. Market sell-offs lead to strong overnight reversals, while rallies result in modest reversals, indicating an asymmetric response to demand shocks.

We at Quantpedia explored this effect substantially, too, and discovered an overnight effect on Bitcoin returns and high-yield ETF returns. By building on this papers we aim to extend the understanding of overnight strategies and price drifts, offering new perspectives and leveraging the established SPY drift paradigm and extending it to the commodities asset class that gold (and gold mining stocks) ETFs represent.

Data

We originally sourced our data from finance.yahoo.com, making necessary adjustments for dividends. We examined the close-to-open and open-to-close price movements, which gave us a clear view of the overnight and intraday drifts.

Results

Gold ETF

As mentioned earlier, we analyzed GLD’s overnight, intraday, and total performance using historical data from Yahoo Finance. Our analysis reveals that a significant portion of GLD’s performance occurs overnight. The GLD ETF’s intraday performance over the last 20 years is negligible. These findings are in line with the price action happening in the other asset classes we mentioned before (individual stocks, equity indices, cryptocurrencies, or high-yield ETFs).

However, as gold is a commodity, there exist companies specializing in the process of extracting this gold from the Earth’s crust (yes, we are speaking about gold miners). Therefore, we can bridge equity and commodity markets, by buying ETFs which invest in such stocks, like GDX (VanEck Gold Miners ETF). In theory, this convergent asset should give us the potential for combined overnight drift effects and higher profits, right?

Let’s explore that.

Gold Miners ETF

Following the same approach, we performed the same procedure using GDX OHLC (open, high, low, close) data. Our analysis reveals a significant overnight drift of approximately 30% per annum (p.a.), contrasted by a substantial negative intraday drift of about -25% per annum. These findings prompt a logical trading strategy: iteratively purchasing at market open and shorting at market close. Theoretically, this approach could yield significant returns over time.

Wow, we could get rich quick here! Or not? Well, actually, from the experience, this looks to good to be true. We need to investigate the underlying problem.

From our experience, the problem is usually hidden in the opening prices of the OHLC datasets. Notably, the opening price is derived from the first trade rather than the MOO (Market-on-Open) auction results, leading to significant discrepancies between anticipated and actual opening prices as one is unable to even closely approach getting fills in that price region, not speaking about volumes traded at that prices which must be minuscule. This is common problem when using the OHLC data. The close prices are usually achievable in reality by trading (buying/selling) close to the end of the trading session or participating in the closing auction via MOC (Market-on-Close) orders. Historically, closing prices on financial platforms such as Yahoo Finance usually align with MOC auction prices.

While executing at the close typically presents no issues for opening prices, the reality is often very different. Therefore, our usual next step is always to revert to testing anomalies and effects with better data granularity (minute-by-minute bars, second-by-second bars, or tick data). Therefore, let’s try to adjust the execution of the sell signal from 9:30 AM to 9:31 AM. One minute should not make a difference, right? For that, we transitioned to the QuantConnect environment as intraday TOC (Time-of-Change) data are necessary.

SPY and GDX Overnight Effects Evaluation

Let’s move to evaluate the performance of overnight trading strategies using

  • SPDR S&P 500 ETF (SPY) and
  • VanEck Vectors Gold Miners ETF (GDX).

It focuses on execution timing, namely

  • Market-on-Open (MOO), vs.
  • a specific intraday execution at 9:31 AM.

Various Scenarios

  • SPY Trading Strategy:

    • Scenario 1: SPY, buy MOC, sell MOO.

    • Scenario 2: SPY, buy MOC, sell 9:31.

  • GDX Trading Strategy:

    • Scenario 1: GDX, buy MOC, sell MOO.

    • Scenario 2: GDX, buy MOC, sell 9:31.

SPY

Scenario 1

Scenario 2

Our backtest results show only slight differences between executing at the open price and the specific intraday time of 9:31 AM, with the latter showing a little less profit. The overnight effect is well and alive. Yes, there is a slight decrease in performance if you execute a sell order at 9:31 AM (compared to the hypothetical execution at 9:30), but the decrease is small, and the effect is still present as a significant part of the SPY total return over the last years is registered over the night session, and it doesn’t matter a lot if that night session ends at 9.30 or 9.31.

GDX

Scenario 1

Backtest results exhibit highly unrealistic, extreme numbers.

Scenario 2

On the other hand, our backtests on the GDX ETF can’t be more different. The backtest using the OHLC data also shows absolutely unrealistic performance, approximately 30% per annum, for the overnight drift strategy. On the other hand, the second scenario, in which the sell signal is executed at 9:31 AM, yields a significantly more realistic outcome. The performance of the GDX overnight strategy (before fees and slippage) is 8,58% per annum, with a -40,7% maximum drawdown and 16.9% volatility. Yes, the overnight drift in GDX prices is definitely there, too. However, the magnitude of the effect is not as high as the analysis using the OHLC data hinted.

Discussion & Conclusion

The overnight drift indicates a notable pattern where most of the asset’s performance is driven by overnight movements. This finding aligns with our observations in other asset classes, suggesting a broader applicability of overnight drift phenomena. In addition to elucidating the overnight drift in traditional asset classes such as equities, our investigation underscores the critical importance of robust methodological scrutiny in backtesting trading strategies. Specifically, the pronounced discrepancies observed between theoretically derived and practically executable prices highlight potential pitfalls in the naive application of OHLC data.

The discrepancy in backtest performance for GDX is attributed to the methodology used to report open prices (open prices) in OHLC data. It is impractical to expect execution at the reported open prices. Therefore, rigorous attention should be paid when developing strategies that presume execution at open prices. It is advisable to conduct robustness tests and verify performance with intraday execution prices, such as those at 9:31 AM, to ensure more reliable results.

Author: Cyril Dujava, Quant Analyst, Quantpedia


Are you looking for more strategies to read about? Sign up for our newsletter or visit our Blog or Screener.

Do you want to learn more about Quantpedia Premium service? Check how Quantpedia works, our mission and Premium pricing offer.

Do you want to learn more about Quantpedia Pro service? Check its description, watch videos, review reporting capabilities and visit our pricing offer.

Are you looking for historical data or backtesting platforms? Check our list of Algo Trading Discounts.


Or follow us on:

Facebook Group, Facebook Page, Twitter, Linkedin, Medium or Youtube

Share onRefer to a friend
Subscription Form

Subscribe for Newsletter

 Be first to know, when we publish new content
logo
The Encyclopedia of Quantitative Trading Strategies

Log in

GET NOW
TAKE OUR SURVEY AND HAVE A 10% DISCOUNT!
AND HAVE A 10% DISCOUNT!
TAKE OUR SURVEY
GET NOW
SUBSCRIBE TO NEWSLETTER AND GET:
- bi-weekly research insights -
- tips on new trading strategies -
- notifications about offers & promos -
Subscribe