Quant BuffetRelax, Not Over Thinking

Shorting Stocks During the Last Hour of Month

Log in to collect

Academic paper

Turn-of-the-Month: Window Dressing Behavior

AuthorsLena Nord Nilsson

Institute
  • Institut de Mécanique et d'Ingénierie
  • ?NilssonHedge.com

Strategy in a nutshell

This strategy shorts S&P 500 or small-cap index futures from 3 PM to 4 PM EST on the last trading day of each month, then closes positions. Leverage can be applied to enhance returns.

Economic rationale

Month-end window-dressing by institutions often creates predictable bearish pressure during the last trading hour. Small-cap indices are easier to influence, potentially yielding stronger shorting outcomes than large-cap indices.

Backtest performance

Annualised return1.8%
Beta-0.034
Sortino ratio-0.186
Win rate56%

Full Python code

from AlgorithmImports import *
class ShortingStocks(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2002, 1, 1)
self.SetCash(100000)
self.symbol = self.AddEquity("SPY", Resolution.Minute).Symbol

self.Schedule.On(self.DateRules.MonthEnd(self.symbol), self.TimeRules.At(15, 0), self.Open)
self.Schedule.On(self.DateRules.MonthEnd(self.symbol), self.TimeRules.BeforeMarketClose(self.symbol, 1), self.Close)

def Open(self):
if not self.Portfolio[self.symbol].IsShort:
    self.SetHoldings(self.symbol, -1)

def Close(self):
if self.Portfolio[self.symbol].IsShort:
    self.Liquidate(self.symbol)