The strategy buys the S&P 500 five days before the US elections and holds until election day close, treating both Congressional and presidential elections similarly, capitalizing on market behavior around election periods.

I. STRATEGY IN A NUTSHELL

The strategy involves buying the S&P 500 (via ETF, CFD, etc.) at market close five days before the US elections and holding until election day close. The US holds two types of federal elections: Congressional elections every even year and presidential elections every four years. The strategy treats both events the same. Election day is set by US law as the Tuesday after the first Monday in November, meaning it always falls between November 2 and 8 of every even year. This simple trading approach capitalizes on historical market behavior around elections.

II. ECONOMIC RATIONALE

The strategy of buying the S&P 500 five days before US elections and holding until election day close is based on an observed anomaly with significant returns. From 1950 to 2018, during 35 election periods, the strategy’s average performance ranged from -2.47% to 10.79%. This volatility is not unique to the US; similar patterns are observed in other developed nations. Research by Białkowski, Gottschalk, and Wisniewski in their paper “Stock market volatility around national elections” analyzed stock market volatility around elections in OECD countries, reinforcing the significance of this phenomenon.

III. SOURCE PAPER

Pre-Election Drift in the Stock market [Click to Open PDF]

Radovan Vojtko, Dominik Cisár

<Abstract>

A particular event like elections are making lots of noise, but not only in our regular life where we should participate and so vote for our preferred candidate/party. This process also impacts financial markets. The uncertainty, which implies from the result of the elections, affects the volatility of the financial markets, which can easily double. In this paper, we were focused only on one specific market where we were seeking any pattern which could be profitable by assembling an investment strategy on it. Analyzing the stock market of the United States, where the elections occur on the exact day every even year, we found a specific pattern in the days before elections. This positive drift starts as soon as the fifth day before the election’s day and ends at the end of the election’s day with almost 2,5 % performance on average. An additional advantage of this pre-election pattern is its independence from the elections results even it is tied to elections. Last years showed us bigger market moves around elections due to increased uncertainty caused by political reasons which aren’t receding nowadays. Therefore, the period before elections could be more profitable regardless of the result of the elections.

IV. BACKTEST PERFORMANCE

Annualised Return2.46%
VolatilityN/A
Beta0.023
Sharpe RatioN/A
Sortino Ratio-0.133
Maximum DrawdownN/A
Win Rate62%

V. FULL PYTHON CODE

from pandas.tseries.offsets import BDay
from AlgorithmImports import *
from dateutil.relativedelta import relativedelta, MO
class PreElectionDriftStockMarket(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2000, 1, 1)
        self.set_cash(100_000)
        
        self.symbol: Symbol = self.add_equity("SPY", Resolution.MINUTE).symbol
    def on_data(self, data: Slice) -> None:
        if self.time.year % 2 == 0:
            election_day: datetime.date = ((date(self.time.year, 11, 1) + relativedelta(weekday=MO(1))) + BDay(1)).date()
            
            # This condition make sure, that we invest into market six business days before election day
            # and position will be open right after hurricane Sandy, when market is open.
            if self.time.date() >= (election_day - BDay(6)).date() and self.time.date() < election_day and not self.portfolio[self.symbol].invested:
                self.set_holdings(self.symbol, 1)
                
            # Liquidate.
            elif self.time.date() == election_day:
                if self.portfolio[self.symbol].invested:
                    self.liquidate(self.symbol)

VI. Backtest Performance

Leave a Reply

Discover more from Quant Buffet

Subscribe now to keep reading and get access to the full archive.

Continue reading