Notebook

Quality Companies in an Uptrend order_optimal_portfolio(). Long-Short Count, and TF Check.

In [3]:
cum_returns = ep.cum_returns(returns)
ax = cum_returns.plot(figsize=(14,5))
ax.set(title='Cumulative Returns', ylabel='returns', xlabel='date');
In [4]:
benchmark_rets = pf.utils.get_symbol_rets('SPY')
pf.plotting.show_perf_stats(returns, benchmark_rets)
Start date2003-01-02
End date2019-11-18
Total months202
Backtest
Annual return 16.8%
Cumulative returns 1268.4%
Annual volatility 16.0%
Sharpe ratio 1.05
Calmar ratio 0.84
Stability 0.98
Max drawdown -20.0%
Omega ratio 1.20
Sortino ratio 1.48
Skew -0.41
Kurtosis 2.95
Tail ratio 0.95
Daily value at risk -1.9%
Alpha 0.11
Beta 0.50
In [6]:
ax = bt.recorded_vars.plot(figsize=(14,5))
ax.set(title='Long-Short Count and TF Check', xlabel='date');
In [ ]: