The previous backtest indicated that Japan might be a promising market for the dead-cat-drop strategy. In this notebook, we add commissions to the Japan strategy and run a backtest to see the out-of-sample performance and the impact of commissions.
The dead-cat-drop.py
file contains a commission class for Japanese stocks (JapanStockTieredCommission
), but it is not associated with the dead-cat-drop-japan
strategy. To model commissions, assign the commission class to the COMMISSION_CLASS
attribute of dead-cat-drop-japan
, as shown below:
class DeadCatDropJapan(DeadCatDrop):
CODE = "dead-cat-drop-japan"
...
COMMISSION_CLASS = JapanStockTieredCommission
Next, we run the backtest:
from quantrocket.moonshot import backtest
backtest(
"dead-cat-drop-japan",
start_date="2007-01-01",
end_date="2020-12-31",
segment="Y",
filepath_or_buffer="dead_cat_drop_japan_backtest_results.csv",
)
And view the tear sheet:
from moonchart import Tearsheet
Tearsheet.from_moonshot_csv("dead_cat_drop_japan_backtest_results.csv")