Files
options_backtester/backtester/examples/backtester_example.ipynb
T
2020-03-20 11:20:45 -03:00

974 lines
116 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Backtester Examples"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data files"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import sys\n",
"\n",
"BACKTESTER_DIR = os.path.realpath(os.path.join(os.getcwd(), '..', '..'))\n",
"TEST_DATA_DIR = os.path.join(BACKTESTER_DIR, 'backtester', 'test', 'test_data')\n",
"SAMPLE_STOCK_DATA = os.path.join(TEST_DATA_DIR, 'test_data_stocks.csv')\n",
"SAMPLE_OPTIONS_DATA = os.path.join(TEST_DATA_DIR, 'test_data_options.csv')\n",
"\n",
"sys.path.append(BACKTESTER_DIR) # Add backtester base dir to $PYTHONPATH"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Sample backtest"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"from backtester import Backtest, Stock, Type, Direction\n",
"from backtester.datahandler import HistoricalOptionsData, TiingoData\n",
"from backtester.strategy import Strategy, StrategyLeg"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First we construct an options datahandler."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"options_data = HistoricalOptionsData(SAMPLE_OPTIONS_DATA)\n",
"options_schema = options_data.schema"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next, we'll create a toy options strategy."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"sample_strategy = Strategy(options_schema)\n",
"\n",
"leg1 = StrategyLeg('leg_1', options_schema, option_type=Type.CALL, direction=Direction.BUY)\n",
"leg1.entry_filter = ((options_schema.contract == 'SPX170317C00300000') &\n",
" (options_schema.dte == 73)) | ((options_schema.contract == 'SPX170421C00500000') &\n",
" (options_schema.dte == 51))\n",
"\n",
"leg1.exit_filter = (options_schema.dte == 44) | (options_schema.dte == 18)\n",
"\n",
"leg2 = StrategyLeg('leg_2', options_schema, option_type=Type.PUT, direction=Direction.BUY)\n",
"leg2.entry_filter = ((options_schema.contract == 'SPX170317P00300000') &\n",
" (options_schema.dte == 73)) | ((options_schema.contract == 'SPX170421P01375000') &\n",
" (options_schema.dte == 51))\n",
"\n",
"leg2.exit_filter = (options_schema.dte == 44) | (options_schema.dte == 18)\n",
"\n",
"sample_strategy.add_legs([leg1, leg2])\n",
"sample_strategy.add_exit_thresholds(profit_pct=0.2, loss_pct=0.2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We do the same for stocks: create a datahandler together with a list of the stocks we want in our inventory and their corresponding weights."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"stocks_data = TiingoData(SAMPLE_STOCK_DATA)\n",
"stocks = [Stock('VOO', 0.4), Stock('TUR', 0.1), Stock('RSX', 0.5)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We set our portfolio allocation, i.e. how much of our capital will be invested in stocks, options and cash."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"allocation = {'stocks': 0.5, 'options': 0.5, 'cash': 0.0}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, we create the `Backtest` object."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"bt = Backtest(allocation, initial_capital=1_000_000)\n",
"\n",
"bt.stocks = stocks\n",
"bt.stocks_data = stocks_data\n",
"\n",
"bt.options_strategy = sample_strategy\n",
"bt.options_data = options_data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And run the backtest with a rebalancing period of one month."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"0% [██████████████████████████████] 100% | ETA: 00:00:00\n",
"Total time elapsed: 00:00:00\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead tr th {\n",
" text-align: left;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr>\n",
" <th></th>\n",
" <th colspan=\"7\" halign=\"left\">leg_1</th>\n",
" <th colspan=\"7\" halign=\"left\">leg_2</th>\n",
" <th colspan=\"3\" halign=\"left\">totals</th>\n",
" </tr>\n",
" <tr>\n",
" <th></th>\n",
" <th>contract</th>\n",
" <th>underlying</th>\n",
" <th>expiration</th>\n",
" <th>type</th>\n",
" <th>strike</th>\n",
" <th>cost</th>\n",
" <th>order</th>\n",
" <th>contract</th>\n",
" <th>underlying</th>\n",
" <th>expiration</th>\n",
" <th>type</th>\n",
" <th>strike</th>\n",
" <th>cost</th>\n",
" <th>order</th>\n",
" <th>cost</th>\n",
" <th>qty</th>\n",
" <th>date</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>SPX170317C00300000</td>\n",
" <td>SPX</td>\n",
" <td>2017-03-17</td>\n",
" <td>call</td>\n",
" <td>300</td>\n",
" <td>195010.0</td>\n",
" <td>Order.BTO</td>\n",
" <td>SPX170317P00300000</td>\n",
" <td>SPX</td>\n",
" <td>2017-03-17</td>\n",
" <td>put</td>\n",
" <td>300</td>\n",
" <td>5.0</td>\n",
" <td>Order.BTO</td>\n",
" <td>195015.0</td>\n",
" <td>2.0</td>\n",
" <td>2017-01-03</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>SPX170317C00300000</td>\n",
" <td>SPX</td>\n",
" <td>2017-03-17</td>\n",
" <td>call</td>\n",
" <td>300</td>\n",
" <td>-197060.0</td>\n",
" <td>Order.STC</td>\n",
" <td>SPX170317P00300000</td>\n",
" <td>SPX</td>\n",
" <td>2017-03-17</td>\n",
" <td>put</td>\n",
" <td>300</td>\n",
" <td>-0.0</td>\n",
" <td>Order.STC</td>\n",
" <td>-197060.0</td>\n",
" <td>2.0</td>\n",
" <td>2017-02-01</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>SPX170421C00500000</td>\n",
" <td>SPX</td>\n",
" <td>2017-04-21</td>\n",
" <td>call</td>\n",
" <td>500</td>\n",
" <td>189250.0</td>\n",
" <td>Order.BTO</td>\n",
" <td>SPX170421P01375000</td>\n",
" <td>SPX</td>\n",
" <td>2017-04-21</td>\n",
" <td>put</td>\n",
" <td>1375</td>\n",
" <td>40.0</td>\n",
" <td>Order.BTO</td>\n",
" <td>189290.0</td>\n",
" <td>2.0</td>\n",
" <td>2017-03-01</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>SPX170421C00500000</td>\n",
" <td>SPX</td>\n",
" <td>2017-04-21</td>\n",
" <td>call</td>\n",
" <td>500</td>\n",
" <td>-185650.0</td>\n",
" <td>Order.STC</td>\n",
" <td>SPX170421P01375000</td>\n",
" <td>SPX</td>\n",
" <td>2017-04-21</td>\n",
" <td>put</td>\n",
" <td>1375</td>\n",
" <td>-0.0</td>\n",
" <td>Order.STC</td>\n",
" <td>-185650.0</td>\n",
" <td>2.0</td>\n",
" <td>2017-04-03</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" leg_1 \\\n",
" contract underlying expiration type strike cost order \n",
"0 SPX170317C00300000 SPX 2017-03-17 call 300 195010.0 Order.BTO \n",
"1 SPX170317C00300000 SPX 2017-03-17 call 300 -197060.0 Order.STC \n",
"2 SPX170421C00500000 SPX 2017-04-21 call 500 189250.0 Order.BTO \n",
"3 SPX170421C00500000 SPX 2017-04-21 call 500 -185650.0 Order.STC \n",
"\n",
" leg_2 \\\n",
" contract underlying expiration type strike cost order \n",
"0 SPX170317P00300000 SPX 2017-03-17 put 300 5.0 Order.BTO \n",
"1 SPX170317P00300000 SPX 2017-03-17 put 300 -0.0 Order.STC \n",
"2 SPX170421P01375000 SPX 2017-04-21 put 1375 40.0 Order.BTO \n",
"3 SPX170421P01375000 SPX 2017-04-21 put 1375 -0.0 Order.STC \n",
"\n",
" totals \n",
" cost qty date \n",
"0 195015.0 2.0 2017-01-03 \n",
"1 -197060.0 2.0 2017-02-01 \n",
"2 189290.0 2.0 2017-03-01 \n",
"3 -185650.0 2.0 2017-04-03 "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bt.run(rebalance_freq=1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The trade log (`bt.trade_log`) shows we executed 4 trades: we bought 2 calls and 2 puts on _2017-01-03_ and _2017-03-01_, and exited those positions on _2017-02-01_ and _2017-04-03_ respectively."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The balance data structure shows how our positions evolved in time:\n",
"- We started with $1000000 on _2017-01-02_\n",
"- `total capital` is the sum of `cash`, `stocks capital` and `options capital`\n",
"- `% change` shows the inter day change in `total capital`\n",
"- `accumulated return` gives the compounded return in `total capital` since the start of the backtest"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>total capital</th>\n",
" <th>cash</th>\n",
" <th>VOO</th>\n",
" <th>TUR</th>\n",
" <th>RSX</th>\n",
" <th>options qty</th>\n",
" <th>calls capital</th>\n",
" <th>puts capital</th>\n",
" <th>stocks qty</th>\n",
" <th>options capital</th>\n",
" <th>stocks capital</th>\n",
" <th>% change</th>\n",
" <th>accumulated return</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2017-01-02</th>\n",
" <td>1.000000e+06</td>\n",
" <td>1000000.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2017-01-03</th>\n",
" <td>9.990300e+05</td>\n",
" <td>110117.405920</td>\n",
" <td>199872.763320</td>\n",
" <td>49993.281167</td>\n",
" <td>249986.549593</td>\n",
" <td>2.0</td>\n",
" <td>389060.0</td>\n",
" <td>0.0</td>\n",
" <td>16186.0</td>\n",
" <td>389060.0</td>\n",
" <td>499852.594080</td>\n",
" <td>-0.000970</td>\n",
" <td>0.999030</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2017-01-04</th>\n",
" <td>1.004228e+06</td>\n",
" <td>110117.405920</td>\n",
" <td>201052.238851</td>\n",
" <td>50072.862958</td>\n",
" <td>251605.333911</td>\n",
" <td>2.0</td>\n",
" <td>391380.0</td>\n",
" <td>0.0</td>\n",
" <td>16186.0</td>\n",
" <td>391380.0</td>\n",
" <td>502730.435720</td>\n",
" <td>0.005203</td>\n",
" <td>1.004228</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2017-01-05</th>\n",
" <td>1.002706e+06</td>\n",
" <td>110117.405920</td>\n",
" <td>200897.553535</td>\n",
" <td>49865.950301</td>\n",
" <td>250564.686850</td>\n",
" <td>2.0</td>\n",
" <td>391260.0</td>\n",
" <td>0.0</td>\n",
" <td>16186.0</td>\n",
" <td>391260.0</td>\n",
" <td>501328.190686</td>\n",
" <td>-0.001516</td>\n",
" <td>1.002706</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2017-01-06</th>\n",
" <td>1.003201e+06</td>\n",
" <td>110117.405920</td>\n",
" <td>201680.647945</td>\n",
" <td>49372.543196</td>\n",
" <td>248830.275081</td>\n",
" <td>2.0</td>\n",
" <td>393200.0</td>\n",
" <td>0.0</td>\n",
" <td>16186.0</td>\n",
" <td>393200.0</td>\n",
" <td>499883.466222</td>\n",
" <td>0.000494</td>\n",
" <td>1.003201</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2017-05-12</th>\n",
" <td>1.008599e+06</td>\n",
" <td>507298.036182</td>\n",
" <td>203126.836072</td>\n",
" <td>50621.271130</td>\n",
" <td>247552.567157</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>16415.0</td>\n",
" <td>0.0</td>\n",
" <td>501300.674359</td>\n",
" <td>-0.002805</td>\n",
" <td>1.008599</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2017-05-15</th>\n",
" <td>1.015904e+06</td>\n",
" <td>507298.036182</td>\n",
" <td>204154.459189</td>\n",
" <td>51695.869759</td>\n",
" <td>252755.284844</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>16415.0</td>\n",
" <td>0.0</td>\n",
" <td>508605.613792</td>\n",
" <td>0.007243</td>\n",
" <td>1.015904</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2017-05-16</th>\n",
" <td>1.014651e+06</td>\n",
" <td>507298.036182</td>\n",
" <td>204117.427725</td>\n",
" <td>51811.005327</td>\n",
" <td>251424.357064</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>16415.0</td>\n",
" <td>0.0</td>\n",
" <td>507352.790116</td>\n",
" <td>-0.001233</td>\n",
" <td>1.014651</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2017-05-17</th>\n",
" <td>1.005524e+06</td>\n",
" <td>507298.036182</td>\n",
" <td>200497.602152</td>\n",
" <td>50659.649653</td>\n",
" <td>247068.593419</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>16415.0</td>\n",
" <td>0.0</td>\n",
" <td>498225.845224</td>\n",
" <td>-0.008995</td>\n",
" <td>1.005524</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2017-05-18</th>\n",
" <td>1.001336e+06</td>\n",
" <td>507298.036182</td>\n",
" <td>201228.973560</td>\n",
" <td>49853.700681</td>\n",
" <td>242954.816643</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>16415.0</td>\n",
" <td>0.0</td>\n",
" <td>494037.490883</td>\n",
" <td>-0.004165</td>\n",
" <td>1.001336</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>96 rows × 13 columns</p>\n",
"</div>"
],
"text/plain": [
" total capital cash VOO TUR \\\n",
"2017-01-02 1.000000e+06 1000000.000000 NaN NaN \n",
"2017-01-03 9.990300e+05 110117.405920 199872.763320 49993.281167 \n",
"2017-01-04 1.004228e+06 110117.405920 201052.238851 50072.862958 \n",
"2017-01-05 1.002706e+06 110117.405920 200897.553535 49865.950301 \n",
"2017-01-06 1.003201e+06 110117.405920 201680.647945 49372.543196 \n",
"... ... ... ... ... \n",
"2017-05-12 1.008599e+06 507298.036182 203126.836072 50621.271130 \n",
"2017-05-15 1.015904e+06 507298.036182 204154.459189 51695.869759 \n",
"2017-05-16 1.014651e+06 507298.036182 204117.427725 51811.005327 \n",
"2017-05-17 1.005524e+06 507298.036182 200497.602152 50659.649653 \n",
"2017-05-18 1.001336e+06 507298.036182 201228.973560 49853.700681 \n",
"\n",
" RSX options qty calls capital puts capital \\\n",
"2017-01-02 NaN NaN NaN NaN \n",
"2017-01-03 249986.549593 2.0 389060.0 0.0 \n",
"2017-01-04 251605.333911 2.0 391380.0 0.0 \n",
"2017-01-05 250564.686850 2.0 391260.0 0.0 \n",
"2017-01-06 248830.275081 2.0 393200.0 0.0 \n",
"... ... ... ... ... \n",
"2017-05-12 247552.567157 0.0 0.0 0.0 \n",
"2017-05-15 252755.284844 0.0 0.0 0.0 \n",
"2017-05-16 251424.357064 0.0 0.0 0.0 \n",
"2017-05-17 247068.593419 0.0 0.0 0.0 \n",
"2017-05-18 242954.816643 0.0 0.0 0.0 \n",
"\n",
" stocks qty options capital stocks capital % change \\\n",
"2017-01-02 NaN 0.0 0.000000 NaN \n",
"2017-01-03 16186.0 389060.0 499852.594080 -0.000970 \n",
"2017-01-04 16186.0 391380.0 502730.435720 0.005203 \n",
"2017-01-05 16186.0 391260.0 501328.190686 -0.001516 \n",
"2017-01-06 16186.0 393200.0 499883.466222 0.000494 \n",
"... ... ... ... ... \n",
"2017-05-12 16415.0 0.0 501300.674359 -0.002805 \n",
"2017-05-15 16415.0 0.0 508605.613792 0.007243 \n",
"2017-05-16 16415.0 0.0 507352.790116 -0.001233 \n",
"2017-05-17 16415.0 0.0 498225.845224 -0.008995 \n",
"2017-05-18 16415.0 0.0 494037.490883 -0.004165 \n",
"\n",
" accumulated return \n",
"2017-01-02 NaN \n",
"2017-01-03 0.999030 \n",
"2017-01-04 1.004228 \n",
"2017-01-05 1.002706 \n",
"2017-01-06 1.003201 \n",
"... ... \n",
"2017-05-12 1.008599 \n",
"2017-05-15 1.015904 \n",
"2017-05-16 1.014651 \n",
"2017-05-17 1.005524 \n",
"2017-05-18 1.001336 \n",
"\n",
"[96 rows x 13 columns]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bt.balance"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Statistics and Plots"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"from backtester.statistics import *"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Summary table of our options strategy."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<style type=\"text/css\" >\n",
"</style><table id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fdd\" ><thead> <tr> <th class=\"blank level0\" ></th> <th class=\"col_heading level0 col0\" >Strategy</th> </tr></thead><tbody>\n",
" <tr>\n",
" <th id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddlevel0_row0\" class=\"row_heading level0 row0\" >Total trades</th>\n",
" <td id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddrow0_col0\" class=\"data row0 col0\" >2</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddlevel0_row1\" class=\"row_heading level0 row1\" >Number of wins</th>\n",
" <td id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddrow1_col0\" class=\"data row1 col0\" >1</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddlevel0_row2\" class=\"row_heading level0 row2\" >Number of losses</th>\n",
" <td id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddrow2_col0\" class=\"data row2 col0\" >1</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddlevel0_row3\" class=\"row_heading level0 row3\" >Win %</th>\n",
" <td id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddrow3_col0\" class=\"data row3 col0\" >50.00%</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddlevel0_row4\" class=\"row_heading level0 row4\" >Largest loss</th>\n",
" <td id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddrow4_col0\" class=\"data row4 col0\" >$7280.00</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddlevel0_row5\" class=\"row_heading level0 row5\" >Profit factor</th>\n",
" <td id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddrow5_col0\" class=\"data row5 col0\" >1.00</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddlevel0_row6\" class=\"row_heading level0 row6\" >Average profit</th>\n",
" <td id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddrow6_col0\" class=\"data row6 col0\" >$-1595.00</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddlevel0_row7\" class=\"row_heading level0 row7\" >Average P&L %</th>\n",
" <td id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddrow7_col0\" class=\"data row7 col0\" >0.00%</td>\n",
" </tr>\n",
" <tr>\n",
" <th id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddlevel0_row8\" class=\"row_heading level0 row8\" >Total P&L %</th>\n",
" <td id=\"T_ae9adb42_6a2e_11ea_9301_38f9d3530fddrow8_col0\" class=\"data row8 col0\" >99.68%</td>\n",
" </tr>\n",
" </tbody></table>"
],
"text/plain": [
"<pandas.io.formats.style.Styler at 0x11424c8d0>"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"summary(bt.trade_log, bt.balance)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Plot of the accumulated returns over time."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"<div id=\"altair-viz-2c5891ab576944f19a9e84fe24e24531\"></div>\n",
"<script type=\"text/javascript\">\n",
" (function(spec, embedOpt){\n",
" const outputDiv = document.getElementById(\"altair-viz-2c5891ab576944f19a9e84fe24e24531\");\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
" \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
" \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.0.2?noext\",\n",
" \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
" };\n",
"\n",
" function loadScript(lib) {\n",
" return new Promise(function(resolve, reject) {\n",
" var s = document.createElement('script');\n",
" s.src = paths[lib];\n",
" s.async = true;\n",
" s.onload = () => resolve(paths[lib]);\n",
" s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
" });\n",
" }\n",
"\n",
" function showError(err) {\n",
" outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
" throw err;\n",
" }\n",
"\n",
" function displayChart(vegaEmbed) {\n",
" vegaEmbed(outputDiv, spec, embedOpt)\n",
" .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
" }\n",
"\n",
" if(typeof define === \"function\" && define.amd) {\n",
" requirejs.config({paths});\n",
" require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
" } else if (typeof vegaEmbed === \"function\") {\n",
" displayChart(vegaEmbed);\n",
" } else {\n",
" loadScript(\"vega\")\n",
" .then(() => loadScript(\"vega-lite\"))\n",
" .then(() => loadScript(\"vega-embed\"))\n",
" .catch(showError)\n",
" .then(() => displayChart(vegaEmbed));\n",
" }\n",
" })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300}}, \"vconcat\": [{\"layer\": [{\"mark\": \"point\", \"encoding\": {\"opacity\": {\"value\": 0}, \"x\": {\"type\": \"temporal\", \"field\": \"index\"}}, \"selection\": {\"selector002\": {\"type\": \"single\", \"nearest\": true, \"on\": \"mouseover\", \"fields\": [\"index\"], \"empty\": \"none\"}}}, {\"mark\": \"point\", \"encoding\": {\"opacity\": {\"condition\": {\"value\": 1, \"selection\": \"selector002\"}, \"value\": 0}, \"x\": {\"type\": \"temporal\", \"field\": \"index\"}, \"y\": {\"type\": \"quantitative\", \"axis\": {\"format\": \"%\"}, \"field\": \"accumulated return\"}}}, {\"mark\": {\"type\": \"text\", \"align\": \"left\", \"dx\": 5, \"dy\": -5}, \"encoding\": {\"text\": {\"condition\": {\"type\": \"quantitative\", \"field\": \"accumulated return\", \"format\": \".2%\", \"selection\": \"selector002\"}, \"value\": \" \"}, \"x\": {\"type\": \"temporal\", \"field\": \"index\"}, \"y\": {\"type\": \"quantitative\", \"axis\": {\"format\": \"%\"}, \"field\": \"accumulated return\"}}}, {\"mark\": {\"type\": \"area\", \"opacity\": 0.7}, \"encoding\": {\"x\": {\"type\": \"temporal\", \"axis\": {\"title\": \"date\"}, \"field\": \"index\", \"scale\": {\"domain\": {\"selection\": \"selector001\"}}}, \"y\": {\"type\": \"quantitative\", \"axis\": {\"format\": \"%\"}, \"field\": \"accumulated return\"}}}], \"height\": 350, \"title\": \"Returns over time\", \"width\": 700}, {\"mark\": {\"type\": \"area\", \"opacity\": 0.7}, \"encoding\": {\"x\": {\"type\": \"temporal\", \"field\": \"index\"}, \"y\": {\"type\": \"quantitative\", \"axis\": {\"format\": \"%\"}, \"field\": \"accumulated return\"}}, \"height\": 70, \"selection\": {\"selector001\": {\"type\": \"interval\", \"encodings\": [\"x\"]}}, \"width\": 700}], \"data\": {\"name\": \"data-b11619311ba924a0aab032fb49fcef6a\"}, \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.0.2.json\", \"datasets\": {\"data-b11619311ba924a0aab032fb49fcef6a\": [{\"index\": \"2017-01-02T00:00:00\", \"total capital\": 1000000.0, \"cash\": 1000000.0, \"VOO\": null, \"TUR\": null, \"RSX\": null, \"options qty\": null, \"calls capital\": null, \"puts capital\": null, \"stocks qty\": null, \"options capital\": 0.0, \"stocks capital\": 0.0, \"% change\": null, \"accumulated return\": null}, {\"index\": \"2017-01-03T00:00:00\", \"total capital\": 999030.0, \"cash\": 110117.4059197504, \"VOO\": 199872.763319825, \"TUR\": 49993.2811670076, \"RSX\": 249986.549593417, \"options qty\": 2.0, \"calls capital\": 389060.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 389060.0, \"stocks capital\": 499852.5940802496, \"% change\": -0.0009700000000000264, \"accumulated return\": 0.99903}, {\"index\": \"2017-01-04T00:00:00\", \"total capital\": 1004227.8416392747, \"cash\": 110117.4059197504, \"VOO\": 201052.2388507, \"TUR\": 50072.86295812741, \"RSX\": 251605.33391069702, \"options qty\": 2.0, \"calls capital\": 391380.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391380.0, \"stocks capital\": 502730.4357195244, \"% change\": 0.0052028884410626475, \"accumulated return\": 1.0042278416392747}, {\"index\": \"2017-01-05T00:00:00\", \"total capital\": 1002705.5966059035, \"cash\": 110117.4059197504, \"VOO\": 200897.5535352275, \"TUR\": 49865.9503011456, \"RSX\": 250564.68684977992, \"options qty\": 2.0, \"calls capital\": 391260.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391260.0, \"stocks capital\": 501328.190686153, \"% change\": -0.0015158363174699874, \"accumulated return\": 1.0027055966059033}, {\"index\": \"2017-01-06T00:00:00\", \"total capital\": 1003200.872141938, \"cash\": 110117.4059197504, \"VOO\": 201680.6479450825, \"TUR\": 49372.543196413804, \"RSX\": 248830.2750806912, \"options qty\": 2.0, \"calls capital\": 393200.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 393200.0, \"stocks capital\": 499883.4662221875, \"% change\": 0.0004939391359846113, \"accumulated return\": 1.0032008721419376}, {\"index\": \"2017-01-09T00:00:00\", \"total capital\": 999601.121276139, \"cash\": 110117.4059197504, \"VOO\": 201042.571018515, \"TUR\": 48735.8888676312, \"RSX\": 247905.25547024247, \"options qty\": 2.0, \"calls capital\": 391800.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391800.0, \"stocks capital\": 497683.7153563887, \"% change\": -0.0035882652874025256, \"accumulated return\": 0.9996011212761388}, {\"index\": \"2017-01-10T00:00:00\", \"total capital\": 998887.8133757368, \"cash\": 110117.4059197504, \"VOO\": 201013.5675218575, \"TUR\": 47749.074657991805, \"RSX\": 248367.765276137, \"options qty\": 2.0, \"calls capital\": 391640.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391640.0, \"stocks capital\": 497130.40745598637, \"% change\": -0.00071359253728287, \"accumulated return\": 0.9988878133757365}, {\"index\": \"2017-01-11T00:00:00\", \"total capital\": 1003433.9814221435, \"cash\": 110117.4059197504, \"VOO\": 201583.96962282248, \"TUR\": 47685.4092252366, \"RSX\": 251027.1966543341, \"options qty\": 2.0, \"calls capital\": 393020.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 393020.0, \"stocks capital\": 500296.5755023932, \"% change\": 0.0045512298633847426, \"accumulated return\": 1.0034339814221434}, {\"index\": \"2017-01-12T00:00:00\", \"total capital\": 1004506.8747537413, \"cash\": 110117.4059197504, \"VOO\": 201139.2493406725, \"TUR\": 50423.022838984194, \"RSX\": 251027.1966543341, \"options qty\": 2.0, \"calls capital\": 391800.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391800.0, \"stocks capital\": 502589.46883399086, \"% change\": 0.0010692216443350944, \"accumulated return\": 1.0045068747537413}, {\"index\": \"2017-01-13T00:00:00\", \"total capital\": 1004333.4980239185, \"cash\": 110117.4059197504, \"VOO\": 201535.6304616925, \"TUR\": 51839.5787204244, \"RSX\": 248020.88292205118, \"options qty\": 2.0, \"calls capital\": 392820.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 392820.0, \"stocks capital\": 501396.0921041681, \"% change\": -0.00017259884843034978, \"accumulated return\": 1.0043334980239185}, {\"index\": \"2017-01-17T00:00:00\", \"total capital\": 999687.171947015, \"cash\": 110117.4059197504, \"VOO\": 200820.21087744, \"TUR\": 51314.3388991392, \"RSX\": 246055.21625068542, \"options qty\": 2.0, \"calls capital\": 391380.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391380.0, \"stocks capital\": 498189.76602726465, \"% change\": -0.0046262781098563854, \"accumulated return\": 0.999687171947015}, {\"index\": \"2017-01-18T00:00:00\", \"total capital\": 999644.8675444693, \"cash\": 110117.4059197504, \"VOO\": 201245.5954951175, \"TUR\": 51202.924391641805, \"RSX\": 244898.9417379596, \"options qty\": 2.0, \"calls capital\": 392180.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 392180.0, \"stocks capital\": 497347.4616247189, \"% change\": -4.2317640690847647e-05, \"accumulated return\": 0.9996448675444692}, {\"index\": \"2017-01-19T00:00:00\", \"total capital\": 994540.0109575856, \"cash\": 110117.4059197504, \"VOO\": 200568.8472397075, \"TUR\": 50216.110182002405, \"RSX\": 242817.6476161254, \"options qty\": 2.0, \"calls capital\": 390820.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 390820.0, \"stocks capital\": 493602.6050378353, \"% change\": -0.00510667013118693, \"accumulated return\": 0.9945400109575856}, {\"index\": \"2017-01-20T00:00:00\", \"total capital\": 998629.7494159428, \"cash\": 110117.4059197504, \"VOO\": 201216.59199846003, \"TUR\": 51553.0842724986, \"RSX\": 243742.6672252338, \"options qty\": 2.0, \"calls capital\": 392000.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 392000.0, \"stocks capital\": 496512.3434961924, \"% change\": 0.004112190976026664, \"accumulated return\": 0.9986297494159428}, {\"index\": \"2017-01-23T00:00:00\", \"total capital\": 999035.2457857206, \"cash\": 110117.4059197504, \"VOO\": 200752.53605194, \"TUR\": 52141.989526539, \"RSX\": 244783.3142874912, \"options qty\": 2.0, \"calls capital\": 391240.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391240.0, \"stocks capital\": 497677.8398659702, \"% change\": 0.00040605276381455724, \"accumulated return\": 0.9990352457857207}, {\"index\": \"2017-01-24T00:00:00\", \"total capital\": 1006089.1278787092, \"cash\": 110117.4059197504, \"VOO\": 202028.68990497253, \"TUR\": 52253.4040342122, \"RSX\": 247789.6280197741, \"options qty\": 2.0, \"calls capital\": 393900.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 393900.0, \"stocks capital\": 502071.72195895883, \"% change\": 0.007060693927210648, \"accumulated return\": 1.0060891278787094}, {\"index\": \"2017-01-25T00:00:00\", \"total capital\": 1011414.1672377097, \"cash\": 110117.4059197504, \"VOO\": 203710.89271131248, \"TUR\": 51075.593525955606, \"RSX\": 248830.2750806912, \"options qty\": 2.0, \"calls capital\": 397680.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 397680.0, \"stocks capital\": 503616.7613179593, \"% change\": 0.005292810757460575, \"accumulated return\": 1.01141416723771}, {\"index\": \"2017-01-26T00:00:00\", \"total capital\": 1011147.9078092412, \"cash\": 110117.4059197504, \"VOO\": 203556.2073957375, \"TUR\": 50852.764510785, \"RSX\": 249061.52998296826, \"options qty\": 2.0, \"calls capital\": 397560.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 397560.0, \"stocks capital\": 503470.50188949076, \"% change\": -0.00026325459647824623, \"accumulated return\": 1.0111479078092414}, {\"index\": \"2017-01-27T00:00:00\", \"total capital\": 1016461.3370006289, \"cash\": 110117.4059197504, \"VOO\": 203266.1724291625, \"TUR\": 50932.3463019048, \"RSX\": 255305.41234981123, \"options qty\": 2.0, \"calls capital\": 396840.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 396840.0, \"stocks capital\": 509503.93108087854, \"% change\": 0.0052548486233827685, \"accumulated return\": 1.016461337000629}, {\"index\": \"2017-01-30T00:00:00\", \"total capital\": 1010510.6690260002, \"cash\": 110117.4059197504, \"VOO\": 202038.35773715752, \"TUR\": 53478.9636170352, \"RSX\": 250795.94175205703, \"options qty\": 2.0, \"calls capital\": 394080.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 394080.0, \"stocks capital\": 506313.26310624974, \"% change\": -0.0058542983958327355, \"accumulated return\": 1.0105106690260002}, {\"index\": \"2017-01-31T00:00:00\", \"total capital\": 1007052.4665633582, \"cash\": 110117.4059197504, \"VOO\": 202028.68990497253, \"TUR\": 53494.879975224, \"RSX\": 247211.49076341122, \"options qty\": 2.0, \"calls capital\": 394200.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 394200.0, \"stocks capital\": 502735.06064360775, \"% change\": -0.003422232509405654, \"accumulated return\": 1.0070524665633582}, {\"index\": \"2017-02-01T00:00:00\", \"total capital\": 1009815.8520774813, \"cash\": 505054.19605235837, \"VOO\": 201860.56394465282, \"TUR\": 50462.460641175, \"RSX\": 252438.6314392951, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 504761.65602512297, \"% change\": 0.002744033310948968, \"accumulated return\": 1.0098158520774814}, {\"index\": \"2017-02-02T00:00:00\", \"total capital\": 1012785.8768912704, \"cash\": 505054.19605235837, \"VOO\": 201947.48954634237, \"TUR\": 51358.774329225, \"RSX\": 254425.4169633446, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 507731.680838912, \"% change\": 0.0029411548726223646, \"accumulated return\": 1.0127858768912703}, {\"index\": \"2017-02-03T00:00:00\", \"total capital\": 1015813.6844872597, \"cash\": 505054.19605235837, \"VOO\": 203444.5415755776, \"TUR\": 52538.920685295, \"RSX\": 254776.02617402878, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 510759.48843490134, \"% change\": 0.002989583153828246, \"accumulated return\": 1.0158136844872596}, {\"index\": \"2017-02-06T00:00:00\", \"total capital\": 1013697.1678595312, \"cash\": 505054.19605235837, \"VOO\": 203019.5719672832, \"TUR\": 52016.071033905, \"RSX\": 253607.3288059846, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 508642.9718071728, \"% change\": -0.0020835677448043377, \"accumulated return\": 1.013697167859531}, {\"index\": \"2017-02-07T00:00:00\", \"total capital\": 1011344.7781565203, \"cash\": 505054.19605235837, \"VOO\": 203067.86396825602, \"TUR\": 51134.695907295, \"RSX\": 252088.02222861093, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 506290.58210416196, \"% change\": -0.0023206040004808415, \"accumulated return\": 1.0113447781565201}, {\"index\": \"2017-02-08T00:00:00\", \"total capital\": 1011395.5642818585, \"cash\": 505054.19605235837, \"VOO\": 203328.6407733248, \"TUR\": 52210.272332955, \"RSX\": 250802.45512322037, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 506341.36822950013, \"% change\": 5.0216431067839906e-05, \"accumulated return\": 1.0113955642818582}, {\"index\": \"2017-02-09T00:00:00\", \"total capital\": 1013565.1169755466, \"cash\": 505054.19605235837, \"VOO\": 204487.6487959552, \"TUR\": 52987.07752932, \"RSX\": 251036.194597913, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 508510.9209231882, \"% change\": 0.002145107977835181, \"accumulated return\": 1.0135651169755464}, {\"index\": \"2017-02-10T00:00:00\", \"total capital\": 1016560.896337008, \"cash\": 505054.19605235837, \"VOO\": 205308.61281198077, \"TUR\": 52240.149456, \"RSX\": 253957.9380166688, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 511506.7002846496, \"% change\": 0.002955685146703413, \"accumulated return\": 1.0165608963370076}, {\"index\": \"2017-02-13T00:00:00\", \"total capital\": 1018093.4301054792, \"cash\": 505054.19605235837, \"VOO\": 206400.0120333312, \"TUR\": 53031.893213805, \"RSX\": 253607.3288059846, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 513039.23405312083, \"% change\": 0.0015075671059092688, \"accumulated return\": 1.018093430105479}, {\"index\": \"2017-02-14T00:00:00\", \"total capital\": 1019273.7598101282, \"cash\": 505054.19605235837, \"VOO\": 207259.60965017602, \"TUR\": 53002.016090925, \"RSX\": 253957.9380166688, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 514219.5637577698, \"% change\": 0.0011593530316040823, \"accumulated return\": 1.019273759810128}, {\"index\": \"2017-02-15T00:00:00\", \"total capital\": 1019145.5282568685, \"cash\": 505054.19605235837, \"VOO\": 208312.37527070718, \"TUR\": 53106.58602117, \"RSX\": 252672.370912633, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 514091.33220451017, \"% change\": -0.00012580678353146801, \"accumulated return\": 1.0191455282568682}, {\"index\": \"2017-02-16T00:00:00\", \"total capital\": 1018212.4465218137, \"cash\": 505054.19605235837, \"VOO\": 208148.1824674816, \"TUR\": 52688.306300025, \"RSX\": 252321.76170194877, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 513158.2504694554, \"% change\": -0.000915552989425028, \"accumulated return\": 1.0182124465218134}, {\"index\": \"2017-02-17T00:00:00\", \"total capital\": 1015387.1398226888, \"cash\": 505054.19605235837, \"VOO\": 208466.9096737792, \"TUR\": 53868.452656094996, \"RSX\": 247997.5814404562, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 510332.9437703304, \"% change\": -0.0027747713247624484, \"accumulated return\": 1.0153871398226886}, {\"index\": \"2017-02-21T00:00:00\", \"total capital\": 1019570.6546997868, \"cash\": 505054.19605235837, \"VOO\": 209693.5264976896, \"TUR\": 54137.346762509995, \"RSX\": 250685.58538722878, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 514516.45864742843, \"% change\": 0.004120118044658838, \"accumulated return\": 1.0195706546997865}, {\"index\": \"2017-02-22T00:00:00\", \"total capital\": 1015595.4085261372, \"cash\": 505054.19605235837, \"VOO\": 209596.9424958464, \"TUR\": 54465.995114850004, \"RSX\": 246478.27486308248, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 510541.21247377887, \"% change\": -0.003898941339009143, \"accumulated return\": 1.015595408526137}, {\"index\": \"2017-02-23T00:00:00\", \"total capital\": 1016771.0532236237, \"cash\": 505054.19605235837, \"VOO\": 209712.8432980992, \"TUR\": 54824.520590069995, \"RSX\": 247179.49328309618, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 511716.85717126535, \"% change\": 0.0011575915838302198, \"accumulated return\": 1.0167710532236234}, {\"index\": \"2017-02-24T00:00:00\", \"total capital\": 1010993.2505742339, \"cash\": 505054.19605235837, \"VOO\": 209963.9617030144, \"TUR\": 53704.128479925, \"RSX\": 242270.9643389362, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 505939.05452187563, \"% change\": -0.005682501120651939, \"accumulated return\": 1.0109932505742336}, {\"index\": \"2017-02-27T00:00:00\", \"total capital\": 1009203.0476599257, \"cash\": 505054.19605235837, \"VOO\": 210273.03050905603, \"TUR\": 53241.033074295, \"RSX\": 240634.78802421622, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 504148.8516075673, \"% change\": -0.00177073676138928, \"accumulated return\": 1.0092030476599254}, {\"index\": \"2017-02-28T00:00:00\", \"total capital\": 1002929.4530303624, \"cash\": 505054.19605235837, \"VOO\": 209654.8928969728, \"TUR\": 52494.105000974996, \"RSX\": 235726.2590800562, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 497875.256978004, \"% change\": -0.006216384942663522, \"accumulated return\": 1.002929453030362}, {\"index\": \"2017-03-01T00:00:00\", \"total capital\": 1011221.2301669243, \"cash\": 127483.72584741499, \"VOO\": 202247.371553811, \"TUR\": 50574.1829736384, \"RSX\": 252945.9497920599, \"options qty\": 2.0, \"calls capital\": 377960.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 377970.0, \"stocks capital\": 505767.5043195093, \"% change\": 0.008267557714561224, \"accumulated return\": 1.011221230166924}, {\"index\": \"2017-03-02T00:00:00\", \"total capital\": 1001108.4908515736, \"cash\": 127483.72584741499, \"VOO\": 201062.2745321436, \"TUR\": 49545.7942947388, \"RSX\": 247906.6961772762, \"options qty\": 2.0, \"calls capital\": 375100.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 375110.0, \"stocks capital\": 498514.7650041586, \"% change\": -0.010000521165562715, \"accumulated return\": 1.0011084908515733}, {\"index\": \"2017-03-03T00:00:00\", \"total capital\": 1006812.0195110175, \"cash\": 127483.72584741499, \"VOO\": 201172.51611553642, \"TUR\": 50165.645005334, \"RSX\": 252700.132542732, \"options qty\": 2.0, \"calls capital\": 375280.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 375290.0, \"stocks capital\": 504038.29366360244, \"% change\": 0.005697213350565278, \"accumulated return\": 1.006812019511017}, {\"index\": \"2017-03-06T00:00:00\", \"total capital\": 1002821.5616985669, \"cash\": 127483.72584741499, \"VOO\": 200547.81380961143, \"TUR\": 50700.9706188884, \"RSX\": 250119.051422652, \"options qty\": 2.0, \"calls capital\": 373960.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 373970.0, \"stocks capital\": 501367.83585115185, \"% change\": -0.003963458654763219, \"accumulated return\": 1.0028215616985665}, {\"index\": \"2017-03-07T00:00:00\", \"total capital\": 997899.3256049021, \"cash\": 127483.72584741499, \"VOO\": 199941.48510085358, \"TUR\": 51123.59610347, \"RSX\": 246800.5185531636, \"options qty\": 2.0, \"calls capital\": 372540.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 372550.0, \"stocks capital\": 497865.5997574872, \"% change\": -0.0049083867775315815, \"accumulated return\": 0.9978993256049017}, {\"index\": \"2017-03-08T00:00:00\", \"total capital\": 988315.2655834621, \"cash\": 127483.72584741499, \"VOO\": 199518.89236454698, \"TUR\": 49010.4686811844, \"RSX\": 240532.17869031572, \"options qty\": 2.0, \"calls capital\": 371760.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 371770.0, \"stocks capital\": 489061.5397360471, \"% change\": -0.009604235392814187, \"accumulated return\": 0.9883152655834617}, {\"index\": \"2017-03-09T00:00:00\", \"total capital\": 985393.9003863579, \"cash\": 127483.72584741499, \"VOO\": 199730.188732749, \"TUR\": 48404.705486710795, \"RSX\": 237705.28031948314, \"options qty\": 2.0, \"calls capital\": 372060.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 372070.0, \"stocks capital\": 485840.1745389429, \"% change\": -0.002955904152082023, \"accumulated return\": 0.9853939003863575}, {\"index\": \"2017-03-10T00:00:00\", \"total capital\": 990516.0739513865, \"cash\": 127483.72584741499, \"VOO\": 200428.38542763502, \"TUR\": 49602.14435938079, \"RSX\": 239671.8183169557, \"options qty\": 2.0, \"calls capital\": 373320.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 373330.0, \"stocks capital\": 489702.3481039715, \"% change\": 0.005198097494839571, \"accumulated return\": 0.9905160739513861}, {\"index\": \"2017-03-13T00:00:00\", \"total capital\": 995908.0635372915, \"cash\": 127483.72584741499, \"VOO\": 200547.81380961143, \"TUR\": 49461.2691978536, \"RSX\": 244465.2546824115, \"options qty\": 2.0, \"calls capital\": 373940.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 373950.0, \"stocks capital\": 494474.33768987656, \"% change\": 0.005443616441674903, \"accumulated return\": 0.9959080635372911}, {\"index\": \"2017-03-14T00:00:00\", \"total capital\": 990099.1361394529, \"cash\": 127483.72584741499, \"VOO\": 199867.99071199002, \"TUR\": 49193.6063910764, \"RSX\": 241023.81318897152, \"options qty\": 2.0, \"calls capital\": 372520.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 372530.0, \"stocks capital\": 490085.41029203794, \"% change\": -0.0058327948236569505, \"accumulated return\": 0.9900991361394526}, {\"index\": \"2017-03-15T00:00:00\", \"total capital\": 1004217.915920173, \"cash\": 127483.72584741499, \"VOO\": 201530.80126166038, \"TUR\": 50715.0581351656, \"RSX\": 248398.330675932, \"options qty\": 2.0, \"calls capital\": 376080.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 376090.0, \"stocks capital\": 500644.190072758, \"% change\": 0.014259965760369697, \"accumulated return\": 1.0042179159201727}, {\"index\": \"2017-03-16T00:00:00\", \"total capital\": 1006976.8075048584, \"cash\": 127483.72584741499, \"VOO\": 201190.88971280103, \"TUR\": 51489.871523254, \"RSX\": 251102.32042138834, \"options qty\": 2.0, \"calls capital\": 375700.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 375710.0, \"stocks capital\": 503783.08165744337, \"% change\": 0.002747303688719116, \"accumulated return\": 1.006976807504858}, {\"index\": \"2017-03-17T00:00:00\", \"total capital\": 1011579.0852338187, \"cash\": 127483.72584741499, \"VOO\": 200786.6705736616, \"TUR\": 51602.571652538, \"RSX\": 256756.1171602041, \"options qty\": 2.0, \"calls capital\": 374940.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 374950.0, \"stocks capital\": 509145.3593864037, \"% change\": 0.004570390990795703, \"accumulated return\": 1.0115790852338185}, {\"index\": \"2017-03-20T00:00:00\", \"total capital\": 1010205.5741872321, \"cash\": 127483.72584741499, \"VOO\": 200577.85464109862, \"TUR\": 51886.435102792806, \"RSX\": 256377.55859592566, \"options qty\": 2.0, \"calls capital\": 373880.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 373880.0, \"stocks capital\": 508841.8483398171, \"% change\": -0.0013577890909727275, \"accumulated return\": 1.0102055741872318}, {\"index\": \"2017-03-21T00:00:00\", \"total capital\": 1000794.9919489194, \"cash\": 127483.72584741499, \"VOO\": 198049.00458581396, \"TUR\": 51123.59610347, \"RSX\": 256018.6654122204, \"options qty\": 2.0, \"calls capital\": 368120.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 368120.0, \"stocks capital\": 505191.2661015044, \"% change\": -0.009315512088600375, \"accumulated return\": 1.0007949919489192}, {\"index\": \"2017-03-22T00:00:00\", \"total capital\": 1002639.9966500474, \"cash\": 127483.72584741499, \"VOO\": 198451.3863652172, \"TUR\": 51165.858651834795, \"RSX\": 256879.02578558036, \"options qty\": 2.0, \"calls capital\": 368660.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 368660.0, \"stocks capital\": 506496.2708026323, \"% change\": 0.0018435391023841063, \"accumulated return\": 1.0026399966500472}, {\"index\": \"2017-03-23T00:00:00\", \"total capital\": 1000580.1047139103, \"cash\": 127483.72584741499, \"VOO\": 198248.338718472, \"TUR\": 50912.28336117921, \"RSX\": 255895.75678684408, \"options qty\": 2.0, \"calls capital\": 368040.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 368040.0, \"stocks capital\": 505056.3788664953, \"% change\": -0.002054468147111077, \"accumulated return\": 1.0005801047139102}, {\"index\": \"2017-03-24T00:00:00\", \"total capital\": 1003684.4742200433, \"cash\": 127483.72584741499, \"VOO\": 198183.7326491062, \"TUR\": 51743.4468139096, \"RSX\": 257493.56890961248, \"options qty\": 2.0, \"calls capital\": 368780.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 368780.0, \"stocks capital\": 507420.7483726283, \"% change\": 0.003102569690830226, \"accumulated return\": 1.0036844742200433}, {\"index\": \"2017-03-27T00:00:00\", \"total capital\": 999285.9123006593, \"cash\": 127483.72584741499, \"VOO\": 197860.702301985, \"TUR\": 51348.99636172681, \"RSX\": 254912.4877895325, \"options qty\": 2.0, \"calls capital\": 367680.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 367680.0, \"stocks capital\": 504122.1864532443, \"% change\": -0.004382415024205666, \"accumulated return\": 0.9992859123006593}, {\"index\": \"2017-03-28T00:00:00\", \"total capital\": 1003831.1819641821, \"cash\": 127483.72584741499, \"VOO\": 199328.1830215638, \"TUR\": 50320.6076829828, \"RSX\": 256018.6654122204, \"options qty\": 2.0, \"calls capital\": 370680.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 370680.0, \"stocks capital\": 505667.456116767, \"% change\": 0.004548517704065391, \"accumulated return\": 1.003831181964182}, {\"index\": \"2017-03-29T00:00:00\", \"total capital\": 1005620.6501288661, \"cash\": 127483.72584741499, \"VOO\": 199623.52505313122, \"TUR\": 50546.007941395204, \"RSX\": 256387.39128692463, \"options qty\": 2.0, \"calls capital\": 371580.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 371580.0, \"stocks capital\": 506556.92428145104, \"% change\": 0.0017826385520149923, \"accumulated return\": 1.0056206501288663}, {\"index\": \"2017-03-30T00:00:00\", \"total capital\": 1009197.9704601925, \"cash\": 127483.72584741499, \"VOO\": 200158.8324854506, \"TUR\": 50461.48284435439, \"RSX\": 258353.9292829725, \"options qty\": 2.0, \"calls capital\": 372740.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 372740.0, \"stocks capital\": 508974.2446127775, \"% change\": 0.0035573258473442504, \"accumulated return\": 1.0091979704601928}, {\"index\": \"2017-03-31T00:00:00\", \"total capital\": 1003668.0627598402, \"cash\": 127483.72584741499, \"VOO\": 199678.9016841414, \"TUR\": 50433.307812111205, \"RSX\": 254052.1274161725, \"options qty\": 2.0, \"calls capital\": 372020.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 372020.0, \"stocks capital\": 504164.3369124251, \"% change\": -0.005479507353577717, \"accumulated return\": 1.0036680627598404}, {\"index\": \"2017-04-03T00:00:00\", \"total capital\": 1005979.0172616325, \"cash\": 503132.91658682376, \"VOO\": 201067.73318452522, \"TUR\": 50290.5675938531, \"RSX\": 251487.79989643043, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 502846.1006748087, \"% change\": 0.002302508755173349, \"accumulated return\": 1.0059790172616327}, {\"index\": \"2017-04-04T00:00:00\", \"total capital\": 1008207.2690905331, \"cash\": 503132.91658682376, \"VOO\": 201179.396124066, \"TUR\": 49883.867521292996, \"RSX\": 254011.08885835038, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 505074.3525037094, \"% change\": 0.0022150082563014983, \"accumulated return\": 1.0082072690905333}, {\"index\": \"2017-04-05T00:00:00\", \"total capital\": 1009291.242551543, \"cash\": 503132.91658682376, \"VOO\": 200565.24995649338, \"TUR\": 49659.4812743259, \"RSX\": 255933.59473389998, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 506158.3259647193, \"% change\": 0.001075149420404209, \"accumulated return\": 1.0092912425515432}, {\"index\": \"2017-04-06T00:00:00\", \"total capital\": 1009445.805771449, \"cash\": 503132.91658682376, \"VOO\": 201086.3436744814, \"TUR\": 49533.2640105134, \"RSX\": 255693.28149963042, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 506312.88918462524, \"% change\": 0.00015314035571645235, \"accumulated return\": 1.009445805771449}, {\"index\": \"2017-04-07T00:00:00\", \"total capital\": 1001000.1871619804, \"cash\": 503132.91658682376, \"VOO\": 200909.54402014302, \"TUR\": 49435.0950275137, \"RSX\": 247522.6315275, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 497867.2705751567, \"% change\": -0.008366589430736426, \"accumulated return\": 1.0010001871619805}, {\"index\": \"2017-04-10T00:00:00\", \"total capital\": 996604.4697195555, \"cash\": 503132.91658682376, \"VOO\": 201049.122694569, \"TUR\": 50907.6297729739, \"RSX\": 241514.80066518878, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 493471.5531327317, \"% change\": -0.004391325295240556, \"accumulated return\": 0.9966044697195555}, {\"index\": \"2017-04-11T00:00:00\", \"total capital\": 999225.217731294, \"cash\": 503132.91658682376, \"VOO\": 200797.88108050398, \"TUR\": 51496.64367112701, \"RSX\": 243797.77639283918, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 496092.30114447017, \"% change\": 0.0026296771601637126, \"accumulated return\": 0.9992252177312941}, {\"index\": \"2017-04-12T00:00:00\", \"total capital\": 995303.2821144352, \"cash\": 503132.91658682376, \"VOO\": 199969.71427877882, \"TUR\": 52127.7299906542, \"RSX\": 240072.9212581784, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 492170.36552761146, \"% change\": -0.003924976619148368, \"accumulated return\": 0.9953032821144354}, {\"index\": \"2017-04-13T00:00:00\", \"total capital\": 993811.9537869778, \"cash\": 503132.91658682376, \"VOO\": 198639.0642489236, \"TUR\": 51005.7987559736, \"RSX\": 241034.1741952568, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 490679.03720015404, \"% change\": -0.0014983657285739804, \"accumulated return\": 0.993811953786978}, {\"index\": \"2017-04-17T00:00:00\", \"total capital\": 998846.299175555, \"cash\": 503132.91658682376, \"VOO\": 200379.14505712778, \"TUR\": 50935.678053786694, \"RSX\": 244398.55947781677, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 495713.38258873124, \"% change\": 0.005065692125550969, \"accumulated return\": 0.9988462991755551}, {\"index\": \"2017-04-18T00:00:00\", \"total capital\": 995369.9077458387, \"cash\": 503132.91658682376, \"VOO\": 199830.13560425458, \"TUR\": 51973.464445874, \"RSX\": 240433.39110888643, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 492236.991159015, \"% change\": -0.003480406777885303, \"accumulated return\": 0.9953699077458389}, {\"index\": \"2017-04-19T00:00:00\", \"total capital\": 991545.8362113129, \"cash\": 503132.91658682376, \"VOO\": 199392.78909102042, \"TUR\": 51230.1850029407, \"RSX\": 237789.945530528, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 488412.91962448915, \"% change\": -0.0038418596993614607, \"accumulated return\": 0.991545836211313}, {\"index\": \"2017-04-20T00:00:00\", \"total capital\": 998589.9695595354, \"cash\": 503132.91658682376, \"VOO\": 201021.2069596838, \"TUR\": 52800.8887314006, \"RSX\": 241634.95728162723, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 495457.0529727116, \"% change\": 0.00710419336249557, \"accumulated return\": 0.9985899695595355}, {\"index\": \"2017-04-21T00:00:00\", \"total capital\": 998546.5228046967, \"cash\": 503132.91658682376, \"VOO\": 200434.9765269964, \"TUR\": 52983.2025571485, \"RSX\": 241995.427133728, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 495413.60621787293, \"% change\": -4.3508102587797026e-05, \"accumulated return\": 0.9985465228046968}, {\"index\": \"2017-04-24T00:00:00\", \"total capital\": 1008529.8195584803, \"cash\": 503132.91658682376, \"VOO\": 202575.1828687188, \"TUR\": 55058.7753411682, \"RSX\": 247762.94476176958, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 505396.9029716566, \"% change\": 0.009997828369320949, \"accumulated return\": 1.0085298195584804}, {\"index\": \"2017-04-25T00:00:00\", \"total capital\": 1012206.1327077679, \"cash\": 503132.91658682376, \"VOO\": 203794.1699590332, \"TUR\": 55353.2822903222, \"RSX\": 249925.76387158877, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 509073.2161209441, \"% change\": 0.0036452200797563172, \"accumulated return\": 1.012206132707768}, {\"index\": \"2017-04-26T00:00:00\", \"total capital\": 1009605.9833754776, \"cash\": 503132.91658682376, \"VOO\": 203645.28603957998, \"TUR\": 55184.992605135594, \"RSX\": 247642.78814393832, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 506473.0667886539, \"% change\": -0.0025687942883082515, \"accumulated return\": 1.0096059833754778}, {\"index\": \"2017-04-27T00:00:00\", \"total capital\": 1012525.8718891535, \"cash\": 503132.91658682376, \"VOO\": 203803.4752039622, \"TUR\": 55423.40299250911, \"RSX\": 250166.0771058584, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 509392.95530232973, \"% change\": 0.0028921069820859735, \"accumulated return\": 1.0125258718891539}, {\"index\": \"2017-04-28T00:00:00\", \"total capital\": 1013206.5948156436, \"cash\": 503132.91658682376, \"VOO\": 203412.65491547118, \"TUR\": 55774.0065032887, \"RSX\": 250887.01681006, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 510073.67822881986, \"% change\": 0.0006723017607639381, \"accumulated return\": 1.013206594815644}, {\"index\": \"2017-05-01T00:00:00\", \"total capital\": 1014478.7119102319, \"cash\": 507298.0361816145, \"VOO\": 202867.615826789, \"TUR\": 50710.8210158709, \"RSX\": 253602.2388859575, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 507180.67572861735, \"% change\": 0.0012555357427570524, \"accumulated return\": 1.014478711910232}, {\"index\": \"2017-05-02T00:00:00\", \"total capital\": 1012901.8573575469, \"cash\": 507298.0361816145, \"VOO\": 202932.42088815488, \"TUR\": 51005.0563547625, \"RSX\": 251666.34393301498, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 505603.82117593236, \"% change\": -0.0015543495730094836, \"accumulated return\": 1.0129018573575472}, {\"index\": \"2017-05-03T00:00:00\", \"total capital\": 1007480.5195675207, \"cash\": 507298.0361816145, \"VOO\": 202728.74783807804, \"TUR\": 50506.135562698204, \"RSX\": 246947.59998513, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 500182.4833859062, \"% change\": -0.005352283393150636, \"accumulated return\": 1.007480519567521}, {\"index\": \"2017-05-04T00:00:00\", \"total capital\": 1001924.5827774454, \"cash\": 507298.0361816145, \"VOO\": 202913.9051563919, \"TUR\": 49725.77227253911, \"RSX\": 241986.8691669, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 494626.546595831, \"% change\": -0.005514684087847388, \"accumulated return\": 1.0019245827774457}, {\"index\": \"2017-05-05T00:00:00\", \"total capital\": 1007672.8706721851, \"cash\": 507298.0361816145, \"VOO\": 203728.5973569926, \"TUR\": 50787.57806079299, \"RSX\": 245858.65907278497, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 500374.8344905706, \"% change\": 0.005737246089725367, \"accumulated return\": 1.0076728706721854}, {\"index\": \"2017-05-08T00:00:00\", \"total capital\": 1004932.2725337704, \"cash\": 507298.0361816145, \"VOO\": 203737.8552229718, \"TUR\": 49610.6367052266, \"RSX\": 244285.7444239575, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 497634.2363521559, \"% change\": -0.0027197300018472204, \"accumulated return\": 1.0049322725337706}, {\"index\": \"2017-05-09T00:00:00\", \"total capital\": 1006725.1599151283, \"cash\": 507298.0361816145, \"VOO\": 203478.63497731282, \"TUR\": 49968.8362482435, \"RSX\": 245979.6525079575, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 499427.1237335138, \"% change\": 0.0017840877742312244, \"accumulated return\": 1.0067251599151286}, {\"index\": \"2017-05-10T00:00:00\", \"total capital\": 1012415.1783633089, \"cash\": 507298.0361816145, \"VOO\": 203858.2074798221, \"TUR\": 51286.4988528573, \"RSX\": 249972.435849015, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 505117.1421816944, \"% change\": 0.005652007791938196, \"accumulated return\": 1.012415178363309}, {\"index\": \"2017-05-11T00:00:00\", \"total capital\": 1011435.6894008886, \"cash\": 507298.0361816145, \"VOO\": 203441.6035135914, \"TUR\": 50723.6138566677, \"RSX\": 249972.435849015, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 504137.6532192741, \"% change\": -0.0009674775560000182, \"accumulated return\": 1.011435689400889}, {\"index\": \"2017-05-12T00:00:00\", \"total capital\": 1008598.7105409995, \"cash\": 507298.0361816145, \"VOO\": 203126.836072448, \"TUR\": 50621.271130152, \"RSX\": 247552.56715678502, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 501300.67435938504, \"% change\": -0.0028049028619600014, \"accumulated return\": 1.008598710541}, {\"index\": \"2017-05-15T00:00:00\", \"total capital\": 1015903.6499738359, \"cash\": 507298.0361816145, \"VOO\": 204154.4591892025, \"TUR\": 51695.8697590614, \"RSX\": 252755.28484395752, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 508605.6137922214, \"% change\": 0.007242661879785839, \"accumulated return\": 1.0159036499738363}, {\"index\": \"2017-05-16T00:00:00\", \"total capital\": 1014650.8262976833, \"cash\": 507298.0361816145, \"VOO\": 204117.4277254811, \"TUR\": 51811.005326515195, \"RSX\": 251424.35706407254, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 507352.7901160688, \"% change\": -0.0012332111181851957, \"accumulated return\": 1.0146508262976837}, {\"index\": \"2017-05-17T00:00:00\", \"total capital\": 1005523.8814051935, \"cash\": 507298.0361816145, \"VOO\": 200497.60215213662, \"TUR\": 50659.6496525424, \"RSX\": 247068.59341889995, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 498225.845223579, \"% change\": -0.008995158389406455, \"accumulated return\": 1.0055238814051939}, {\"index\": \"2017-05-18T00:00:00\", \"total capital\": 1001335.5270646827, \"cash\": 507298.0361816145, \"VOO\": 201228.9735596084, \"TUR\": 49853.7006807897, \"RSX\": 242954.81664267002, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 494037.4908830681, \"% change\": -0.00416534546614411, \"accumulated return\": 1.001335527064683}]}}, {\"mode\": \"vega-lite\"});\n",
"</script>"
],
"text/plain": [
"alt.VConcatChart(...)"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"returns_chart(bt.balance)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Daily returns histogram."
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"<div id=\"altair-viz-02180805caf44e37a34c90466f5d04d5\"></div>\n",
"<script type=\"text/javascript\">\n",
" (function(spec, embedOpt){\n",
" const outputDiv = document.getElementById(\"altair-viz-02180805caf44e37a34c90466f5d04d5\");\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
" \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
" \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.0.2?noext\",\n",
" \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
" };\n",
"\n",
" function loadScript(lib) {\n",
" return new Promise(function(resolve, reject) {\n",
" var s = document.createElement('script');\n",
" s.src = paths[lib];\n",
" s.async = true;\n",
" s.onload = () => resolve(paths[lib]);\n",
" s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
" });\n",
" }\n",
"\n",
" function showError(err) {\n",
" outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
" throw err;\n",
" }\n",
"\n",
" function displayChart(vegaEmbed) {\n",
" vegaEmbed(outputDiv, spec, embedOpt)\n",
" .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
" }\n",
"\n",
" if(typeof define === \"function\" && define.amd) {\n",
" requirejs.config({paths});\n",
" require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
" } else if (typeof vegaEmbed === \"function\") {\n",
" displayChart(vegaEmbed);\n",
" } else {\n",
" loadScript(\"vega\")\n",
" .then(() => loadScript(\"vega-lite\"))\n",
" .then(() => loadScript(\"vega-embed\"))\n",
" .catch(showError)\n",
" .then(() => displayChart(vegaEmbed));\n",
" }\n",
" })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300}}, \"data\": {\"name\": \"data-0bdbad4e1fbe03986452e1ce0139e2bd\"}, \"mark\": \"bar\", \"encoding\": {\"x\": {\"type\": \"quantitative\", \"axis\": {\"format\": \"%\"}, \"bin\": {\"maxbins\": 100}, \"field\": \"% change\"}, \"y\": {\"type\": \"quantitative\", \"aggregate\": \"count\"}}, \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.0.2.json\", \"datasets\": {\"data-0bdbad4e1fbe03986452e1ce0139e2bd\": [{\"total capital\": 1000000.0, \"cash\": 1000000.0, \"VOO\": null, \"TUR\": null, \"RSX\": null, \"options qty\": null, \"calls capital\": null, \"puts capital\": null, \"stocks qty\": null, \"options capital\": 0.0, \"stocks capital\": 0.0, \"% change\": null, \"accumulated return\": null}, {\"total capital\": 999030.0, \"cash\": 110117.4059197504, \"VOO\": 199872.763319825, \"TUR\": 49993.2811670076, \"RSX\": 249986.549593417, \"options qty\": 2.0, \"calls capital\": 389060.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 389060.0, \"stocks capital\": 499852.5940802496, \"% change\": -0.0009700000000000264, \"accumulated return\": 0.99903}, {\"total capital\": 1004227.8416392747, \"cash\": 110117.4059197504, \"VOO\": 201052.2388507, \"TUR\": 50072.86295812741, \"RSX\": 251605.33391069702, \"options qty\": 2.0, \"calls capital\": 391380.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391380.0, \"stocks capital\": 502730.4357195244, \"% change\": 0.0052028884410626475, \"accumulated return\": 1.0042278416392747}, {\"total capital\": 1002705.5966059035, \"cash\": 110117.4059197504, \"VOO\": 200897.5535352275, \"TUR\": 49865.9503011456, \"RSX\": 250564.68684977992, \"options qty\": 2.0, \"calls capital\": 391260.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391260.0, \"stocks capital\": 501328.190686153, \"% change\": -0.0015158363174699874, \"accumulated return\": 1.0027055966059033}, {\"total capital\": 1003200.872141938, \"cash\": 110117.4059197504, \"VOO\": 201680.6479450825, \"TUR\": 49372.543196413804, \"RSX\": 248830.2750806912, \"options qty\": 2.0, \"calls capital\": 393200.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 393200.0, \"stocks capital\": 499883.4662221875, \"% change\": 0.0004939391359846113, \"accumulated return\": 1.0032008721419376}, {\"total capital\": 999601.121276139, \"cash\": 110117.4059197504, \"VOO\": 201042.571018515, \"TUR\": 48735.8888676312, \"RSX\": 247905.25547024247, \"options qty\": 2.0, \"calls capital\": 391800.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391800.0, \"stocks capital\": 497683.7153563887, \"% change\": -0.0035882652874025256, \"accumulated return\": 0.9996011212761388}, {\"total capital\": 998887.8133757368, \"cash\": 110117.4059197504, \"VOO\": 201013.5675218575, \"TUR\": 47749.074657991805, \"RSX\": 248367.765276137, \"options qty\": 2.0, \"calls capital\": 391640.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391640.0, \"stocks capital\": 497130.40745598637, \"% change\": -0.00071359253728287, \"accumulated return\": 0.9988878133757365}, {\"total capital\": 1003433.9814221435, \"cash\": 110117.4059197504, \"VOO\": 201583.96962282248, \"TUR\": 47685.4092252366, \"RSX\": 251027.1966543341, \"options qty\": 2.0, \"calls capital\": 393020.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 393020.0, \"stocks capital\": 500296.5755023932, \"% change\": 0.0045512298633847426, \"accumulated return\": 1.0034339814221434}, {\"total capital\": 1004506.8747537413, \"cash\": 110117.4059197504, \"VOO\": 201139.2493406725, \"TUR\": 50423.022838984194, \"RSX\": 251027.1966543341, \"options qty\": 2.0, \"calls capital\": 391800.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391800.0, \"stocks capital\": 502589.46883399086, \"% change\": 0.0010692216443350944, \"accumulated return\": 1.0045068747537413}, {\"total capital\": 1004333.4980239185, \"cash\": 110117.4059197504, \"VOO\": 201535.6304616925, \"TUR\": 51839.5787204244, \"RSX\": 248020.88292205118, \"options qty\": 2.0, \"calls capital\": 392820.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 392820.0, \"stocks capital\": 501396.0921041681, \"% change\": -0.00017259884843034978, \"accumulated return\": 1.0043334980239185}, {\"total capital\": 999687.171947015, \"cash\": 110117.4059197504, \"VOO\": 200820.21087744, \"TUR\": 51314.3388991392, \"RSX\": 246055.21625068542, \"options qty\": 2.0, \"calls capital\": 391380.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391380.0, \"stocks capital\": 498189.76602726465, \"% change\": -0.0046262781098563854, \"accumulated return\": 0.999687171947015}, {\"total capital\": 999644.8675444693, \"cash\": 110117.4059197504, \"VOO\": 201245.5954951175, \"TUR\": 51202.924391641805, \"RSX\": 244898.9417379596, \"options qty\": 2.0, \"calls capital\": 392180.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 392180.0, \"stocks capital\": 497347.4616247189, \"% change\": -4.2317640690847647e-05, \"accumulated return\": 0.9996448675444692}, {\"total capital\": 994540.0109575856, \"cash\": 110117.4059197504, \"VOO\": 200568.8472397075, \"TUR\": 50216.110182002405, \"RSX\": 242817.6476161254, \"options qty\": 2.0, \"calls capital\": 390820.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 390820.0, \"stocks capital\": 493602.6050378353, \"% change\": -0.00510667013118693, \"accumulated return\": 0.9945400109575856}, {\"total capital\": 998629.7494159428, \"cash\": 110117.4059197504, \"VOO\": 201216.59199846003, \"TUR\": 51553.0842724986, \"RSX\": 243742.6672252338, \"options qty\": 2.0, \"calls capital\": 392000.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 392000.0, \"stocks capital\": 496512.3434961924, \"% change\": 0.004112190976026664, \"accumulated return\": 0.9986297494159428}, {\"total capital\": 999035.2457857206, \"cash\": 110117.4059197504, \"VOO\": 200752.53605194, \"TUR\": 52141.989526539, \"RSX\": 244783.3142874912, \"options qty\": 2.0, \"calls capital\": 391240.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 391240.0, \"stocks capital\": 497677.8398659702, \"% change\": 0.00040605276381455724, \"accumulated return\": 0.9990352457857207}, {\"total capital\": 1006089.1278787092, \"cash\": 110117.4059197504, \"VOO\": 202028.68990497253, \"TUR\": 52253.4040342122, \"RSX\": 247789.6280197741, \"options qty\": 2.0, \"calls capital\": 393900.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 393900.0, \"stocks capital\": 502071.72195895883, \"% change\": 0.007060693927210648, \"accumulated return\": 1.0060891278787094}, {\"total capital\": 1011414.1672377097, \"cash\": 110117.4059197504, \"VOO\": 203710.89271131248, \"TUR\": 51075.593525955606, \"RSX\": 248830.2750806912, \"options qty\": 2.0, \"calls capital\": 397680.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 397680.0, \"stocks capital\": 503616.7613179593, \"% change\": 0.005292810757460575, \"accumulated return\": 1.01141416723771}, {\"total capital\": 1011147.9078092412, \"cash\": 110117.4059197504, \"VOO\": 203556.2073957375, \"TUR\": 50852.764510785, \"RSX\": 249061.52998296826, \"options qty\": 2.0, \"calls capital\": 397560.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 397560.0, \"stocks capital\": 503470.50188949076, \"% change\": -0.00026325459647824623, \"accumulated return\": 1.0111479078092414}, {\"total capital\": 1016461.3370006289, \"cash\": 110117.4059197504, \"VOO\": 203266.1724291625, \"TUR\": 50932.3463019048, \"RSX\": 255305.41234981123, \"options qty\": 2.0, \"calls capital\": 396840.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 396840.0, \"stocks capital\": 509503.93108087854, \"% change\": 0.0052548486233827685, \"accumulated return\": 1.016461337000629}, {\"total capital\": 1010510.6690260002, \"cash\": 110117.4059197504, \"VOO\": 202038.35773715752, \"TUR\": 53478.9636170352, \"RSX\": 250795.94175205703, \"options qty\": 2.0, \"calls capital\": 394080.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 394080.0, \"stocks capital\": 506313.26310624974, \"% change\": -0.0058542983958327355, \"accumulated return\": 1.0105106690260002}, {\"total capital\": 1007052.4665633582, \"cash\": 110117.4059197504, \"VOO\": 202028.68990497253, \"TUR\": 53494.879975224, \"RSX\": 247211.49076341122, \"options qty\": 2.0, \"calls capital\": 394200.0, \"puts capital\": 0.0, \"stocks qty\": 16186.0, \"options capital\": 394200.0, \"stocks capital\": 502735.06064360775, \"% change\": -0.003422232509405654, \"accumulated return\": 1.0070524665633582}, {\"total capital\": 1009815.8520774813, \"cash\": 505054.19605235837, \"VOO\": 201860.56394465282, \"TUR\": 50462.460641175, \"RSX\": 252438.6314392951, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 504761.65602512297, \"% change\": 0.002744033310948968, \"accumulated return\": 1.0098158520774814}, {\"total capital\": 1012785.8768912704, \"cash\": 505054.19605235837, \"VOO\": 201947.48954634237, \"TUR\": 51358.774329225, \"RSX\": 254425.4169633446, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 507731.680838912, \"% change\": 0.0029411548726223646, \"accumulated return\": 1.0127858768912703}, {\"total capital\": 1015813.6844872597, \"cash\": 505054.19605235837, \"VOO\": 203444.5415755776, \"TUR\": 52538.920685295, \"RSX\": 254776.02617402878, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 510759.48843490134, \"% change\": 0.002989583153828246, \"accumulated return\": 1.0158136844872596}, {\"total capital\": 1013697.1678595312, \"cash\": 505054.19605235837, \"VOO\": 203019.5719672832, \"TUR\": 52016.071033905, \"RSX\": 253607.3288059846, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 508642.9718071728, \"% change\": -0.0020835677448043377, \"accumulated return\": 1.013697167859531}, {\"total capital\": 1011344.7781565203, \"cash\": 505054.19605235837, \"VOO\": 203067.86396825602, \"TUR\": 51134.695907295, \"RSX\": 252088.02222861093, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 506290.58210416196, \"% change\": -0.0023206040004808415, \"accumulated return\": 1.0113447781565201}, {\"total capital\": 1011395.5642818585, \"cash\": 505054.19605235837, \"VOO\": 203328.6407733248, \"TUR\": 52210.272332955, \"RSX\": 250802.45512322037, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 506341.36822950013, \"% change\": 5.0216431067839906e-05, \"accumulated return\": 1.0113955642818582}, {\"total capital\": 1013565.1169755466, \"cash\": 505054.19605235837, \"VOO\": 204487.6487959552, \"TUR\": 52987.07752932, \"RSX\": 251036.194597913, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 508510.9209231882, \"% change\": 0.002145107977835181, \"accumulated return\": 1.0135651169755464}, {\"total capital\": 1016560.896337008, \"cash\": 505054.19605235837, \"VOO\": 205308.61281198077, \"TUR\": 52240.149456, \"RSX\": 253957.9380166688, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 511506.7002846496, \"% change\": 0.002955685146703413, \"accumulated return\": 1.0165608963370076}, {\"total capital\": 1018093.4301054792, \"cash\": 505054.19605235837, \"VOO\": 206400.0120333312, \"TUR\": 53031.893213805, \"RSX\": 253607.3288059846, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 513039.23405312083, \"% change\": 0.0015075671059092688, \"accumulated return\": 1.018093430105479}, {\"total capital\": 1019273.7598101282, \"cash\": 505054.19605235837, \"VOO\": 207259.60965017602, \"TUR\": 53002.016090925, \"RSX\": 253957.9380166688, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 514219.5637577698, \"% change\": 0.0011593530316040823, \"accumulated return\": 1.019273759810128}, {\"total capital\": 1019145.5282568685, \"cash\": 505054.19605235837, \"VOO\": 208312.37527070718, \"TUR\": 53106.58602117, \"RSX\": 252672.370912633, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 514091.33220451017, \"% change\": -0.00012580678353146801, \"accumulated return\": 1.0191455282568682}, {\"total capital\": 1018212.4465218137, \"cash\": 505054.19605235837, \"VOO\": 208148.1824674816, \"TUR\": 52688.306300025, \"RSX\": 252321.76170194877, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 513158.2504694554, \"% change\": -0.000915552989425028, \"accumulated return\": 1.0182124465218134}, {\"total capital\": 1015387.1398226888, \"cash\": 505054.19605235837, \"VOO\": 208466.9096737792, \"TUR\": 53868.452656094996, \"RSX\": 247997.5814404562, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 510332.9437703304, \"% change\": -0.0027747713247624484, \"accumulated return\": 1.0153871398226886}, {\"total capital\": 1019570.6546997868, \"cash\": 505054.19605235837, \"VOO\": 209693.5264976896, \"TUR\": 54137.346762509995, \"RSX\": 250685.58538722878, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 514516.45864742843, \"% change\": 0.004120118044658838, \"accumulated return\": 1.0195706546997865}, {\"total capital\": 1015595.4085261372, \"cash\": 505054.19605235837, \"VOO\": 209596.9424958464, \"TUR\": 54465.995114850004, \"RSX\": 246478.27486308248, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 510541.21247377887, \"% change\": -0.003898941339009143, \"accumulated return\": 1.015595408526137}, {\"total capital\": 1016771.0532236237, \"cash\": 505054.19605235837, \"VOO\": 209712.8432980992, \"TUR\": 54824.520590069995, \"RSX\": 247179.49328309618, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 511716.85717126535, \"% change\": 0.0011575915838302198, \"accumulated return\": 1.0167710532236234}, {\"total capital\": 1010993.2505742339, \"cash\": 505054.19605235837, \"VOO\": 209963.9617030144, \"TUR\": 53704.128479925, \"RSX\": 242270.9643389362, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 505939.05452187563, \"% change\": -0.005682501120651939, \"accumulated return\": 1.0109932505742336}, {\"total capital\": 1009203.0476599257, \"cash\": 505054.19605235837, \"VOO\": 210273.03050905603, \"TUR\": 53241.033074295, \"RSX\": 240634.78802421622, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 504148.8516075673, \"% change\": -0.00177073676138928, \"accumulated return\": 1.0092030476599254}, {\"total capital\": 1002929.4530303624, \"cash\": 505054.19605235837, \"VOO\": 209654.8928969728, \"TUR\": 52494.105000974996, \"RSX\": 235726.2590800562, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16221.0, \"options capital\": 0.0, \"stocks capital\": 497875.256978004, \"% change\": -0.006216384942663522, \"accumulated return\": 1.002929453030362}, {\"total capital\": 1011221.2301669243, \"cash\": 127483.72584741499, \"VOO\": 202247.371553811, \"TUR\": 50574.1829736384, \"RSX\": 252945.9497920599, \"options qty\": 2.0, \"calls capital\": 377960.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 377970.0, \"stocks capital\": 505767.5043195093, \"% change\": 0.008267557714561224, \"accumulated return\": 1.011221230166924}, {\"total capital\": 1001108.4908515736, \"cash\": 127483.72584741499, \"VOO\": 201062.2745321436, \"TUR\": 49545.7942947388, \"RSX\": 247906.6961772762, \"options qty\": 2.0, \"calls capital\": 375100.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 375110.0, \"stocks capital\": 498514.7650041586, \"% change\": -0.010000521165562715, \"accumulated return\": 1.0011084908515733}, {\"total capital\": 1006812.0195110175, \"cash\": 127483.72584741499, \"VOO\": 201172.51611553642, \"TUR\": 50165.645005334, \"RSX\": 252700.132542732, \"options qty\": 2.0, \"calls capital\": 375280.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 375290.0, \"stocks capital\": 504038.29366360244, \"% change\": 0.005697213350565278, \"accumulated return\": 1.006812019511017}, {\"total capital\": 1002821.5616985669, \"cash\": 127483.72584741499, \"VOO\": 200547.81380961143, \"TUR\": 50700.9706188884, \"RSX\": 250119.051422652, \"options qty\": 2.0, \"calls capital\": 373960.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 373970.0, \"stocks capital\": 501367.83585115185, \"% change\": -0.003963458654763219, \"accumulated return\": 1.0028215616985665}, {\"total capital\": 997899.3256049021, \"cash\": 127483.72584741499, \"VOO\": 199941.48510085358, \"TUR\": 51123.59610347, \"RSX\": 246800.5185531636, \"options qty\": 2.0, \"calls capital\": 372540.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 372550.0, \"stocks capital\": 497865.5997574872, \"% change\": -0.0049083867775315815, \"accumulated return\": 0.9978993256049017}, {\"total capital\": 988315.2655834621, \"cash\": 127483.72584741499, \"VOO\": 199518.89236454698, \"TUR\": 49010.4686811844, \"RSX\": 240532.17869031572, \"options qty\": 2.0, \"calls capital\": 371760.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 371770.0, \"stocks capital\": 489061.5397360471, \"% change\": -0.009604235392814187, \"accumulated return\": 0.9883152655834617}, {\"total capital\": 985393.9003863579, \"cash\": 127483.72584741499, \"VOO\": 199730.188732749, \"TUR\": 48404.705486710795, \"RSX\": 237705.28031948314, \"options qty\": 2.0, \"calls capital\": 372060.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 372070.0, \"stocks capital\": 485840.1745389429, \"% change\": -0.002955904152082023, \"accumulated return\": 0.9853939003863575}, {\"total capital\": 990516.0739513865, \"cash\": 127483.72584741499, \"VOO\": 200428.38542763502, \"TUR\": 49602.14435938079, \"RSX\": 239671.8183169557, \"options qty\": 2.0, \"calls capital\": 373320.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 373330.0, \"stocks capital\": 489702.3481039715, \"% change\": 0.005198097494839571, \"accumulated return\": 0.9905160739513861}, {\"total capital\": 995908.0635372915, \"cash\": 127483.72584741499, \"VOO\": 200547.81380961143, \"TUR\": 49461.2691978536, \"RSX\": 244465.2546824115, \"options qty\": 2.0, \"calls capital\": 373940.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 373950.0, \"stocks capital\": 494474.33768987656, \"% change\": 0.005443616441674903, \"accumulated return\": 0.9959080635372911}, {\"total capital\": 990099.1361394529, \"cash\": 127483.72584741499, \"VOO\": 199867.99071199002, \"TUR\": 49193.6063910764, \"RSX\": 241023.81318897152, \"options qty\": 2.0, \"calls capital\": 372520.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 372530.0, \"stocks capital\": 490085.41029203794, \"% change\": -0.0058327948236569505, \"accumulated return\": 0.9900991361394526}, {\"total capital\": 1004217.915920173, \"cash\": 127483.72584741499, \"VOO\": 201530.80126166038, \"TUR\": 50715.0581351656, \"RSX\": 248398.330675932, \"options qty\": 2.0, \"calls capital\": 376080.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 376090.0, \"stocks capital\": 500644.190072758, \"% change\": 0.014259965760369697, \"accumulated return\": 1.0042179159201727}, {\"total capital\": 1006976.8075048584, \"cash\": 127483.72584741499, \"VOO\": 201190.88971280103, \"TUR\": 51489.871523254, \"RSX\": 251102.32042138834, \"options qty\": 2.0, \"calls capital\": 375700.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 375710.0, \"stocks capital\": 503783.08165744337, \"% change\": 0.002747303688719116, \"accumulated return\": 1.006976807504858}, {\"total capital\": 1011579.0852338187, \"cash\": 127483.72584741499, \"VOO\": 200786.6705736616, \"TUR\": 51602.571652538, \"RSX\": 256756.1171602041, \"options qty\": 2.0, \"calls capital\": 374940.0, \"puts capital\": 10.0, \"stocks qty\": 16777.0, \"options capital\": 374950.0, \"stocks capital\": 509145.3593864037, \"% change\": 0.004570390990795703, \"accumulated return\": 1.0115790852338185}, {\"total capital\": 1010205.5741872321, \"cash\": 127483.72584741499, \"VOO\": 200577.85464109862, \"TUR\": 51886.435102792806, \"RSX\": 256377.55859592566, \"options qty\": 2.0, \"calls capital\": 373880.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 373880.0, \"stocks capital\": 508841.8483398171, \"% change\": -0.0013577890909727275, \"accumulated return\": 1.0102055741872318}, {\"total capital\": 1000794.9919489194, \"cash\": 127483.72584741499, \"VOO\": 198049.00458581396, \"TUR\": 51123.59610347, \"RSX\": 256018.6654122204, \"options qty\": 2.0, \"calls capital\": 368120.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 368120.0, \"stocks capital\": 505191.2661015044, \"% change\": -0.009315512088600375, \"accumulated return\": 1.0007949919489192}, {\"total capital\": 1002639.9966500474, \"cash\": 127483.72584741499, \"VOO\": 198451.3863652172, \"TUR\": 51165.858651834795, \"RSX\": 256879.02578558036, \"options qty\": 2.0, \"calls capital\": 368660.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 368660.0, \"stocks capital\": 506496.2708026323, \"% change\": 0.0018435391023841063, \"accumulated return\": 1.0026399966500472}, {\"total capital\": 1000580.1047139103, \"cash\": 127483.72584741499, \"VOO\": 198248.338718472, \"TUR\": 50912.28336117921, \"RSX\": 255895.75678684408, \"options qty\": 2.0, \"calls capital\": 368040.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 368040.0, \"stocks capital\": 505056.3788664953, \"% change\": -0.002054468147111077, \"accumulated return\": 1.0005801047139102}, {\"total capital\": 1003684.4742200433, \"cash\": 127483.72584741499, \"VOO\": 198183.7326491062, \"TUR\": 51743.4468139096, \"RSX\": 257493.56890961248, \"options qty\": 2.0, \"calls capital\": 368780.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 368780.0, \"stocks capital\": 507420.7483726283, \"% change\": 0.003102569690830226, \"accumulated return\": 1.0036844742200433}, {\"total capital\": 999285.9123006593, \"cash\": 127483.72584741499, \"VOO\": 197860.702301985, \"TUR\": 51348.99636172681, \"RSX\": 254912.4877895325, \"options qty\": 2.0, \"calls capital\": 367680.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 367680.0, \"stocks capital\": 504122.1864532443, \"% change\": -0.004382415024205666, \"accumulated return\": 0.9992859123006593}, {\"total capital\": 1003831.1819641821, \"cash\": 127483.72584741499, \"VOO\": 199328.1830215638, \"TUR\": 50320.6076829828, \"RSX\": 256018.6654122204, \"options qty\": 2.0, \"calls capital\": 370680.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 370680.0, \"stocks capital\": 505667.456116767, \"% change\": 0.004548517704065391, \"accumulated return\": 1.003831181964182}, {\"total capital\": 1005620.6501288661, \"cash\": 127483.72584741499, \"VOO\": 199623.52505313122, \"TUR\": 50546.007941395204, \"RSX\": 256387.39128692463, \"options qty\": 2.0, \"calls capital\": 371580.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 371580.0, \"stocks capital\": 506556.92428145104, \"% change\": 0.0017826385520149923, \"accumulated return\": 1.0056206501288663}, {\"total capital\": 1009197.9704601925, \"cash\": 127483.72584741499, \"VOO\": 200158.8324854506, \"TUR\": 50461.48284435439, \"RSX\": 258353.9292829725, \"options qty\": 2.0, \"calls capital\": 372740.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 372740.0, \"stocks capital\": 508974.2446127775, \"% change\": 0.0035573258473442504, \"accumulated return\": 1.0091979704601928}, {\"total capital\": 1003668.0627598402, \"cash\": 127483.72584741499, \"VOO\": 199678.9016841414, \"TUR\": 50433.307812111205, \"RSX\": 254052.1274161725, \"options qty\": 2.0, \"calls capital\": 372020.0, \"puts capital\": 0.0, \"stocks qty\": 16777.0, \"options capital\": 372020.0, \"stocks capital\": 504164.3369124251, \"% change\": -0.005479507353577717, \"accumulated return\": 1.0036680627598404}, {\"total capital\": 1005979.0172616325, \"cash\": 503132.91658682376, \"VOO\": 201067.73318452522, \"TUR\": 50290.5675938531, \"RSX\": 251487.79989643043, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 502846.1006748087, \"% change\": 0.002302508755173349, \"accumulated return\": 1.0059790172616327}, {\"total capital\": 1008207.2690905331, \"cash\": 503132.91658682376, \"VOO\": 201179.396124066, \"TUR\": 49883.867521292996, \"RSX\": 254011.08885835038, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 505074.3525037094, \"% change\": 0.0022150082563014983, \"accumulated return\": 1.0082072690905333}, {\"total capital\": 1009291.242551543, \"cash\": 503132.91658682376, \"VOO\": 200565.24995649338, \"TUR\": 49659.4812743259, \"RSX\": 255933.59473389998, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 506158.3259647193, \"% change\": 0.001075149420404209, \"accumulated return\": 1.0092912425515432}, {\"total capital\": 1009445.805771449, \"cash\": 503132.91658682376, \"VOO\": 201086.3436744814, \"TUR\": 49533.2640105134, \"RSX\": 255693.28149963042, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 506312.88918462524, \"% change\": 0.00015314035571645235, \"accumulated return\": 1.009445805771449}, {\"total capital\": 1001000.1871619804, \"cash\": 503132.91658682376, \"VOO\": 200909.54402014302, \"TUR\": 49435.0950275137, \"RSX\": 247522.6315275, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 497867.2705751567, \"% change\": -0.008366589430736426, \"accumulated return\": 1.0010001871619805}, {\"total capital\": 996604.4697195555, \"cash\": 503132.91658682376, \"VOO\": 201049.122694569, \"TUR\": 50907.6297729739, \"RSX\": 241514.80066518878, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 493471.5531327317, \"% change\": -0.004391325295240556, \"accumulated return\": 0.9966044697195555}, {\"total capital\": 999225.217731294, \"cash\": 503132.91658682376, \"VOO\": 200797.88108050398, \"TUR\": 51496.64367112701, \"RSX\": 243797.77639283918, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 496092.30114447017, \"% change\": 0.0026296771601637126, \"accumulated return\": 0.9992252177312941}, {\"total capital\": 995303.2821144352, \"cash\": 503132.91658682376, \"VOO\": 199969.71427877882, \"TUR\": 52127.7299906542, \"RSX\": 240072.9212581784, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 492170.36552761146, \"% change\": -0.003924976619148368, \"accumulated return\": 0.9953032821144354}, {\"total capital\": 993811.9537869778, \"cash\": 503132.91658682376, \"VOO\": 198639.0642489236, \"TUR\": 51005.7987559736, \"RSX\": 241034.1741952568, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 490679.03720015404, \"% change\": -0.0014983657285739804, \"accumulated return\": 0.993811953786978}, {\"total capital\": 998846.299175555, \"cash\": 503132.91658682376, \"VOO\": 200379.14505712778, \"TUR\": 50935.678053786694, \"RSX\": 244398.55947781677, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 495713.38258873124, \"% change\": 0.005065692125550969, \"accumulated return\": 0.9988462991755551}, {\"total capital\": 995369.9077458387, \"cash\": 503132.91658682376, \"VOO\": 199830.13560425458, \"TUR\": 51973.464445874, \"RSX\": 240433.39110888643, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 492236.991159015, \"% change\": -0.003480406777885303, \"accumulated return\": 0.9953699077458389}, {\"total capital\": 991545.8362113129, \"cash\": 503132.91658682376, \"VOO\": 199392.78909102042, \"TUR\": 51230.1850029407, \"RSX\": 237789.945530528, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 488412.91962448915, \"% change\": -0.0038418596993614607, \"accumulated return\": 0.991545836211313}, {\"total capital\": 998589.9695595354, \"cash\": 503132.91658682376, \"VOO\": 201021.2069596838, \"TUR\": 52800.8887314006, \"RSX\": 241634.95728162723, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 495457.0529727116, \"% change\": 0.00710419336249557, \"accumulated return\": 0.9985899695595355}, {\"total capital\": 998546.5228046967, \"cash\": 503132.91658682376, \"VOO\": 200434.9765269964, \"TUR\": 52983.2025571485, \"RSX\": 241995.427133728, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 495413.60621787293, \"% change\": -4.3508102587797026e-05, \"accumulated return\": 0.9985465228046968}, {\"total capital\": 1008529.8195584803, \"cash\": 503132.91658682376, \"VOO\": 202575.1828687188, \"TUR\": 55058.7753411682, \"RSX\": 247762.94476176958, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 505396.9029716566, \"% change\": 0.009997828369320949, \"accumulated return\": 1.0085298195584804}, {\"total capital\": 1012206.1327077679, \"cash\": 503132.91658682376, \"VOO\": 203794.1699590332, \"TUR\": 55353.2822903222, \"RSX\": 249925.76387158877, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 509073.2161209441, \"% change\": 0.0036452200797563172, \"accumulated return\": 1.012206132707768}, {\"total capital\": 1009605.9833754776, \"cash\": 503132.91658682376, \"VOO\": 203645.28603957998, \"TUR\": 55184.992605135594, \"RSX\": 247642.78814393832, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 506473.0667886539, \"% change\": -0.0025687942883082515, \"accumulated return\": 1.0096059833754778}, {\"total capital\": 1012525.8718891535, \"cash\": 503132.91658682376, \"VOO\": 203803.4752039622, \"TUR\": 55423.40299250911, \"RSX\": 250166.0771058584, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 509392.95530232973, \"% change\": 0.0028921069820859735, \"accumulated return\": 1.0125258718891539}, {\"total capital\": 1013206.5948156436, \"cash\": 503132.91658682376, \"VOO\": 203412.65491547118, \"TUR\": 55774.0065032887, \"RSX\": 250887.01681006, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16459.0, \"options capital\": 0.0, \"stocks capital\": 510073.67822881986, \"% change\": 0.0006723017607639381, \"accumulated return\": 1.013206594815644}, {\"total capital\": 1014478.7119102319, \"cash\": 507298.0361816145, \"VOO\": 202867.615826789, \"TUR\": 50710.8210158709, \"RSX\": 253602.2388859575, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 507180.67572861735, \"% change\": 0.0012555357427570524, \"accumulated return\": 1.014478711910232}, {\"total capital\": 1012901.8573575469, \"cash\": 507298.0361816145, \"VOO\": 202932.42088815488, \"TUR\": 51005.0563547625, \"RSX\": 251666.34393301498, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 505603.82117593236, \"% change\": -0.0015543495730094836, \"accumulated return\": 1.0129018573575472}, {\"total capital\": 1007480.5195675207, \"cash\": 507298.0361816145, \"VOO\": 202728.74783807804, \"TUR\": 50506.135562698204, \"RSX\": 246947.59998513, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 500182.4833859062, \"% change\": -0.005352283393150636, \"accumulated return\": 1.007480519567521}, {\"total capital\": 1001924.5827774454, \"cash\": 507298.0361816145, \"VOO\": 202913.9051563919, \"TUR\": 49725.77227253911, \"RSX\": 241986.8691669, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 494626.546595831, \"% change\": -0.005514684087847388, \"accumulated return\": 1.0019245827774457}, {\"total capital\": 1007672.8706721851, \"cash\": 507298.0361816145, \"VOO\": 203728.5973569926, \"TUR\": 50787.57806079299, \"RSX\": 245858.65907278497, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 500374.8344905706, \"% change\": 0.005737246089725367, \"accumulated return\": 1.0076728706721854}, {\"total capital\": 1004932.2725337704, \"cash\": 507298.0361816145, \"VOO\": 203737.8552229718, \"TUR\": 49610.6367052266, \"RSX\": 244285.7444239575, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 497634.2363521559, \"% change\": -0.0027197300018472204, \"accumulated return\": 1.0049322725337706}, {\"total capital\": 1006725.1599151283, \"cash\": 507298.0361816145, \"VOO\": 203478.63497731282, \"TUR\": 49968.8362482435, \"RSX\": 245979.6525079575, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 499427.1237335138, \"% change\": 0.0017840877742312244, \"accumulated return\": 1.0067251599151286}, {\"total capital\": 1012415.1783633089, \"cash\": 507298.0361816145, \"VOO\": 203858.2074798221, \"TUR\": 51286.4988528573, \"RSX\": 249972.435849015, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 505117.1421816944, \"% change\": 0.005652007791938196, \"accumulated return\": 1.012415178363309}, {\"total capital\": 1011435.6894008886, \"cash\": 507298.0361816145, \"VOO\": 203441.6035135914, \"TUR\": 50723.6138566677, \"RSX\": 249972.435849015, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 504137.6532192741, \"% change\": -0.0009674775560000182, \"accumulated return\": 1.011435689400889}, {\"total capital\": 1008598.7105409995, \"cash\": 507298.0361816145, \"VOO\": 203126.836072448, \"TUR\": 50621.271130152, \"RSX\": 247552.56715678502, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 501300.67435938504, \"% change\": -0.0028049028619600014, \"accumulated return\": 1.008598710541}, {\"total capital\": 1015903.6499738359, \"cash\": 507298.0361816145, \"VOO\": 204154.4591892025, \"TUR\": 51695.8697590614, \"RSX\": 252755.28484395752, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 508605.6137922214, \"% change\": 0.007242661879785839, \"accumulated return\": 1.0159036499738363}, {\"total capital\": 1014650.8262976833, \"cash\": 507298.0361816145, \"VOO\": 204117.4277254811, \"TUR\": 51811.005326515195, \"RSX\": 251424.35706407254, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 507352.7901160688, \"% change\": -0.0012332111181851957, \"accumulated return\": 1.0146508262976837}, {\"total capital\": 1005523.8814051935, \"cash\": 507298.0361816145, \"VOO\": 200497.60215213662, \"TUR\": 50659.6496525424, \"RSX\": 247068.59341889995, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 498225.845223579, \"% change\": -0.008995158389406455, \"accumulated return\": 1.0055238814051939}, {\"total capital\": 1001335.5270646827, \"cash\": 507298.0361816145, \"VOO\": 201228.9735596084, \"TUR\": 49853.7006807897, \"RSX\": 242954.81664267002, \"options qty\": 0.0, \"calls capital\": 0.0, \"puts capital\": 0.0, \"stocks qty\": 16415.0, \"options capital\": 0.0, \"stocks capital\": 494037.4908830681, \"% change\": -0.00416534546614411, \"accumulated return\": 1.001335527064683}]}}, {\"mode\": \"vega-lite\"});\n",
"</script>"
],
"text/plain": [
"alt.Chart(...)"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"returns_histogram(bt.balance)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"<div id=\"altair-viz-09dd0e0398074e819eb54a98b686dbd6\"></div>\n",
"<script type=\"text/javascript\">\n",
" (function(spec, embedOpt){\n",
" const outputDiv = document.getElementById(\"altair-viz-09dd0e0398074e819eb54a98b686dbd6\");\n",
" const paths = {\n",
" \"vega\": \"https://cdn.jsdelivr.net/npm//vega@5?noext\",\n",
" \"vega-lib\": \"https://cdn.jsdelivr.net/npm//vega-lib?noext\",\n",
" \"vega-lite\": \"https://cdn.jsdelivr.net/npm//vega-lite@4.0.2?noext\",\n",
" \"vega-embed\": \"https://cdn.jsdelivr.net/npm//vega-embed@6?noext\",\n",
" };\n",
"\n",
" function loadScript(lib) {\n",
" return new Promise(function(resolve, reject) {\n",
" var s = document.createElement('script');\n",
" s.src = paths[lib];\n",
" s.async = true;\n",
" s.onload = () => resolve(paths[lib]);\n",
" s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n",
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
" });\n",
" }\n",
"\n",
" function showError(err) {\n",
" outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n",
" throw err;\n",
" }\n",
"\n",
" function displayChart(vegaEmbed) {\n",
" vegaEmbed(outputDiv, spec, embedOpt)\n",
" .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n",
" }\n",
"\n",
" if(typeof define === \"function\" && define.amd) {\n",
" requirejs.config({paths});\n",
" require([\"vega-embed\"], displayChart, err => showError(`Error loading script: ${err.message}`));\n",
" } else if (typeof vegaEmbed === \"function\") {\n",
" displayChart(vegaEmbed);\n",
" } else {\n",
" loadScript(\"vega\")\n",
" .then(() => loadScript(\"vega-lite\"))\n",
" .then(() => loadScript(\"vega-embed\"))\n",
" .catch(showError)\n",
" .then(() => displayChart(vegaEmbed));\n",
" }\n",
" })({\"config\": {\"view\": {\"continuousWidth\": 400, \"continuousHeight\": 300}}, \"data\": {\"name\": \"data-346a4f2528f883c1edf82f98636126f5\"}, \"mark\": \"rect\", \"encoding\": {\"color\": {\"type\": \"quantitative\", \"aggregate\": \"mean\", \"field\": \"total capital\", \"scale\": {\"scheme\": \"redyellowgreen\"}, \"title\": \"Return\"}, \"tooltip\": {\"type\": \"quantitative\", \"aggregate\": \"mean\", \"field\": \"total capital\", \"format\": \".2f\"}, \"x\": {\"type\": \"ordinal\", \"field\": \"date\", \"timeUnit\": \"year\", \"title\": \"Year\"}, \"y\": {\"type\": \"ordinal\", \"field\": \"date\", \"timeUnit\": \"month\", \"title\": \"Month\"}}, \"title\": \"Monthly Returns\", \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.0.2.json\", \"datasets\": {\"data-346a4f2528f883c1edf82f98636126f5\": [{\"date\": \"2017-01-31T00:00:00\", \"total capital\": 0.007052466563358228}, {\"date\": \"2017-02-28T00:00:00\", \"total capital\": -0.004094139749308168}, {\"date\": \"2017-03-31T00:00:00\", \"total capital\": 0.000736452326976833}, {\"date\": \"2017-04-30T00:00:00\", \"total capital\": 0.00950367199049329}, {\"date\": \"2017-05-31T00:00:00\", \"total capital\": -0.011716334863691724}]}}, {\"mode\": \"vega-lite\"});\n",
"</script>"
],
"text/plain": [
"alt.Chart(...)"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"monthly_returns_heatmap(bt.balance)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}