Backtest Period
1970-2003
Markets Traded
Equities
Maximum Drawdown
Period of Rebalancing
6 Months
Return (Annual)
8.6%
Sharpe Ratio
Standard Deviation (Annual)
Original paper
SSRN-id1949419.pdf746.7KB
Trading rules
- Invest in global equity markets from November to April
- Hold cash or alternative assets from May to October
- Optionally, invest in northern hemisphere stocks during winter and southern hemisphere stocks during summer
- Alternatively, go long on cyclical companies in winter and short defensive stocks, then switch positions in summer
Python code
Backtrader
import backtrader as bt
class SeasonalStrategy(bt.Strategy):
params = (
('northern_hemisphere', None),
('southern_hemisphere', None),
('cyclical_companies', None),
('defensive_stocks', None),
)
def __init__(self):
self.month = self.datas[0].datetime.date(0).month
def next(self):
self.month = self.datas[0].datetime.date(0).month
if 11 <= self.month <= 4: # November to April
if self.params.northern_hemisphere and self.params.southern_hemisphere:
self.order_target_percent(self.params.northern_hemisphere, target=0.5)
self.order_target_percent(self.params.southern_hemisphere, target=0.0)
elif self.params.cyclical_companies and self.params.defensive_stocks:
self.order_target_percent(self.params.cyclical_companies, target=1.0)
self.order_target_percent(self.params.defensive_stocks, target=-1.0)
else:
self.order_target_percent(self.data, target=1.0)
else: # May to October
if self.params.northern_hemisphere and self.params.southern_hemisphere:
self.order_target_percent(self.params.northern_hemisphere, target=0.0)
self.order_target_percent(self.params.southern_hemisphere, target=0.5)
elif self.params.cyclical_companies and self.params.defensive_stocks:
self.order_target_percent(self.params.cyclical_companies, target=-1.0)
self.order_target_percent(self.params.defensive_stocks, target=1.0)
else:
self.order_target_percent(self.data, target=0.0)