Notebook

Comparing "My all weather trio" with different constituents and different rebalance frequency

bt_1 ASSETS = {symbol('QQQ'): 0.5, symbol('TLT'): 0.4, symbol('EFA') : -0.1 rebalance week_start()
bt_2 ASSETS = {symbol('XLK'): 0.5, symbol('TLT'): 0.4, symbol('EEM') : -0.1 rebalance MONTHES = [1,4,7,10]
In [2]:
import pandas as pd

plot_df = pd.DataFrame()

plot_df['backtest_1_value'] = backtest_1.cumulative_performance.ending_portfolio_value
plot_df['backtest_2_value'] = backtest_2.cumulative_performance.ending_portfolio_value

plot_df.plot();
In [3]:
benchmark_rets = pf.utils.get_symbol_rets('SPY')
pf.plotting.show_perf_stats(returns_1, benchmark_rets)
Start date2007-04-02
End date2020-06-19
Total months158
Backtest
Annual return 11.027%
Cumulative returns 298.221%
Annual volatility 8.802%
Sharpe ratio 1.23
Calmar ratio 0.57
Stability 0.98
Max drawdown -19.435%
Omega ratio 1.24
Sortino ratio 1.79
Skew -0.18
Kurtosis 4.49
Tail ratio 0.99
Daily value at risk -1.066%
Alpha 0.08
Beta 0.26
In [4]:
benchmark_rets = pf.utils.get_symbol_rets('SPY')
pf.plotting.show_perf_stats(returns_2, benchmark_rets)
Start date2007-04-02
End date2020-06-19
Total months158
Backtest
Annual return 10.007%
Cumulative returns 252.525%
Annual volatility 8.384%
Sharpe ratio 1.18
Calmar ratio 0.52
Stability 0.97
Max drawdown -19.256%
Omega ratio 1.23
Sortino ratio 1.70
Skew -0.25
Kurtosis 4.61
Tail ratio 0.98
Daily value at risk -1.017%
Alpha 0.08
Beta 0.22