Quant BuffetRelax, Not Over Thinking

Overnight-Intraday Weekly Reversal in Currency Futures

Log in to collect

Strategy in a nutshell

The strategy targets 9 major currency futures, such as the Australian dollar, British pound, and others, using open and close prices from TickData.

Formation period: Identify Friday close to Monday open winners and losers.

Portfolio construction: Go long losers and short winners to form a zero-investment portfolio.

Weighting: Currency futures positions are weighted using formulas specified in the

Economic rationale

Investor overreaction → Sharp price moves around market closures often reverse.

Low liquidity periods → Weekends/overnight sessions heighten uncertainty and volatility.

Hedging demands → As in Hong and Wang (2000), position shifts around closures drive reversals.

Nagel (2012) shows CO-OC reversals are stronger in futures than equities, enhancing profitability in currency markets.

III. SOURCE PAPER

Market Closure and Short-Term Reversal [Click to Open PDF]

Corte, Kosowski, Wang

A strategy that buys securities with low past overnight returns and sells securities with high past overnight returns generates sizeable out-of-sample intraday returns and Sharpe ratios in all major asset classes. This strategy, labeled as overnight-intraday reversal, delivers an average return that is about two to five times larger than those generated by the conventional reversal strategy. Investor heterogeneity, sentiment, market uncertainty and market-wide illiquidity fail to explain this overnight-intraday reversal return. Our findings are consistent with an asset class-specific market maker liquidity provision mechanism, and we find that cross-sectional return dispersion can predict the strategy returns in every asset class. A global two-factor model, consisting of the market and overnight-intraday reversal factor, well explains the intraday return variation of diversified portfolios across asset classes.

Backtest performance

Annualised return9.18%
Volatility11.17%
Beta0.01
Sharpe ratio0.82
Sortino ratio-0.472
Win rate50%

Full Python code

from AlgorithmImports import *
class OvernightIntradayWeeklyReversalCurrency(QCAlgorithm):
def Initialize(self):
 self.SetStartDate(2000, 1, 1)
 self.SetCash(100000)
 
 self.symbols = [
                 "CME_AD1", # Australian Dollar Futures, Continuous Contract #1
                 "CME_BP1", # British Pound Futures, Continuous Contract #1
                 "CME_CD1", # Canadian Dollar Futures, Continuous Contract #1
                 "CME_EC1", # Euro FX Futures, Continuous Contract #1
                 "CME_JY1", # Japanese Yen Futures, Continuous Contract #1
                 "CME_MP1", # Mexican Peso Futures, Continuous Contract #1
                 "CME_NE1", # New Zealand Dollar Futures, Continuous Contract #1
                 "CME_SF1"  # Swiss Franc Futures, Continuous Contract #1
                 ]
 
 self.friday_close = {}
 self.leverage = 1
 
 for symbol in self.symbols:
     data = self.AddData(QuantpediaFutures, symbol, Resolution.Daily)
     data.SetFeeModel(CustomFeeModel())
     data.SetLeverage(5)
     self.friday_close[symbol] = 0
     
def OnData(self, data):
 # Saturday -> Friday close available
 if self.Time.date().weekday() == 5:
     for symbol in self.symbols:
         if symbol in data and data[symbol]:
             price = data[symbol].Value
             if price != 0:
                 self.friday_close[symbol] = price
             
     self.Liquidate()
 # Tuesday -> Monday close available
 elif self.Time.date().weekday() == 1:
     returns = {}
     
     for symbol in self.symbols:
         # Check if data is still coming.
         if self.securities[symbol].get_last_data() and self.time.date() > QuantpediaFutures.get_last_update_date()[symbol]:
             self.liquidate(symbol)
             continue
         if symbol in data and data[symbol]:
             price = data[symbol].Value
             if price != 0 and symbol in self.friday_close and self.friday_close[symbol] != 0:
                 returns[symbol] = price / self.friday_close[symbol] - 1
     
     self.friday_close.clear()
     if len(returns) == 0: 
         return
     
     ret_mean = np.mean([x[1] for x in returns.items()])
     
     weight = {}
     N = len(returns)
     for symbol in returns:
         weight[symbol] = -(1/N) * (returns[symbol] - ret_mean) * 100

     for symbol in weight:
         self.SetHoldings(symbol, self.leverage * weight[symbol])
# Quantpedia data.
# NOTE: IMPORTANT: Data order must be ascending (datewise)
class QuantpediaFutures(PythonData):
_last_update_date:Dict[Symbol, datetime.date] = {}
@staticmethod
def get_last_update_date() -> Dict[Symbol, datetime.date]:
return QuantpediaFutures._last_update_date
def GetSource(self, config, date, isLiveMode):
 return SubscriptionDataSource("data.quantpedia.com/backtesting_data/futures/{0}.csv".format(config.Symbol.Value), SubscriptionTransportMedium.RemoteFile, FileFormat.Csv)
def Reader(self, config, line, date, isLiveMode):
 data = QuantpediaFutures()
 data.Symbol = config.Symbol
 
 if not line[0].isdigit(): return None
 split = line.split(';')
 
 data.Time = datetime.strptime(split[0], "%d.%m.%Y") + timedelta(days=1)
 data['back_adjusted'] = float(split[1])
 data['spliced'] = float(split[2])
 data.Value = float(split[1])
 if config.Symbol.Value not in QuantpediaFutures._last_update_date:
     QuantpediaFutures._last_update_date[config.Symbol.Value] = datetime(1,1,1).date()
 if data.Time.date() > QuantpediaFutures._last_update_date[config.Symbol.Value]:
     QuantpediaFutures._last_update_date[config.Symbol.Value] = data.Time.date()
     
 return data
# Custom fee model.
class CustomFeeModel(FeeModel):
def GetOrderFee(self, parameters):
 fee = parameters.Security.Price * parameters.Order.AbsoluteQuantity * 0.00005
 return OrderFee(CashAmount(fee, "USD"))