Notebook

Run the cell below to create your tear sheet.

In [1]:
bt = get_backtest('5d6867017b54c36109518ded')
#bt.create_full_tear_sheet(round_trips=True)
100% Time:  0:00:39|##########################################################|
In [13]:
bt.positions
Out[13]:
amount cost_basis last_sale_price sid
2014-08-18 00:00:00+00:00 127 157.813016 155.620 205
2014-08-18 00:00:00+00:00 596 33.569504 33.615 484
2014-08-18 00:00:00+00:00 241 83.012485 83.250 630
2014-08-18 00:00:00+00:00 229 87.229592 87.150 679
2014-08-18 00:00:00+00:00 679 29.485735 29.930 754
2014-08-18 00:00:00+00:00 170 118.008798 117.900 794
2014-08-18 00:00:00+00:00 315 63.612790 63.850 939
2014-08-18 00:00:00+00:00 299 66.819108 66.640 1010
2014-08-18 00:00:00+00:00 -637 31.434546 31.300 1062
2014-08-18 00:00:00+00:00 705 28.415200 28.420 1209
2014-08-18 00:00:00+00:00 282 71.026318 70.230 1218
2014-08-18 00:00:00+00:00 1531 13.084524 13.070 1655
2014-08-18 00:00:00+00:00 -854 23.324423 23.950 1663
2014-08-18 00:00:00+00:00 123 162.353355 161.920 1769
2014-08-18 00:00:00+00:00 817 24.513250 24.630 1900
2014-08-18 00:00:00+00:00 118 142.422175 142.160 1985
2014-08-18 00:00:00+00:00 -1533 13.052059 13.100 1995
2014-08-18 00:00:00+00:00 499 40.142961 40.390 2109
2014-08-18 00:00:00+00:00 304 65.783875 65.860 2119
2014-08-18 00:00:00+00:00 189 105.873910 108.560 2126
2014-08-18 00:00:00+00:00 963 20.797499 20.740 2169
2014-08-18 00:00:00+00:00 292 57.778916 58.370 2212
2014-08-18 00:00:00+00:00 226 88.598161 88.930 2262
2014-08-18 00:00:00+00:00 -941 21.238375 21.130 2298
2014-08-18 00:00:00+00:00 176 113.644612 113.410 2427
2014-08-18 00:00:00+00:00 -501 39.911369 39.480 3265
2014-08-18 00:00:00+00:00 83 240.221050 242.820 3421
2014-08-18 00:00:00+00:00 597 33.512748 33.410 3660
2014-08-18 00:00:00+00:00 242 69.472165 69.620 3676
2014-08-18 00:00:00+00:00 -830 24.083398 24.050 3686
... ... ... ... ...
2019-08-28 00:00:00+00:00 -278 59.008797 61.970 49178
2019-08-28 00:00:00+00:00 565 45.838093 46.550 49192
2019-08-28 00:00:00+00:00 -463 58.287107 54.730 49288
2019-08-28 00:00:00+00:00 -1747 13.584087 14.810 49321
2019-08-28 00:00:00+00:00 387 69.745842 71.530 49322
2019-08-28 00:00:00+00:00 -537 45.527305 46.840 49335
2019-08-28 00:00:00+00:00 186 141.508869 142.920 49413
2019-08-28 00:00:00+00:00 836 30.930979 32.020 49434
2019-08-28 00:00:00+00:00 -101 256.270800 250.600 49458
2019-08-28 00:00:00+00:00 -1639 15.816353 15.600 49464
2019-08-28 00:00:00+00:00 -341 79.079381 75.140 49501
2019-08-28 00:00:00+00:00 166 161.547516 157.600 49515
2019-08-28 00:00:00+00:00 -617 40.003580 40.090 49594
2019-08-28 00:00:00+00:00 -411 62.933575 62.140 49610
2019-08-28 00:00:00+00:00 -154 140.574105 138.230 49655
2019-08-28 00:00:00+00:00 -1368 18.919973 20.700 49908
2019-08-28 00:00:00+00:00 104 248.294508 248.600 50288
2019-08-28 00:00:00+00:00 1172 22.092121 22.090 50325
2019-08-28 00:00:00+00:00 -401 50.069598 59.570 50333
2019-08-28 00:00:00+00:00 39 136.117354 140.240 50350
2019-08-28 00:00:00+00:00 -819 26.384565 32.270 50534
2019-08-28 00:00:00+00:00 -1653 11.618458 15.570 50683
2019-08-28 00:00:00+00:00 -762 33.979206 31.820 50716
2019-08-28 00:00:00+00:00 -1342 19.265558 17.400 50749
2019-08-28 00:00:00+00:00 1248 20.746576 20.250 50780
2019-08-28 00:00:00+00:00 -1223 24.237575 21.640 51012
2019-08-28 00:00:00+00:00 -414 62.507706 61.370 51205
2019-08-28 00:00:00+00:00 -284 57.712805 57.230 51955
2019-08-28 00:00:00+00:00 -510 49.109124 49.560 51961
2019-08-28 00:00:00+00:00 403 64.251099 64.900 52064

682383 rows × 4 columns

In [12]:
bt.pyfolio_positions.iloc[0,:].dropna()
Out[12]:
AGN-205       1.976374e+04
ATU-484       2.003454e+04
ADP-630       2.006325e+04
AXP-679       1.995735e+04
BBY-754       2.032247e+04
BDX-794       2.004300e+04
BLL-939       2.011275e+04
BNS-1010      1.992536e+04
BPOP-1062    -1.993810e+04
CA-1209       2.003610e+04
CACI-1218     1.980486e+04
CMO-1655      2.001017e+04
CRK-1663     -2.045330e+04
COO-1769      1.991616e+04
CSCO-1900     2.012271e+04
CMI-1985      1.677488e+04
CUZ-1995     -2.008230e+04
DCI-2109      2.015461e+04
DD-2119       2.002144e+04
DDS-2126      2.051784e+04
CVA-2169      1.997262e+04
DLX-2212      1.704404e+04
DOV-2262      2.009818e+04
DHI-2298     -1.988333e+04
ECL-2427      1.996016e+04
GLF-3265     -1.977948e+04
GWW-3421      2.015406e+04
HRB-3660      1.994577e+04
LHX-3676      1.684804e+04
HSC-3686     -1.996150e+04
                  ...     
GTAT-36628   -2.035733e+04
PMT-38630    -1.986165e+04
IRWD-39194   -1.983190e+04
QEP-39778    -2.000784e+04
OAS-39797    -2.012439e+04
TSLA-39840   -1.949325e+04
QLIK-39921   -1.684202e+04
HHC-40378    -1.999625e+04
HCA-41047     2.018770e+04
CSOD-41098   -2.011473e+04
AL-41280     -2.013444e+04
LNKD-41451   -1.990170e+04
P-41579      -1.976065e+04
MTGE-41792    1.996011e+04
GEVA-42112   -2.078054e+04
CLVS-42166   -1.997146e+04
APTV-42173    2.003348e+04
GWRE-42402   -2.007440e+04
POST-42407   -1.960284e+04
YELP-42596   -2.022800e+04
PBYI-42689   -1.727675e+04
GLOG-42746   -1.990910e+04
TSRO-43124   -1.979990e+04
ICPT-43505   -2.050920e+04
ZTS-44060     2.004081e+04
AMBC-44636   -1.993712e+04
RCPT-44689   -1.931961e+04
IQV-44692     3.139400e+03
EPZM-44830   -1.926258e+04
cash          1.010884e+07
Name: 2014-08-18 00:00:00+00:00, dtype: float64
In [ ]: