The well-known stock market adage "sell in May and go away" arose from long-term stock market seasonality in major financial markets around the globe. Kamastra, Kramer and Levy (2003) present evidence that Seasonal Affective Disorder causes this seasonality, as this condition has a profound effect on people’s mood and makes people increasingly risk averse as daylight diminishes with the onset of winter. In this paper, we present evidence that change in market mood is reflected in the prospect statement in the news text. We employ a text-mining technique to analyze a large quantity of newspaper articles for the period 1986–2010 and created our market mood proxy. We find investor psychology is skewed to optimism in the first half of the calendar year and pessimism in the latter. We also find that semi-annual mood fluctuation is synchronous with market seasonality.
Keywords: Seasonality, Textual Analysis, Anomaly, Support Vector Machine, Market Psychology, Sell in May, Big Data
- Allocate funds to international stock markets between November and April.
- Transition to cash or other asset types from May through October.
- Optionally, invest in northern hemisphere stocks during winter and southern hemisphere stocks during summer
- Another approach: Take long positions in cyclical firms during winter months and short positions in defensive ones, then invert the positions come summer.
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.datetime.date(0).month def next(self): self.month = self.datas.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)