Backtest Period
2002-2016
Markets Traded
Equities
Maximum Drawdown
Period of Rebalancing
Daily
Return (Annual)
25%
Sharpe Ratio
Standard Deviation (Annual)
Original paper
SSRN-id3026910.pdf1299.3KB
Trading rules
- Investment Universe: CRSP Equally-Weighted Index (or S&P500 Index as an alternative)
- Data Source: Box Office Mojo for box office earnings
- Calculate daily box office earnings change over a season average (5 movie seasons per year: Winter, Spring, Summer, Fall, Holiday)
- Define Changebox: (Total daily box office earnings on day d - Same day season’s average) / Same day season’s average
- Practical Changebox: (Total daily box office earnings on day d - Total daily box office earnings on day d-7) / Total daily box office earnings on day d-7
- Long Position: Enter at end of day d if Changebox growth > 15%
- Short Position: Enter at end of day d if Changebox growth ≤ 15%
Python code
Backtrader
import backtrader as bt
class BoxOfficeStrategy(bt.Strategy):
def __init__(self):
self.box_office = self.datas[0].close # Replace with box office data source
self.changebox = bt.indicators.SimpleMovingAverage(self.box_office, period=7)
def next(self):
current_box_office = self.box_office[0]
previous_box_office = self.box_office[-7]
changebox_growth = (current_box_office - previous_box_office) / previous_box_office
if changebox_growth > 0.15:
self.buy()
elif changebox_growth <= 0.15:
self.sell()
if __name__ == '__main__':
cerebro = bt.Cerebro()
data = bt.feeds.YahooFinanceData(dataname='SPY', fromdate='2000-01-01', todate='2021-12-31') # Replace with CRSP data source
cerebro.adddata(data)
cerebro.addstrategy(BoxOfficeStrategy)
cerebro.run()
Please note that this code is a template and you will need to replace the data sources for both the box office earnings and the CRSP Equally-Weighted Index (or S&P500 Index) with the appropriate data sources. The provided code uses Yahoo Finance data for S&P500 Index, and you should replace it with the correct CRSP data source. The box office data source is also not provided and should be replaced with the correct data source from Box Office Mojo.