Notebook
In [1]:
import matplotlib.pyplot as plt
import pyfolio as pf
#====================================================================================================================

bt1 = get_backtest('59712237123aca4e11b709e1')
plotTrain, = plt.plot(pf.timeseries.cum_returns(bt1.daily_performance.returns), label = 'Follow The Hype Train');

bt2 = get_backtest('596d370a3078324e270d47e3')
plotGit, = plt.plot(pf.timeseries.cum_returns(bt2.daily_performance.returns), label = 'Get In And Get Out');

btspy = get_backtest('5970660138279f521a8fbeb7')
plotSPY, = plt.plot(pf.timeseries.cum_returns(btspy.daily_performance.returns), label = 'SPY');
#====================================================================================================================
plt.legend(bbox_to_anchor=(1.025, 1),handles=[plotSPY, plotGit, plotTrain], loc = 2, borderaxespad= 0. )
100% Time: 0:00:01|###########################################################|
  0% ETA:  --:--:--|                                                          |
/usr/local/lib/python2.7/dist-packages/ipykernel_launcher.py:6: DeprecationWarning: Risk functions in pyfolio.timeseries are deprecated and will be removed in a future release. Please install the empyrical package instead.
  
100% Time: 0:00:01|###########################################################|
 13% ETA:  0:00:01|#######                                                    |
/usr/local/lib/python2.7/dist-packages/ipykernel_launcher.py:9: DeprecationWarning: Risk functions in pyfolio.timeseries are deprecated and will be removed in a future release. Please install the empyrical package instead.
  if __name__ == '__main__':
100% Time: 0:00:00|###########################################################|
/usr/local/lib/python2.7/dist-packages/ipykernel_launcher.py:12: DeprecationWarning: Risk functions in pyfolio.timeseries are deprecated and will be removed in a future release. Please install the empyrical package instead.
  if sys.path[0] == '':
Out[1]:
<matplotlib.legend.Legend at 0x7f2a2f0621d0>
In [ ]: