Quant Buffet放轻松,别过度思虑

中期选举年份的万圣节效应

登录后收藏

学术论文

No Matter the Winning Presidential Candidate, Buying at Halloween and Selling in Mayy Has Been Attractive for Equities in Pre-Election Years, with the Opposite for Treasuries

作者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

策略概要

该策略专注于道琼斯工业平均指数的股票,可通过ETF、基金或期货轻松获取。在中期选举年的每年12月初,投资者买入这些股票,并持有至4月底。在中期选举周期的剩余月份,资金投资于现金市场。业绩不包括现金收益,提供了一种直接的方法,利用中期选举周期中历史上有利的时期。

II. 策略合理性

中期选举年冬季股票回报的功能可能源于多种因素。较高的已实现波动率、市场流动性和罕见的黑天鹅事件都是潜在原因,但发生频率较低。其他解释包括生产周期、农业模式和季节性情感障碍(SAD)等心理效应。然而,南半球市场缺乏反向趋势对这些理论提出了挑战。一个更有力的解释与经济政策不确定性(EPU)指数有关,该指数在中期选举后的五个月内达到峰值,从而推动了这一时期较高的股票回报。这使股票表现与经济政策不确定性趋势保持一致。

回测表现

索提诺比率-0.232
胜率67%

完整 Python 代码

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()