Halloween Effect During the Mid-Term Election Year
Log in to collectAcademic paper
Kam Fong Chan; Terry A. Marsh
- Research Network (United States)
- University of Western Australia
- ?Financial Research Network (FIRN)
- ?The University of Western Australia
- ?Quantal International Inc
https://papers.ssrn.com/sol3/papers2.cfm?abstract_id=2903067
Strategy in a nutshell
The strategy invests in Dow Jones stocks during mid-term election years, buying in December and holding until April, while remaining capital stays in cash. It leverages historically favorable returns in this election-cycle period.
Economic rationale
Higher returns during this period are linked to economic policy uncertainty, which peaks after mid-term elections. Other factors like volatility, production cycles, and psychological effects play a minor role, with EPU trends being the main driver.
Backtest performance
Annualised return13.24%
Beta0.109
Sortino ratio-0.232
Win rate67%
Full Python code
from pandas.tseries.offsets import BDay
from AlgorithmImports import *
class HalloweenEffectCombinedWithElectinCycle(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(1999, 1, 1)
self.set_cash(100_000)
self.market: Symbol = self.add_equity("SPY", Resolution.DAILY).symbol
self.cash: Symbol = self.add_equity("SHY", Resolution.DAILY).symbol
self.current_year: int = -1
self.count_years: int = 1 # At the start of this strategy it will increase this value by one.
def on_data(self, slice: Slice) -> None:
if self.current_year != self.time.year:
self.current_year = self.time.year
self.count_years += 1
# The investor buys these stocks at the beginning of December and holds them until the end of April.
if self.count_years == 2 and self.time.month == 12 and not self.portfolio.invested:
self.set_holdings(self.market, 0.5)
self.set_holdings(self.cash, 0.5)
self.count_years = 0
# Holds them until the end of April.
if (self.time.date() + BDay(1)).month == 5 and self.portfolio.invested:
self.liquidate()