Notebook

Load a backtest containing an in sample period through the live trading period

In [1]:
in_out_sample_original = get_backtest("57a8a47382591310058651e0")
100% Time: 0:00:05|###########################################################|
In [2]:
in_out_sample_original.create_full_tear_sheet(live_start_date="2015-08-06", bayesian=True)
Entire data start date: 2015-01-06
Entire data end date: 2016-08-05


Out-of-Sample Months: 12
Backtest Months: 7
                   Backtest  Out_of_Sample  All_History
annual_return          0.23          -0.12        -0.00
annual_volatility      0.06           0.16         0.13
sharpe_ratio           3.71          -0.73         0.03
calmar_ratio          14.03          -0.60        -0.02
stability              0.92           0.44         0.04
max_drawdown          -0.02          -0.20        -0.20
omega_ratio            1.94           0.87         1.01
sortino_ratio          6.52          -0.95         0.04
skewness               0.31          -0.59        -0.79
kurtosis               2.87           5.32         8.65
information_ratio      0.06          -0.06        -0.02
alpha                  0.21          -0.13        -0.01
beta                  -0.02           0.26         0.19

Worst Drawdown Periods
   net drawdown in %  peak date valley date recovery date duration
0              20.44 2015-11-06  2016-07-26           NaT      NaN
1               8.08 2015-08-18  2015-08-24    2015-09-24       28
2               4.89 2015-09-24  2015-09-28    2015-10-02        7
3               3.09 2015-10-02  2015-10-08    2015-11-05       25
4               1.64 2015-07-08  2015-07-20    2015-07-28       15


2-sigma returns daily    -0.017
2-sigma returns weekly   -0.032
dtype: float64
/usr/local/lib/python2.7/dist-packages/matplotlib/__init__.py:892: UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.
  warnings.warn(self.msg_depr % (key, alt_key))
Stress Events
            mean    min    max
Fall2015       0 -0.045  0.032
New Normal     0 -0.052  0.043

Top 10 long positions of all time (and max%)
[u'TWC-33133' u'DLTR-12652' u'XLY-19662' u'HUM-3718' u'ETP-26073'
 u'VIPS-42707' u'COG-1746' u'XLE-19655' u'UNP-7800' u'GWW-3421']
[ 0.974  0.789  0.66   0.615  0.554  0.53   0.353  0.34   0.332  0.279]


Top 10 short positions of all time (and max%)
[u'SYY-7285' u'DLTR-12652' u'XLY-19662' u'BHI-858' u'ETP-26073'
 u'TWC-33133' u'KEY-4221' u'HUM-3718' u'XLE-19655' u'VIPS-42707']
[-0.945 -0.942 -0.897 -0.892 -0.857 -0.705 -0.649 -0.483 -0.438 -0.363]


Top 10 positions of all time (and max%)
[u'TWC-33133' u'SYY-7285' u'DLTR-12652' u'XLY-19662' u'BHI-858'
 u'ETP-26073' u'KEY-4221' u'HUM-3718' u'VIPS-42707' u'XLE-19655']
[ 0.974  0.945  0.942  0.897  0.892  0.857  0.649  0.615  0.53   0.438]


All positions ever held
[u'TWC-33133' u'SYY-7285' u'DLTR-12652' u'XLY-19662' u'BHI-858'
 u'ETP-26073' u'KEY-4221' u'HUM-3718' u'VIPS-42707' u'XLE-19655'
 u'COG-1746' u'UNP-7800' u'CCI-19258' u'KMI-40852' u'GWW-3421' u'TRV-7041'
 u'ZG-41730' u'PCP-5822' u'TRIP-42230' u'SYK-7178' u'RTN-6583' u'CBS-7962'
 u'PRGO-6161' u'YUM-17787' u'EBAY-24819' u'NOV-24809' u'EXPE-27543'
 u'AMT-24760' u'CHTR-39095' u'LQD-23881' u'LULU-34395' u'WMB-8214'
 u'PANW-43202' u'CAM-13176' u'IWF-21518' u'PPG-6116' u'AET-168'
 u'VTI-22739' u'FB-42950' u'FEYE-45451' u'YELP-42596' u'SHPG-18488'
 u'HD-3496' u'TIF-7447' u'VRTX-8045' u'ORCL-5692' u'XLV-19661' u'ETE-28056'
 u'COH-22099' u'UA-27822' u'AIG-239' u'CI-1539' u'SWN-7244' u'GD-3136'
 u'AXP-679' u'WMT-8229' u'VFC-7949' u'AGG-25485' u'CMI-1985' u'UNH-7792'
 u'BUD-38554' u'PCAR-5787' u'RIO-6584' u'GE-3149' u'SYF-47415' u'LEN-4417'
 u'ENDP-21750' u'BLK-20689' u'ALXN-14328' u'EWG-14518' u'EWZ-21757'
 u'TJX-7457' u'COF-12160' u'KORS-42270' u'ADBE-114' u'ILMN-21774'
 u'IJH-21507' u'EWW-14530' u'BSX-1131' u'SBUX-6683' u'CMCS_A-1637'
 u'BP-19675' u'ESRX-2618' u'CAH-1376' u'FXI-26703' u'RIG-9038' u'BBY-754'
 u'MYL-5166' u'GIS-3214' u'ADP-630' u'PG-5938' u'OXY-5729' u'JNJ-4151'
 u'EWJ-14520' u'EL-13841' u'SPXU-38532' u'VOO-40107' u'MA-32146'
 u'EXC-22114' u'CTL-1960' u'STJ-7156' u'MMM-4922' u'CRM-26401' u'NOC-5387'
 u'SDS-32382' u'POT-6109' u'ICE-27809' u'LBTY_K-27608' u'XLB-19654'
 u'EQIX-24482' u'GPS-3321' u'MO-4954' u'BRK_B-11100' u'XLI-19657'
 u'BIIB-3806' u'SDRL-39495' u'DIA-2174' u'SSO-32270' u'DE-2127'
 u'HCA-41047' u'VRX-10908' u'XRT-32275' u'VGK-27100' u'AMGN-368'
 u'UPRO-38533' u'IVV-21513' u'EMR-2530' u'SPY-8554' u'MDT-4758'
 u'ZBH-23047' u'PH-5956' u'EPD-19079' u'EIX-14372' u'MCD-4707' u'EZU-21758'
 u'TAP-76' u'ETN-2633' u'LNG-22096' u'IWD-21517' u'HON-25090' u'GILD-3212'
 u'CL-1582' u'BDX-794' u'TMUS-33698' u'KR-4297' u'AMD-351' u'MCK-12350'
 u'VIAB-27872' u'P-41579' u'TSN-7684' u'FAS-37049' u'AMP-27676'
 u'KRFT-43405' u'CVX-23112' u'DIS-2190' u'SO-7011' u'DAL-33729'
 u'FOXA-12213' u'TGT-21090' u'ABBV-43694' u'XOM-8347' u'XIV-40516'
 u'NFX-10231' u'CMG-28016' u'FL-8383' u'BBD-26126' u'SHW-6868' u'CELG-1406'
 u'SVXY-41968' u'CLX-1616' u'GOOG_L-26578' u'UAL-28051' u'SUNE-13306'
 u'STT-7139' u'GOOG-46631' u'CMCS_K-1638' u'NSC-5442' u'KSS-4313'
 u'PSX-42788' u'CXO-34440' u'BEAV-799' u'STZ-24873' u'ALL-24838'
 u'MON-22140' u'REGN-6413' u'MTB-5117' u'AVGO-38650' u'NKE-5328'
 u'EWY-21491' u'EW-21382' u'F-2673']
[ 0.974  0.945  0.942  0.897  0.892  0.857  0.649  0.615  0.53   0.438
  0.353  0.332  0.323  0.318  0.279  0.235  0.224  0.221  0.213  0.186
  0.184  0.177  0.167  0.167  0.159  0.151  0.151  0.143  0.14   0.135
  0.134  0.134  0.134  0.132  0.131  0.129  0.125  0.124  0.123  0.123
  0.119  0.114  0.113  0.112  0.112  0.109  0.109  0.109  0.109  0.108
  0.106  0.106  0.106  0.106  0.104  0.104  0.104  0.101  0.101  0.1    0.1
  0.099  0.099  0.098  0.097  0.097  0.097  0.095  0.094  0.094  0.093
  0.093  0.092  0.092  0.092  0.09   0.09   0.088  0.088  0.087  0.087
  0.087  0.087  0.087  0.087  0.086  0.086  0.086  0.086  0.086  0.086
  0.085  0.085  0.085  0.085  0.085  0.084  0.084  0.084  0.084  0.084
  0.083  0.083  0.083  0.083  0.083  0.082  0.082  0.082  0.081  0.08   0.08
  0.079  0.079  0.079  0.079  0.078  0.078  0.077  0.077  0.076  0.076
  0.076  0.075  0.075  0.075  0.075  0.075  0.074  0.074  0.073  0.073
  0.073  0.072  0.072  0.071  0.071  0.071  0.071  0.071  0.071  0.071
  0.07   0.067  0.066  0.066  0.066  0.065  0.065  0.064  0.064  0.064
  0.063  0.063  0.062  0.062  0.061  0.061  0.06   0.06   0.059  0.058
  0.057  0.057  0.057  0.056  0.056  0.055  0.055  0.055  0.053  0.052
  0.051  0.051  0.051  0.05   0.049  0.049  0.048  0.048  0.048  0.047
  0.046  0.045  0.041  0.038  0.037  0.031  0.029  0.021  0.015]