From de9e7c4e8bbe986f44ba7a93159a816d64828a56 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Fri, 8 Dec 2023 11:49:31 -0300 Subject: [PATCH] (feat) add path to run with jupyter --- .../02_single_controller_backtest.ipynb | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/quants_lab/research_notebooks/02_single_controller_backtest.ipynb b/quants_lab/research_notebooks/02_single_controller_backtest.ipynb index 91a09d2..3cfeab7 100644 --- a/quants_lab/research_notebooks/02_single_controller_backtest.ipynb +++ b/quants_lab/research_notebooks/02_single_controller_backtest.ipynb @@ -2,12 +2,8 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 0, "metadata": { - "ExecuteTime": { - "end_time": "2023-12-08T14:37:55.756030Z", - "start_time": "2023-12-08T14:37:55.739563Z" - }, "collapsed": false, "jupyter": { "outputs_hidden": false @@ -15,7 +11,18 @@ }, "outputs": [], "source": [ - "import datetime\n", + "import os\n", + "import sys\n", + "\n", + "root_path = os.path.abspath(os.path.join(os.getcwd(), '../..'))\n", + "sys.path.append(root_path)" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "outputs": [], + "source": [ "from decimal import Decimal\n", "\n", "# Market configuration\n", @@ -40,7 +47,14 @@ "time_limit = 60 * 60 * 12 # 12 hours\n", "trailing_stop_activation_price_delta = Decimal(\"0.008\")\n", "trailing_stop_trailing_delta = Decimal(\"0.004\")" - ] + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-12-08T14:37:55.756030Z", + "start_time": "2023-12-08T14:37:55.739563Z" + } + } }, { "cell_type": "code",