From 8954b6c65a35f49a84921a85dae899fad27de073 Mon Sep 17 00:00:00 2001 From: Camilo1704 Date: Thu, 6 Feb 2020 18:07:13 -0300 Subject: [PATCH] sma graph plotted --- .../examples/sma_and_rebalance_example.ipynb | 94 ++++++++++--------- 1 file changed, 50 insertions(+), 44 deletions(-) diff --git a/asset_backtester/examples/sma_and_rebalance_example.ipynb b/asset_backtester/examples/sma_and_rebalance_example.ipynb index 7cb1846..a9d1cf0 100644 --- a/asset_backtester/examples/sma_and_rebalance_example.ipynb +++ b/asset_backtester/examples/sma_and_rebalance_example.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 12, "metadata": { "scrolled": true }, @@ -20,12 +20,15 @@ "DataTransformerRegistry.enable('default')" ] }, - "execution_count": 26, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ + "%config InlineBackend.figure_format=\"retina\"\n", + "%matplotlib inline\n", + "\n", "import os\n", "import sys\n", "import altair as alt\n", @@ -40,7 +43,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -50,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -61,7 +64,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -75,11 +78,11 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ - "os.mkdir(os.path.join(backtester_dir + '/data'))\n", + "#os.mkdir(os.path.join(backtester_dir + '/data'))\n", "data_dir = os.path.join(backtester_dir, 'data')\n", "save_path = os.path.join(data_dir, 'ivy_5assets.csv')\n", "symbols.to_csv(save_path)" @@ -87,7 +90,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 17, "metadata": { "scrolled": true }, @@ -99,7 +102,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 18, "metadata": { "scrolled": true }, @@ -110,7 +113,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 19, "metadata": { "scrolled": true }, @@ -118,10 +121,10 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 16, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -137,7 +140,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 20, "metadata": { "scrolled": true }, @@ -159,7 +162,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 21, "metadata": { "scrolled": true }, @@ -169,7 +172,7 @@ "output_type": "stream", "text": [ "0% [██████████████████████████████] 100% | ETA: 00:00:00\n", - "Total time elapsed: 00:00:45\n" + "Total time elapsed: 00:00:47\n" ] }, { @@ -724,7 +727,7 @@ "[2517 rows x 5 columns]" ] }, - "execution_count": 19, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -743,7 +746,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 22, "metadata": { "scrolled": true }, @@ -752,10 +755,10 @@ "data": { "text/html": [ "\n", - "
\n", + "
\n", "