|
6 | 6 | "source": [
|
7 | 7 | "## Trading Context\n",
|
8 | 8 | "\n",
|
9 |
| - "In this notebook we will explain how to use a TensorTrade `TradingContext`. In addition we will also explain the backbone behind TensorTrade's major components and how they are used inside the framework. We will begin with an easy example of how to use the most basic context, this involves specifying what `base_intrument` we are using and what `products` we are exchanging. By default, the framework sets these as `USD` and `BTC`, however, we would like to specify our products as `BTC` and `ETH`. We also don't want to have to put them as parameters to every component we make because we know it will be the same for all components. Therefore, we use a trading context to set these parameters across the entire framework." |
| 9 | + "In this notebook we will explain how to use a TensorTrade `TradingContext`. In addition we will also explain the backbone behind TensorTrade's major components and how they are used inside the framework. We will begin with an easy example of how to use the most basic context, this involves specifying what `base_intrument` we are using and what `instruments` we are exchanging. By default, the framework sets these as `USD` and `BTC`, however, we would like to specify our instruments as `BTC` and `ETH`. We also don't want to have to put them as parameters to every component we make because we know it will be the same for all components. Therefore, we use a trading context to set these parameters across the entire framework." |
10 | 10 | ]
|
11 | 11 | },
|
12 | 12 | {
|
|
21 | 21 | "\n",
|
22 | 22 | "config = {\n",
|
23 | 23 | " \"base_instrument\": \"USD\",\n",
|
24 |
| - " \"products\": [\"BTC\", \"ETH\"]\n", |
| 24 | + " \"instruments\": [\"BTC\", \"ETH\"]\n", |
25 | 25 | "}\n",
|
26 | 26 | "\n",
|
27 | 27 | "with td.TradingContext(**config):\n",
|
|
65 | 65 | "source": [
|
66 | 66 | "config = {\n",
|
67 | 67 | " \"base_instrument\": \"USD\",\n",
|
68 |
| - " \"products\": [\"BTC\", \"ETH\"],\n", |
| 68 | + " \"instruments\": [\"BTC\", \"ETH\"],\n", |
69 | 69 | " \"actions\": {\n",
|
70 | 70 | " \"n_actions\": 24\n",
|
71 | 71 | " }\n",
|
|
86 | 86 | "source": [
|
87 | 87 | "config = {\n",
|
88 | 88 | " \"base_instrument\": \"USD\",\n",
|
89 |
| - " \"products\": [\"BTC\", \"ETH\"],\n", |
| 89 | + " \"instruments\": [\"BTC\", \"ETH\"],\n", |
90 | 90 | " \"actions\": {\n",
|
91 | 91 | " \"n_actions_per_instrument\": 25,\n",
|
92 | 92 | " 'max_allowed_slippage_percent': 5.0\n",
|
|
111 | 111 | "source": [
|
112 | 112 | "config = {\n",
|
113 | 113 | " \"base_instrument\": \"USD\",\n",
|
114 |
| - " \"products\": [\"BTC\", \"ETH\"],\n", |
| 114 | + " \"instruments\": [\"BTC\", \"ETH\"],\n", |
115 | 115 | " \"actions\": {\n",
|
116 | 116 | " \"n_actions\": 25,\n",
|
117 | 117 | " 'max_allowed_slippage_percent': 5.0\n",
|
|
141 | 141 | "source": [
|
142 | 142 | "config = {\n",
|
143 | 143 | " \"base_instrument\": \"USD\",\n",
|
144 |
| - " \"products\": [\"BTC\", \"ETH\"],\n", |
| 144 | + " \"instruments\": [\"BTC\", \"ETH\"],\n", |
145 | 145 | " \"actions\": {\n",
|
146 | 146 | " \"n_actions\": 25,\n",
|
147 | 147 | " 'max_allowed_slippage_percent': 5.0\n",
|
|
168 | 168 | "### YAML\n",
|
169 | 169 | "```YAML\n",
|
170 | 170 | "base_instrument: \"EURO\"\n",
|
171 |
| - "products: [\"BTC\", \"ETH\"]\n", |
| 171 | + "instruments: [\"BTC\", \"ETH\"]\n", |
172 | 172 | "actions:\n",
|
173 | 173 | " n_actions: 24\n",
|
174 | 174 | " max_allowed_slippage_percent: 5.0\n",
|
|
189 | 189 | "```JSON\n",
|
190 | 190 | "{\n",
|
191 | 191 | " \"base_instrument\": \"EURO\",\n",
|
192 |
| - " \"products\": [\"BTC\", \"ETH\"],\n", |
| 192 | + " \"instruments\": [\"BTC\", \"ETH\"],\n", |
193 | 193 | " \"exchanges\": {\n",
|
194 | 194 | " \"commission_percent\": 0.5,\n",
|
195 | 195 | " \"base_precision\": 0.3,\n",
|
|
0 commit comments