Notebook
In [6]:
import pyfolio as pf
import matplotlib.pyplot as plt
plotAlgo, = plt.plot(pf.timeseries.cum_returns(get_backtest('5986cd3813941754493bbe91').daily_performance.returns), label = 'Aglo V0.1')
plotFAANG, = plt.plot(pf.timeseries.cum_returns(get_backtest('5986d295dbab994fa4264922').daily_performance.returns), label = 'FAANG') 


plt.legend(bbox_to_anchor=(1.025, 1),handles=[plotAlgo, plotFAANG], loc = 2, borderaxespad= 0.)
100% Time: 0:00:03|###########################################################|
  8% ETA:  0:00:01|####                                                       |
/usr/local/lib/python2.7/dist-packages/ipykernel_launcher.py:3: DeprecationWarning: Risk functions in pyfolio.timeseries are deprecated and will be removed in a future release. Please install the empyrical package instead.
  This is separate from the ipykernel package so we can avoid doing imports until
100% Time: 0:00:00|###########################################################|
/usr/local/lib/python2.7/dist-packages/ipykernel_launcher.py:4: DeprecationWarning: Risk functions in pyfolio.timeseries are deprecated and will be removed in a future release. Please install the empyrical package instead.
  after removing the cwd from sys.path.
Out[6]:
<matplotlib.legend.Legend at 0x7ff0f0f05690>
In [1]:
get_backtest('5986cd3813941754493bbe91').create_returns_tear_sheet()
100% Time: 0:00:03|###########################################################|
Entire data start date: 2015-01-02
Entire data end date: 2017-08-04


Backtest Months: 31
Performance statistics Backtest
annual_return 0.37
cum_returns_final 1.25
annual_volatility 0.18
sharpe_ratio 1.87
calmar_ratio 3.24
stability_of_timeseries 0.95
max_drawdown -0.11
omega_ratio 1.44
sortino_ratio 3.05
skew 0.64
kurtosis 5.50
tail_ratio 1.21
common_sense_ratio 1.65
gross_leverage 0.67
information_ratio 0.09
alpha 0.26
beta 0.64
Worst drawdown periods net drawdown in % peak date valley date recovery date duration
0 11.30 2017-06-08 2017-07-03 NaT NaN
1 9.03 2016-10-24 2016-11-11 2017-02-07 77
2 7.98 2015-11-06 2016-01-15 2016-02-11 70
3 7.07 2015-08-07 2015-08-21 2015-09-17 30
4 6.42 2015-03-24 2015-04-17 2015-06-23 66

[-0.021 -0.046]
In [2]:
get_backtest('5986d295dbab994fa4264922').create_returns_tear_sheet()
100% Time: 0:00:00|###########################################################|
Entire data start date: 2015-01-02
Entire data end date: 2017-08-04


Backtest Months: 31
Performance statistics Backtest
annual_return 0.50
cum_returns_final 1.87
annual_volatility 0.20
sharpe_ratio 2.12
calmar_ratio 2.77
stability_of_timeseries 0.97
max_drawdown -0.18
omega_ratio 1.46
sortino_ratio 3.26
skew 0.00
kurtosis 3.16
tail_ratio 1.16
common_sense_ratio 1.74
gross_leverage 1.00
information_ratio 0.15
alpha 0.32
beta 1.12
Worst drawdown periods net drawdown in % peak date valley date recovery date duration
0 18.14 2015-12-04 2016-02-09 2016-04-13 94
1 12.13 2015-08-17 2015-08-25 2015-09-21 26
2 7.82 2016-10-25 2016-11-10 2016-11-21 20
3 7.62 2017-06-08 2017-07-03 2017-07-17 28
4 6.64 2016-06-09 2016-06-27 2016-07-08 22

[-0.024 -0.049]
In [ ]: