Notebook

Load the Backtest

In [1]:
bt = get_backtest("5a0383d049a9a73f421ff70e")
100% Time: 0:00:07|###########################################################|

Run the Performance Attribution Tear Sheet

In [2]:
bt.create_perf_attrib_tear_sheet()
Summary Statistics
Annualized Specific Return 0.005595
Annualized Common Return 0.002370
Annualized Total Return 0.007945
Specific Sharpe Ratio 0.240438
Exposures Summary Average Risk Factor Exposure Annualized Return Cumulative Return
basic_materials 0.000119 -0.000395 -0.001180
consumer_cyclical 0.002177 -0.000133 -0.000397
financial_services -0.000431 -0.000736 -0.002199
real_estate -0.000871 -0.000381 -0.001139
consumer_defensive 0.000552 0.000456 0.001365
health_care 0.000984 -0.000060 -0.000180
utilities -0.000325 -0.000048 -0.000142
communication_services -0.000539 0.000006 0.000017
energy 0.000378 -0.001355 -0.004049
industrials 0.003560 0.001963 0.005884
technology 0.000535 -0.000785 -0.002347
momentum 0.095392 -0.002570 -0.007669
size -0.017838 0.004235 0.012724
value 0.013970 -0.000645 -0.001928
short_term_reversal 0.373596 0.006216 0.018713
volatility 0.015371 -0.003364 -0.010032

Notice how nearly all of our common factor returns are due to short term reversal. You can see this expressed in first two tables as well as the daily returns attribution plot. Short term reversal is the factor in the risk model which is closest to the mean reversion factor that we use.

Lastly, the final plot shows the rolling exposure of each of the factors. Notice how short term reversal cyclicly peaks every time we rebalance our portfolio (monthly).

We'll also plot out our short_term_reversal factor alone so you can take a closer look.

In [3]:
bt.factor_exposures['short_term_reversal_term_reversal'].plot();

Conclusion/How to Constrain Risk

This is an example that shows you what to look for in the risk attribution tearsheet. In general your algorithm will likely not have such pure exposures, but noisier exposures that vary more over time.

We discuss how to constrain risk in the following lecture.