├── tgym ├── __init__.py ├── envs │ ├── __init__.py │ ├── .DS_Store │ └── trading.py ├── .DS_Store ├── gens │ ├── .DS_Store │ ├── __init__.py │ ├── deterministic.py │ ├── csvstream.py │ └── random.py ├── utils.py └── core.py ├── tests ├── __init__.py ├── .DS_Store ├── test_utils.py ├── gens │ ├── test_csvstream.py │ └── test_random.py └── envs │ └── test_trading.py ├── setup.py ├── examples ├── random_generator.py ├── csv_streamer.py ├── trading_environment.py ├── README.md ├── dqn_agent.py ├── DQNAgent.py └── DQNAgent.ipynb ├── LICENSE └── README.md /tgym/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /tgym/envs/__init__.py: -------------------------------------------------------------------------------- 1 | from trading import SpreadTrading 2 | -------------------------------------------------------------------------------- /tgym/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mfrdixon/dq-MM/HEAD/tgym/.DS_Store -------------------------------------------------------------------------------- /tests/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mfrdixon/dq-MM/HEAD/tests/.DS_Store -------------------------------------------------------------------------------- /tgym/envs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mfrdixon/dq-MM/HEAD/tgym/envs/.DS_Store -------------------------------------------------------------------------------- /tgym/gens/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mfrdixon/dq-MM/HEAD/tgym/gens/.DS_Store -------------------------------------------------------------------------------- /tgym/gens/__init__.py: -------------------------------------------------------------------------------- 1 | from csvstream import * 2 | from deterministic import * 3 | from random import * 4 | -------------------------------------------------------------------------------- /tests/test_utils.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from tgym.utils import calc_spread 3 | 4 | 5 | def test_calc_spread(): 6 | spread_coefficients = [1, -0.1] 7 | prices = np.array([1, 2, 10, 20]) 8 | spread_price = (-1, 1) 9 | assert calc_spread(prices, spread_coefficients) == spread_price 10 | -------------------------------------------------------------------------------- /tgym/gens/deterministic.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from tgym.core import DataGenerator 3 | 4 | 5 | class WavySignal(DataGenerator): 6 | """Modulated sine generator 7 | """ 8 | @staticmethod 9 | def _generator(period_1, period_2, epsilon, ba_spread=0): 10 | i = 0 11 | while True: 12 | i += 1 13 | bid_price = (1 - epsilon) * np.sin(2 * i * np.pi / period_1) + \ 14 | epsilon * np.sin(2 * i * np.pi / period_2) 15 | yield bid_price, bid_price + ba_spread 16 | -------------------------------------------------------------------------------- /tests/gens/test_csvstream.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import sys 3 | sys.path.append('/Users/matthewdixon/Downloads/dq-MM/') 4 | import numpy as np 5 | from tgym.gens import CSVStreamer 6 | 7 | 8 | def test_csv_streamer(): 9 | # with open('../../data/AMZN-L1.csv', 'w+') as csvfile: 10 | # csv_test = csv.writer(csvfile) 11 | # for i in range(10): 12 | # csv_test.writerow([1] * 10) 13 | csvstreamer = CSVStreamer(filename='../../data/AMZN-L1.csv') 14 | for i in range(10): 15 | print csvstreamer.next() 16 | 17 | if __name__ == "__main__": 18 | test_csv_streamer() 19 | 20 | 21 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from setuptools import find_packages, setup 5 | 6 | setup( 7 | name='tgym', 8 | version='0.1.14', 9 | description="Trading Gym is an open-source project for the development of reinforcement learning algorithms in the context of trading.", 10 | author="Prediction Machines", 11 | author_email='tgym@prediction-machines.com', 12 | url='https://github.com/prediction-machines/tgym', 13 | packages=find_packages(), 14 | install_requires=[ 15 | 'matplotlib==2.0.2' 16 | ], 17 | license="MIT license", 18 | zip_safe=False, 19 | keywords='tgym' 20 | ) 21 | -------------------------------------------------------------------------------- /examples/random_generator.py: -------------------------------------------------------------------------------- 1 | """ 2 | In this example we show how a random generator is coded. 3 | All generators inherit from the DataGenerator class 4 | The class yields tuple (bid_price,ask_price) 5 | """ 6 | import numpy as np 7 | from tgym.core import DataGenerator 8 | 9 | 10 | class RandomGenerator(DataGenerator): 11 | @staticmethod 12 | def _generator(ba_spread=0): 13 | while True: 14 | val = np.random.randn() 15 | yield val, val + ba_spread 16 | 17 | 18 | time_series_length = 10 19 | mygen = RandomGenerator() 20 | prices_time_series = [mygen.next() for _ in range(time_series_length)] 21 | print prices_time_series 22 | -------------------------------------------------------------------------------- /examples/csv_streamer.py: -------------------------------------------------------------------------------- 1 | from tgym.envs import SpreadTrading 2 | from tgym.gens import CSVStreamer 3 | 4 | generator = CSVStreamer(filename='./examples/price_2.csv') 5 | 6 | episode_length = 200 7 | 8 | environment = SpreadTrading(spread_coefficients=[2, -1], 9 | data_generator=generator, 10 | episode_length=episode_length) 11 | 12 | environment.render() 13 | while True: 14 | action = raw_input("Action: Buy (b) / Sell (s) / Hold (enter): ") 15 | if action == 'b': 16 | action = [0, 1, 0] 17 | elif action == 's': 18 | action = [0, 0, 1] 19 | else: 20 | action = [1, 0, 0] 21 | environment.step(action) 22 | environment.render() 23 | -------------------------------------------------------------------------------- /tests/gens/test_random.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import sys 3 | sys.path.append('/Users/matthewdixon/Downloads/dq-MM/') 4 | from tgym.gens.random import AR1, RandomWalk 5 | 6 | 7 | def test_random_walk(): 8 | rw = RandomWalk(ba_spread=0.1) 9 | val = rw.next() 10 | assert np.isclose(val[1] - val[0], 0.1) 11 | 12 | 13 | def test_ar1(): 14 | rw = AR1(a=0.1, ba_spread=0.1) 15 | val = rw.next() 16 | assert np.isclose(val[1] - val[0], 0.1) 17 | vals = [rw.next()[0] for i in range(100000)] 18 | mean = np.mean(vals) 19 | std = np.std(vals) 20 | assert np.isclose(mean, 0, atol=0.01) 21 | assert np.isclose(std, 1, atol=0.01) 22 | return rw 23 | 24 | 25 | if __name__ == "__main__": 26 | dg = test_ar1() 27 | print dg.__dict__ 28 | -------------------------------------------------------------------------------- /tgym/utils.py: -------------------------------------------------------------------------------- 1 | 2 | def calc_spread(prices, spread_coefficients): 3 | """Calculate the spread based on spread_coefficients. 4 | 5 | Args: 6 | spread_coefficients (list): A list of signed integers defining how much 7 | of each product to buy (positive) or sell (negative) when buying or 8 | selling the spread. 9 | prices (numpy.array): Array containing the prices (bid, ask) of 10 | different products, i.e: [p1_b, p1_a, p2_b, p2_a]. 11 | 12 | Returns: 13 | tuple: 14 | - (float) spread bid price, 15 | - (float) spread ask price. 16 | """ 17 | spread_bid = sum([ 18 | spread_coefficients[i] * 19 | prices[2 * i + int(spread_coefficients[i] < 0)] 20 | for i in range(len(spread_coefficients))] 21 | ) 22 | spread_ask = sum([ 23 | spread_coefficients[i] * 24 | prices[2 * i + int(spread_coefficients[i] > 0)] 25 | for i in range(len(spread_coefficients))] 26 | ) 27 | return spread_bid, spread_ask 28 | -------------------------------------------------------------------------------- /tgym/gens/csvstream.py: -------------------------------------------------------------------------------- 1 | import csv 2 | 3 | import numpy as np 4 | from tgym.core import DataGenerator 5 | 6 | 7 | class CSVStreamer(DataGenerator): 8 | """Data generator from csv file. 9 | The csv file should no index columns. 10 | 11 | Args: 12 | filename (str): Filepath to a csv file. 13 | header (bool): True if the file has got a header, False otherwise 14 | """ 15 | @staticmethod 16 | def _generator(filename, header=False): 17 | with open(filename, "r") as csvfile: 18 | reader = csv.reader(csvfile) 19 | if header: 20 | next(reader, None) 21 | for row in reader: 22 | #assert len(row) % 2 == 0 23 | yield np.array(row, dtype=np.float) 24 | 25 | def _iterator_end(self): 26 | """Rewinds if end of data reached. 27 | """ 28 | print "End of data reached, rewinding." 29 | super(self.__class__, self).rewind() 30 | 31 | def rewind(self): 32 | """For this generator, we want to rewind only when the end of the data is reached. 33 | """ 34 | pass 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/trading_environment.py: -------------------------------------------------------------------------------- 1 | """ 2 | The aim of this file is to give a standalone example of how an environment runs. 3 | """ 4 | 5 | import numpy as np 6 | from tgym.core import DataGenerator 7 | from tgym.envs import SpreadTrading 8 | from tgym.gens.deterministic import WavySignal 9 | from tgym.gens.random import AR1 10 | 11 | generator = AR1(a=0.1, ba_spread=0.1) #WavySignal(period_1=25, period_2=50, epsilon=-0.5) 12 | 13 | episode_length = 200 14 | trading_fee = 0.2 15 | time_fee = 0 16 | # history_length number of historical states in the observation vector. 17 | history_length = 2 18 | 19 | environment = SpreadTrading(spread_coefficients=[1], 20 | data_generator=generator, 21 | trading_fee=trading_fee, 22 | time_fee=time_fee, 23 | history_length=history_length) 24 | 25 | environment.render() 26 | while True: 27 | action = raw_input("Action: Buy (b) / Sell (s) / Hold (enter): ") 28 | if action == 'b': 29 | action = [0, 1, 0] 30 | elif action == 's': 31 | action = [0, 0, 1] 32 | else: 33 | action = [1, 0, 0] 34 | environment.step(action) 35 | environment.render() 36 | -------------------------------------------------------------------------------- /tgym/gens/random.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from tgym.core import DataGenerator 3 | 4 | 5 | class RandomWalk(DataGenerator): 6 | """Random walk data generator for one product 7 | """ 8 | @staticmethod 9 | def _generator(ba_spread=0): 10 | """Generator for a pure random walk 11 | 12 | Args: 13 | ba_spread (float): spread between bid/ask 14 | 15 | Yields: 16 | (tuple): bid ask prices 17 | """ 18 | val = 0 19 | while True: 20 | yield val, val + ba_spread 21 | val += np.random.standard_normal() 22 | 23 | 24 | class AR1(DataGenerator): 25 | """Standardised AR1 data generator 26 | """ 27 | @staticmethod 28 | def _generator(a, ba_spread=0): 29 | """Generator for standardised AR1 30 | 31 | Args: 32 | a (float): AR1 coefficient 33 | ba_spread (float): spread between bid/ask 34 | 35 | Yields: 36 | (tuple): bid ask prices and depths 37 | """ 38 | assert abs(a) < 1 39 | sigma = np.sqrt(1 - a**2) 40 | val = 100 # np.random.normal(scale=sigma) 41 | bid_depth = 1000 42 | ask_depth = 1000 43 | eps = 0.01 # minimum price 44 | 45 | while True: 46 | #print val, val + ba_spread, bid_depth, ask_depth 47 | yield val, val + ba_spread, bid_depth, ask_depth 48 | val += (a - 1) * val + np.random.normal(scale=sigma) 49 | bid_depth += np.int(10*np.random.normal()) # random walk 50 | ask_depth += np.int(10*np.random.normal()) # random walk 51 | bid_depth = np.maximum(bid_depth,0) 52 | ask_depth = np.maximum(ask_depth,0) 53 | val = np.maximum(val, eps) 54 | 55 | 56 | -------------------------------------------------------------------------------- /tests/envs/test_trading.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import sys 3 | sys.path.append('/Users/matthewdixon/Downloads/dq-MM/') 4 | from tgym.envs import SpreadTrading 5 | from tgym.gens.csvstream import CSVStreamer 6 | 7 | 8 | class TestSpreadTrading(object): 9 | 10 | #data_generator = AR1(a=0.1, ba_spread=0.1) 11 | data_generator = CSVStreamer(filename='../../data/AMZN-L1.csv') 12 | st = SpreadTrading( 13 | data_generator=data_generator, 14 | spread_coefficients=[1], 15 | trading_fee=0.2, 16 | time_fee=0.1, 17 | history_length=2 18 | ) 19 | 20 | def test_init(self): 21 | assert self.st._data_generator == self.data_generator 22 | assert self.st._spread_coefficients == [1] 23 | assert self.st._first_render 24 | assert self.st._trading_fee == 0.2 25 | assert self.st._time_fee == 0.1 26 | assert self.st._episode_length == 1000 27 | assert self.st.n_actions == 3 28 | assert self.st._history_length == 2 29 | assert len(self.st._prices_history) == 2 30 | 31 | def test_step(self): 32 | # Buy 33 | state = self.st.step(np.array([0, 1, 0])) 34 | #assert state[0][0] == state[0][1] 35 | assert all(state[0][-3:] == np.array([0, 1, 0])) 36 | assert self.st._entry_price != 0 37 | assert self.st._exit_price == 0 38 | # Hold 39 | state = self.st.step(np.array([1, 0, 0])) 40 | assert all(state[0][-3:] == np.array([0, 1, 0])) 41 | assert self.st._entry_price != 0 42 | assert self.st._exit_price == 0 43 | # Sell 44 | state = self.st.step(np.array([0, 0, 1])) 45 | assert all(state[0][-3:] == np.array([1, 0, 0])) 46 | assert self.st._entry_price == 0 47 | assert self.st._exit_price != 0 48 | 49 | def test_reset(self): 50 | return self.st.reset() 51 | 52 | if __name__ == "__main__": 53 | env = TestSpreadTrading() 54 | print env.st._data_generator.next() 55 | env.test_init() 56 | env.test_step() 57 | print env.test_reset() 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DQ-MM 2 | 3 | DQ-MM is based on Trading Gym, an open-source project for the development of reinforcement learning algorithms in the context of trading. 4 | It is currently composed of a single environment and implements a generic way of feeding this trading environment different type of price data. The focus of the project is level 2 data, i.e. using depths and price levels in the limit order book. 5 | 6 | ## Installation 7 | 8 | `pip install tgym` 9 | 10 | We strongly recommend using virtual environments. A very good guide can be found at http://python-guide-pt-br.readthedocs.io/en/latest/dev/virtualenvs/. 11 | 12 | ## The trading environment: `SpreadTrading` 13 | 14 | `SpreadTrading` is a trading environment allowing to trade a *spread* (see https://en.wikipedia.org/wiki/Spread_trade). We feed the environment a time series of prices (bid and ask) for *n* different products (with a `DataGenerator`), as well as a list of *spread coefficients*. The possible actions are then buying, selling or holding the spread. Actions cannot be taken on one or several legs in isolation. The state of the environment is defined as: prices, entry price and position (whether long, short or flat). 15 | 16 | ![](https://media.giphy.com/media/l4FGI4K3kHnBfUoIE/giphy.gif) 17 | 18 | ## Create your own `DataGenerator` 19 | 20 | To create your own data generator, it must inherit from the `DataGenerator` base class which can be found in the file 'tgym/core.py'. It consists of four methods. Only the private `_generator` method which defines the times series needs to be overridden. Example can be found at `examples/generator_random.py`. For only one product, the `_generator` method **must** yield a `(bid, ask)` tuple, one element at a time. For two or more products, you must return a tuple consisting of bid and ask prices for each product, concatenated. For instance for two products, the method should yield `(bid_1, ask_1, bid_2, ask_2)`. The logic for the time series is encoded there. 21 | 22 | ## Compatibility with OpenAI gym 23 | 24 | Our environments API is strongly inspired by OpenAI Gym. We aim to entirely base it upon OpenAI Gym architecture and propose Trading Gym as an additional OpenAI environment. 25 | 26 | ## Examples 27 | 28 | Some examples are available in `tgym/examples/` 29 | 30 | To run the `dqn_agent.py` example, you will need to also install keras with `pip install keras`. By default, the backend will be set to Theano. You can also run it with Tensorflow by installing it with `pip install tensorflow`. You then need to edit `~/.keras/keras.json` and make sure `"backend": "tensorflow"` is specified. 31 | -------------------------------------------------------------------------------- /tgym/core.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | class Env(object): 4 | """Abstract class for an environment. Simplified OpenAI API. 5 | """ 6 | 7 | def __init__(self): 8 | self.n_actions = None 9 | self.state_shape = None 10 | 11 | def step(self, action): 12 | """Run one timestep of the environment's dynamics. 13 | Accepts an action and returns a tuple (observation, reward, done, info). 14 | 15 | Args: 16 | action (numpy.array): action array 17 | 18 | Returns: 19 | tuple: 20 | - observation (numpy.array): Agent's observation of the current environment. 21 | - reward (float) : Amount of reward returned after previous action. 22 | - done (bool): Whether the episode has ended, in which case further step() calls will return undefined results. 23 | - info (str): Contains auxiliary diagnostic information (helpful for debugging, and sometimes learning). 24 | """ 25 | raise NotImplementedError() 26 | 27 | def reset(self): 28 | """Reset the state of the environment and returns an initial observation. 29 | 30 | Returns: 31 | numpy.array: The initial observation of the space. Initial reward is assumed to be 0. 32 | """ 33 | raise NotImplementedError() 34 | 35 | def render(self): 36 | """Render the environment. 37 | """ 38 | raise NotImplementedError() 39 | 40 | 41 | class DataGenerator(object): 42 | """Parent class for a data generator. Do not use directly. 43 | Overwrite the _generator method to create a custom data generator. 44 | """ 45 | 46 | def __init__(self, **gen_kwargs): 47 | """Initialisation function. The API (gen_kwargs) should be defined in 48 | the function _generator. 49 | """ 50 | self._trainable = False 51 | self.gen_kwargs = gen_kwargs 52 | # We pass self explicitely since we sometimes override rewind (see csv generator) 53 | DataGenerator.rewind(self) 54 | self.n_products = 1 #len(self.next()) / 2 55 | DataGenerator.rewind(self) 56 | 57 | @staticmethod 58 | def _generator(**kwargs): 59 | """Generator function. The keywords arguments entirely defines the API 60 | of the class. This must have a yield statement. 61 | """ 62 | raise NotImplementedError() 63 | 64 | def next(self): 65 | """Return the next element in the generator. 66 | 67 | Args: 68 | numpy.array: next row of the generator 69 | """ 70 | try: 71 | return self.generator.next() 72 | except StopIteration as e: 73 | self._iterator_end() 74 | raise(e) 75 | 76 | def rewind(self): 77 | """Rewind the generator. 78 | """ 79 | self.generator = self._generator(**self.gen_kwargs) 80 | 81 | def _iterator_end(self): 82 | """End of iterator logic. 83 | """ 84 | pass 85 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # Examples 2 | 3 | ## Random Generator: `random_generator.py` 4 | 5 | This example shows how to implement a simple data generator returning a list of random prices. 6 | 7 | ## Trading environment: `trading_environment.py` 8 | 9 | This example runs the trading environment in interactive mode. The environment can take as input three possible actions: Buy, sell and hold. At each step, the environment returns a state composed of: 10 | - current prices, 11 | - the position (‘flat’: no position taken, ‘long’: bought 1 unit of A, ‘short’: sold 1 unit of A), 12 | - the entry price if long or short (0 if flat) and 13 | - the realised PnL. 14 | 15 | The following parameters can be changed: 16 | 1. `episodes` : number of episodes played. 17 | 2. `game_length` : number of time step per episode. 18 | 3. `trading_fee` : cost per action. 19 | 4. `time_fee` : time penalty for not acting on the market. 20 | 5. `history_length` : number of historical prices accessible to the agent. 21 | 22 | The time series can be observed with the `render` method. 23 | 24 | ## DQN agent: `dqn_agent.py` 25 | 26 | As an example, we implement a value-based Q-learning algorithm that learns to trade a periodic signal. Run `python examples/dqn_agent.py` to launch it. Once the learning process is over, the learned strategy is displayed as live time series. Trades are represented by colored (green for buy, red for sell) triangles. Once run, the agent will have learned to buy (sell) at local minima (maxima). Note that the parameters have been set for the agent to learn quickly and we do not wait for full convergence. Feel free to run the program several times and to tweak the parameters to try and find the globally optimal strategy. 27 | 28 | The attributes of the `DQNAgent` class are : 29 | 1. `memory_size` : number of observations kept in memory for learning, 30 | 2. `gamma` : decay rate of the reward function, 31 | 3. `epsilon_min` : minimum rate of random actions to maintain exploration, 32 | 4. `batch_size` : size of the learning batch to take from memory at each gradient descent step, 33 | 5. `action_size` : number of possible actions (here 3, buy/sell/hold), 34 | 6. `train_interval` : number of observations/memory updates before entering the next gradient descent step, 35 | 7. `learning_rate` : learning rate of the stochastic gradient descent. 36 | 37 | The methods of the `DQNAgent` class are : 38 | 1. `_build_brain` : builds the neural network that will be used to approximate the optimal action-value function of the agent. 39 | 2. `_get_batches` : a helper method that builds vectors of homogeneous data of size `batch_size` from the memory, 40 | 3. `act`: returns an action following an epsilon-greedily policy. The probability of choosing a random action is proportional to `epsilon` which starts at 1 and decreases linearly every time the gradient descent is called, until reaching `epsilon_min`, 41 | 4. `observe` which replaces old observations in the memory with the most recent ones and triggers the gradient descent every `train_interval` steps. 42 | 43 | The learning process is as follows. Given a `state` input from the environment, the `act` method of the agent is called, choosing what `action` to take. The `observe` method then processes the `reward` returned by the environment and learns from this experience (using temporal differences or the Bellman equation). This process is repeated over a given number of `episodes`, each one running for `game_length` steps. 44 | -------------------------------------------------------------------------------- /examples/dqn_agent.py: -------------------------------------------------------------------------------- 1 | """ 2 | In this example we demonstrate how to implement a DQN agent and 3 | train it to trade optimally on a periodic price signal. 4 | Training time is short and results are unstable. 5 | Do not hesitate to run several times and/or tweak parameters to get better results. 6 | Inspired from https://github.com/keon/deep-q-learning 7 | """ 8 | import random 9 | 10 | import numpy as np 11 | from keras.layers import Dense 12 | from keras.models import Sequential 13 | from keras.optimizers import Adam 14 | from tgym.envs import SpreadTrading 15 | 16 | 17 | class DQNAgent: 18 | def __init__(self, 19 | state_size, 20 | action_size, 21 | episodes, 22 | episode_length, 23 | memory_size=2000, 24 | train_interval=100, 25 | gamma=0.95, 26 | learning_rate=0.001, 27 | batch_size=64, 28 | epsilon_min=0.01 29 | ): 30 | self.state_size = state_size 31 | self.action_size = action_size 32 | self.memory_size = memory_size 33 | self.memory = [None] * memory_size 34 | self.gamma = gamma 35 | self.epsilon = 1.0 36 | self.epsilon_min = epsilon_min 37 | self.epsilon_decrement = (self.epsilon - epsilon_min)\ 38 | * train_interval / (episodes * episode_length) # linear decrease rate 39 | self.learning_rate = learning_rate 40 | self.train_interval = train_interval 41 | self.batch_size = batch_size 42 | self.brain = self._build_brain() 43 | self.i = 0 44 | 45 | def _build_brain(self): 46 | """Build the agent's brain 47 | """ 48 | brain = Sequential() 49 | neurons_per_layer = 24 50 | activation = "relu" 51 | brain.add(Dense(neurons_per_layer, 52 | input_dim=self.state_size, 53 | activation=activation)) 54 | brain.add(Dense(neurons_per_layer, activation=activation)) 55 | brain.add(Dense(self.action_size, activation='linear')) 56 | brain.compile(loss='mse', optimizer=Adam(lr=self.learning_rate)) 57 | return brain 58 | 59 | def act(self, state): 60 | """Acting Policy of the DQNAgent 61 | """ 62 | action = np.zeros(self.action_size) 63 | if np.random.rand() <= self.epsilon: 64 | action[random.randrange(self.action_size)] = 1 65 | else: 66 | state = state.reshape(1, self.state_size) 67 | act_values = self.brain.predict(state) 68 | action[np.argmax(act_values[0])] = 1 69 | return action 70 | 71 | def observe(self, state, action, reward, next_state, done, warming_up=False): 72 | """Memory Management and training of the agent 73 | """ 74 | self.i = (self.i + 1) % self.memory_size 75 | self.memory[self.i] = (state, action, reward, next_state, done) 76 | if (not warming_up) and (self.i % self.train_interval) == 0: 77 | if self.epsilon > self.epsilon_min: 78 | self.epsilon -= self.epsilon_decrement 79 | state, action, reward, next_state, done = self._get_batches() 80 | reward += (self.gamma 81 | * np.logical_not(done) 82 | * np.amax(self.brain.predict(next_state), 83 | axis=1)) 84 | q_target = self.brain.predict(state) 85 | q_target[action[0], action[1]] = reward 86 | return self.brain.fit(state, q_target, 87 | batch_size=self.batch_size, 88 | epochs=1, 89 | verbose=False) 90 | 91 | def _get_batches(self): 92 | """Selecting a batch of memory 93 | Split it into categorical subbatches 94 | Process action_batch into a position vector 95 | """ 96 | batch = np.array(random.sample(self.memory, self.batch_size)) 97 | state_batch = np.concatenate(batch[:, 0])\ 98 | .reshape(self.batch_size, self.state_size) 99 | action_batch = np.concatenate(batch[:, 1])\ 100 | .reshape(self.batch_size, self.action_size) 101 | reward_batch = batch[:, 2] 102 | next_state_batch = np.concatenate(batch[:, 3])\ 103 | .reshape(self.batch_size, self.state_size) 104 | done_batch = batch[:, 4] 105 | # action processing 106 | action_batch = np.where(action_batch == 1) 107 | return state_batch, action_batch, reward_batch, next_state_batch, done_batch 108 | 109 | 110 | if __name__ == "__main__": 111 | import matplotlib.pyplot as plt 112 | 113 | from tgym.envs import SpreadTrading 114 | from tgym.gens.deterministic import WavySignal 115 | # Instantiating the environmnent 116 | generator = WavySignal(period_1=25, period_2=50, epsilon=-0.5) 117 | episodes = 50 118 | episode_length = 400 119 | trading_fee = .2 120 | time_fee = 0 121 | history_length = 2 122 | environment = SpreadTrading(spread_coefficients=[1], 123 | data_generator=generator, 124 | trading_fee=trading_fee, 125 | time_fee=time_fee, 126 | history_length=history_length) 127 | state = environment.reset() 128 | # Instantiating the agent 129 | memory_size = 3000 130 | state_size = len(state) 131 | gamma = 0.96 132 | epsilon_min = 0.01 133 | batch_size = 64 134 | action_size = len(SpreadTrading._actions) 135 | train_interval = 10 136 | learning_rate = 0.001 137 | agent = DQNAgent(state_size=state_size, 138 | action_size=action_size, 139 | memory_size=memory_size, 140 | episodes=episodes, 141 | episode_length=episode_length, 142 | train_interval=train_interval, 143 | gamma=gamma, 144 | learning_rate=learning_rate, 145 | batch_size=batch_size, 146 | epsilon_min=epsilon_min) 147 | # Warming up the agent 148 | for _ in range(memory_size): 149 | action = agent.act(state) 150 | next_state, reward, done, _ = environment.step(action) 151 | agent.observe(state, action, reward, next_state, done, warming_up=True) 152 | # Training the agent 153 | for ep in range(episodes): 154 | state = environment.reset() 155 | rew = 0 156 | for _ in range(episode_length): 157 | action = agent.act(state) 158 | next_state, reward, done, _ = environment.step(action) 159 | loss = agent.observe(state, action, reward, next_state, done) 160 | state = next_state 161 | rew += reward 162 | print("Ep:" + str(ep) 163 | + "| rew:" + str(round(rew, 2)) 164 | + "| eps:" + str(round(agent.epsilon, 2)) 165 | + "| loss:" + str(round(loss.history["loss"][0], 4))) 166 | # Running the agent 167 | done = False 168 | state = environment.reset() 169 | while not done: 170 | action = agent.act(state) 171 | state, _, done, info = environment.step(action) 172 | if 'status' in info and info['status'] == 'Closed plot': 173 | done = True 174 | else: 175 | environment.render() 176 | -------------------------------------------------------------------------------- /examples/DQNAgent.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # In[1]: 5 | 6 | """ 7 | In this example we demonstrate how to implement a DQN agent and 8 | train it to trade optimally on a periodic price signal. 9 | Training time is short and results are unstable. 10 | Do not hesitate to run several times and/or tweak parameters to get better results. 11 | Inspired from https://github.com/keon/deep-q-learning 12 | """ 13 | import random 14 | import sys 15 | sys.path.append('/Users/matthewdixon/Downloads/dq-MM/') 16 | import numpy as np 17 | from keras.layers import Dense 18 | from keras.models import Sequential 19 | from keras.optimizers import Adam 20 | from tgym.envs import SpreadTrading 21 | 22 | 23 | # In[106]: 24 | 25 | class DQNAgent: 26 | def __init__(self, 27 | state_size, 28 | action_size, 29 | episodes, 30 | episode_length, 31 | memory_size=2000, 32 | train_interval=100, 33 | gamma=0.95, 34 | learning_rate=0.001, 35 | batch_size=64, 36 | epsilon_min=0.01 37 | ): 38 | self.state_size = state_size 39 | self.action_size = action_size 40 | self.memory_size = memory_size 41 | self.memory = [None] * memory_size 42 | self.gamma = gamma 43 | self.epsilon = 1.0 44 | self.epsilon_min = epsilon_min 45 | self.epsilon_decrement = (self.epsilon - epsilon_min) * train_interval / (episodes * episode_length) # linear decrease rate 46 | self.learning_rate = learning_rate 47 | self.train_interval = train_interval 48 | self.batch_size = batch_size 49 | self.brain = self._build_brain() 50 | self.i = 0 51 | 52 | def _build_brain(self): 53 | """Build the agent's brain 54 | """ 55 | brain = Sequential() 56 | neurons_per_layer = 24 57 | activation = "relu" 58 | brain.add(Dense(neurons_per_layer, 59 | input_dim=self.state_size, 60 | activation=activation)) 61 | brain.add(Dense(neurons_per_layer, activation=activation)) 62 | brain.add(Dense(self.action_size, activation='linear')) 63 | brain.compile(loss='mse', optimizer=Adam(lr=self.learning_rate)) 64 | return brain 65 | 66 | def act(self, state): 67 | """Acting Policy of the DQNAgent 68 | """ 69 | action = np.zeros(self.action_size) 70 | valid_actions = [] 71 | position = state[-3:] 72 | 73 | if all(position == [1,0,0]): # flat 74 | valid_actions = [0,1,2] 75 | elif all(position == [0,1,0]): # long 76 | valid_actions = [0,2] # hold or sell 77 | else: # short 78 | valid_actions = [0,1] # hold or buy 79 | 80 | if np.random.rand() <= self.epsilon: 81 | action[valid_actions[random.randrange(len(valid_actions))]] = 1 82 | else: 83 | state = state.reshape(1, self.state_size) 84 | act_values = self.brain.predict(state) 85 | #print act_values[0] 86 | action[valid_actions[np.argmax(act_values[0][valid_actions])]] = 1 87 | return action 88 | 89 | def observe(self, state, action, reward, next_state, done, warming_up=False): 90 | """Memory Management and training of the agent 91 | """ 92 | self.i = (self.i + 1) % self.memory_size 93 | self.memory[self.i] = (state, action, reward, next_state, done) 94 | if (not warming_up) and (self.i % self.train_interval) == 0: 95 | if self.epsilon > self.epsilon_min: 96 | self.epsilon -= self.epsilon_decrement 97 | state, action, reward, next_state, done = self._get_batches() 98 | reward += (self.gamma 99 | * np.logical_not(done) 100 | * np.amax(self.brain.predict(next_state), 101 | axis=1)) 102 | q_target = self.brain.predict(state) 103 | #print "state: ", state[0] 104 | #print "action[0]: ", action[0] 105 | #print "action[1]: ", action[1] 106 | #print "q_target: ", q_target[action[0], action[1]] 107 | #print "reward: ", reward 108 | 109 | q_target[action[0], action[1]] = reward 110 | return self.brain.fit(state, q_target, 111 | batch_size=self.batch_size, 112 | epochs=1, 113 | verbose=False) 114 | 115 | def _get_batches(self): 116 | """Selecting a batch of memory 117 | Split it into categorical subbatches 118 | Process action_batch into a position vector 119 | """ 120 | batch = np.array(random.sample(self.memory, self.batch_size)) 121 | state_batch = np.concatenate(batch[:, 0]) .reshape(self.batch_size, self.state_size) 122 | action_batch = np.concatenate(batch[:, 1]) .reshape(self.batch_size, self.action_size) 123 | reward_batch = batch[:, 2] 124 | next_state_batch = np.concatenate(batch[:, 3]) .reshape(self.batch_size, self.state_size) 125 | done_batch = batch[:, 4] 126 | # action processing 127 | action_batch = np.where(action_batch == 1) 128 | return state_batch, action_batch, reward_batch, next_state_batch, done_batch 129 | 130 | 131 | # In[105]: 132 | 133 | import matplotlib.pyplot as plt 134 | #import sys 135 | #sys.path.append('/Users/matthewdixon/Downloads/Trading-Gym/') 136 | #from tgym.envs import SpreadTrading 137 | #from tgym.gens.deterministic import WavySignal 138 | #from tgym.gens.random import AR1 139 | from tgym.gens.csvstream import CSVStreamer 140 | # Instantiating the environmnent 141 | generator = CSVStreamer(filename='../data/AMZN-L1.csv') 142 | #generator = AR1(a=0.1, ba_spread=0.1) #WavySignal(period_1=25, period_2=50, epsilon=-0.5) 143 | episodes = 100 144 | episode_length = 400 145 | trading_fee = .0 146 | time_fee = 0 147 | history_length = 2 148 | environment = SpreadTrading(spread_coefficients=[1], 149 | data_generator=generator, 150 | trading_fee=trading_fee, 151 | time_fee=time_fee, 152 | history_length=history_length) 153 | 154 | 155 | # In[102]: 156 | 157 | state = environment.reset() 158 | # Instantiating the agent 159 | memory_size = 3000 160 | state_size = len(state) 161 | gamma = 0.96 162 | epsilon_min = 0.01 163 | batch_size = 64 164 | action_size = len(SpreadTrading._actions) 165 | train_interval = 10 166 | learning_rate = 0.001 167 | agent = DQNAgent(state_size=state_size, 168 | action_size=action_size, 169 | memory_size=memory_size, 170 | episodes=episodes, 171 | episode_length=episode_length, 172 | train_interval=train_interval, 173 | gamma=gamma, 174 | learning_rate=learning_rate, 175 | batch_size=batch_size, 176 | epsilon_min=epsilon_min) 177 | 178 | 179 | # In[103]: 180 | 181 | # Warming up the agent 182 | for _ in range(memory_size): 183 | action = agent.act(state) 184 | next_state, reward, done, _ = environment.step(action) 185 | agent.observe(state, action, reward, next_state, done, warming_up=True) 186 | 187 | rews = [] 188 | losses = [] 189 | epsilons = [] 190 | # Training the agent 191 | for ep in range(episodes): 192 | state = environment.reset() 193 | rew = 0 194 | for _ in range(episode_length): 195 | action = agent.act(state) 196 | 197 | for position in environment._positions: 198 | if all(environment._position==environment._positions[position]): 199 | position_name = position 200 | 201 | 202 | for _action in environment._actions: 203 | if all(action==environment._actions[_action]): 204 | action_name = _action 205 | 206 | next_state, reward, done, _ = environment.step(action) 207 | 208 | for position in environment._positions: 209 | if all(environment._position==environment._positions[position]): 210 | next_position_name = position 211 | 212 | 213 | 214 | #print position_name, action_name, next_position_name 215 | loss = agent.observe(state, action, reward, next_state, done) 216 | state = next_state 217 | rew += reward 218 | print("Ep:" + str(ep) 219 | + "| rew:" + str(round(rew, 2)) 220 | + "| eps:" + str(round(agent.epsilon, 2)) 221 | + "| loss:" + str(round(loss.history["loss"][0], 4))) 222 | rews.append(rew) 223 | epsilons.append(agent.epsilon) 224 | losses.append(loss.history["loss"][0]) 225 | 226 | 227 | # In[ ]: 228 | 229 | plt.plot(epsilons) 230 | plt.xlabel('episodes') 231 | plt.ylabel('eps') 232 | plt.savefig('epsilons.jpg') 233 | 234 | 235 | # In[ ]: 236 | 237 | plt.plot(rews) 238 | plt.xlabel('episodes') 239 | plt.ylabel('rewards') 240 | plt.savefig('rewards.jpg') 241 | 242 | 243 | # In[104]: 244 | 245 | # Running the agent 246 | done = False 247 | state = environment.reset() 248 | while not done: 249 | action = agent.act(state) 250 | 251 | for position in environment._positions: 252 | if all(environment._position==environment._positions[position]): 253 | position_name = position 254 | 255 | for _action in environment._actions: 256 | if all(action==environment._actions[_action]): 257 | action_name = _action 258 | 259 | state, _, done, info = environment.step(action) 260 | 261 | for position in environment._positions: 262 | if all(environment._position==environment._positions[position]): 263 | next_position_name = position 264 | 265 | print position_name, action_name, next_position_name 266 | 267 | if 'status' in info and info['status'] == 'Closed plot': 268 | done = True 269 | else: 270 | environment.render() 271 | 272 | 273 | # In[ ]: 274 | 275 | 276 | 277 | -------------------------------------------------------------------------------- /tgym/envs/trading.py: -------------------------------------------------------------------------------- 1 | import matplotlib as mpl 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | from tgym.core import Env 5 | from tgym.utils import calc_spread 6 | 7 | plt.style.use('dark_background') 8 | mpl.rcParams.update( 9 | { 10 | "font.size": 15, 11 | "axes.labelsize": 15, 12 | "lines.linewidth": 1, 13 | "lines.markersize": 8 14 | } 15 | ) 16 | 17 | 18 | class SpreadTrading(Env): 19 | """Class for a discrete (buy/hold/sell) spread trading environment. 20 | """ 21 | 22 | _actions = { 23 | 'hold': np.array([1, 0, 0]), 24 | 'buy': np.array([0, 1, 0]), 25 | 'sell': np.array([0, 0, 1]) 26 | } 27 | 28 | _positions = { 29 | 'flat': np.array([1, 0, 0]), 30 | 'long': np.array([0, 1, 0]), 31 | 'short': np.array([0, 0, 1]) 32 | } 33 | 34 | def __init__(self, data_generator, spread_coefficients, episode_length=1000, trading_fee=0, time_fee=0, history_length=2): 35 | """Initialisation function 36 | 37 | Args: 38 | data_generator (tgym.core.DataGenerator): A data 39 | generator object yielding a 1D array of bid-ask prices. 40 | spread_coefficients (list): A list of signed integers defining 41 | how much of each product to buy (positive) or sell (negative) 42 | when buying or selling the spread. 43 | episode_length (int): number of steps to play the game for 44 | trading_fee (float): penalty for trading 45 | time_fee (float): time fee 46 | depths_history: bid, ask depth 47 | history_length (int): number of historical states to stack in the 48 | observation vector. 49 | """ 50 | assert data_generator.n_products == len(spread_coefficients) 51 | assert history_length > 0 52 | self._data_generator = data_generator 53 | self._spread_coefficients = spread_coefficients 54 | self._first_render = True 55 | self._trading_fee = trading_fee 56 | self._time_fee = time_fee 57 | self._episode_length = episode_length 58 | self.n_actions = 3 59 | self._prices_history = [] 60 | self._depths_history = [] 61 | self._history_length = history_length 62 | self.reset() 63 | 64 | def reset(self): 65 | """Reset the trading environment. Reset rewards, data generator... 66 | 67 | Returns: 68 | observation (numpy.array): observation of the state 69 | """ 70 | self._iteration = 0 71 | self._data_generator.rewind() 72 | self._total_reward = 0 73 | self._total_pnl = 0 74 | self._position = self._positions['flat'] 75 | self._entry_price = 0 76 | self._exit_price = 0 77 | self._closed_plot = False 78 | 79 | for i in range(self._history_length): 80 | gen = np.array(self._data_generator.next()) 81 | self._prices_history.append(gen[[2,0]]/1000.0) 82 | self._depths_history.append(gen[[3,1]]) 83 | 84 | observation = self._get_observation() 85 | self.state_shape = observation.shape 86 | self._action = self._actions['hold'] 87 | return observation 88 | 89 | def step(self, action): 90 | """Take an action (buy/sell/hold) and computes the immediate reward. 91 | 92 | Args: 93 | action (numpy.array): Action to be taken, one-hot encoded. 94 | 95 | Returns: 96 | tuple: 97 | - observation (numpy.array): Agent's observation of the current environment. 98 | - reward (float) : Amount of reward returned after previous action. 99 | - done (bool): Whether the episode has ended, in which case further step() calls will return undefined results. 100 | - info (dict): Contains auxiliary diagnostic information (helpful for debugging, and sometimes learning). 101 | 102 | """ 103 | 104 | assert any([(action == x).all() for x in self._actions.values()]) 105 | self._action = action 106 | self._iteration += 1 107 | done = False 108 | instant_pnl = 0 109 | info = {} 110 | reward = -self._time_fee 111 | #r = np.random.rand(1) 112 | q = np.float(self._depths_history[-1][0])/(self._depths_history[-1][0] +self._depths_history[-1][1]) 113 | fill_ask = True 114 | fill_bid = True 115 | 116 | #if q>0.8: 117 | # fill_bid = False 118 | #elif q<0.2: 119 | # fill_ask = False 120 | 121 | if all(action == self._actions['buy']) and (fill_bid): 122 | reward -= self._trading_fee 123 | if all(self._position == self._positions['flat']): 124 | self._position = self._positions['long'] 125 | self._entry_price = self._prices_history[-1][0] # bid 126 | #reward -= 0 #self._entry_price 127 | elif all(self._position == self._positions['short']): # closed out a short position 128 | self._position = self._positions['flat'] 129 | self._exit_price = self._prices_history[-1][0] # bid 130 | 131 | instant_pnl = self._entry_price - self._exit_price 132 | self._entry_price = 0 133 | 134 | elif all(action == self._actions['sell']) and (fill_ask): 135 | reward -= self._trading_fee 136 | if all(self._position == self._positions['flat']): 137 | self._position = self._positions['short'] 138 | self._entry_price = self._prices_history[-1][1] # ask 139 | elif all(self._position == self._positions['long']): 140 | self._exit_price = self._prices_history[-1][1] # ask 141 | instant_pnl = self._exit_price - self._entry_price 142 | self._position = self._positions['flat'] 143 | self._entry_price = 0 144 | 145 | reward += instant_pnl 146 | self._total_pnl += instant_pnl 147 | self._total_reward += reward 148 | 149 | # Game over logic 150 | try: 151 | gen = np.array(self._data_generator.next()) 152 | self._prices_history.append(gen[[2,0]]/1000.0) 153 | self._depths_history.append(gen[[3,1]]) 154 | except StopIteration: 155 | done = True 156 | info['status'] = 'No more data.' 157 | if self._iteration >= self._episode_length: 158 | done = True 159 | info['status'] = 'Time out.' 160 | if self._closed_plot: 161 | info['status'] = 'Closed plot' 162 | 163 | observation = self._get_observation() 164 | return observation, reward, done, info 165 | 166 | def _handle_close(self, evt): 167 | self._closed_plot = True 168 | 169 | def render(self, savefig=False, filename='myfig'): 170 | """Matlplotlib rendering of each step. 171 | 172 | Args: 173 | savefig (bool): Whether to save the figure as an image or not. 174 | filename (str): Name of the image file. 175 | """ 176 | if self._first_render: 177 | self._f, self._ax = plt.subplots( 178 | len(self._spread_coefficients) + int(len(self._spread_coefficients) > 1), 179 | sharex=True 180 | ) 181 | if len(self._spread_coefficients) == 1: 182 | self._ax = [self._ax] 183 | self._f.set_size_inches(12, 6) 184 | self._first_render = False 185 | self._f.canvas.mpl_connect('close_event', self._handle_close) 186 | if len(self._spread_coefficients) > 1: 187 | # TODO: To be checked 188 | for prod_i in range(len(self._spread_coefficients)): 189 | bid = self._prices_history[-1][2 * prod_i] 190 | ask = self._prices_history[-1][2 * prod_i + 1] 191 | self._ax[prod_i].plot([self._iteration, self._iteration + 1], 192 | [bid, bid], color='white') 193 | self._ax[prod_i].plot([self._iteration, self._iteration + 1], 194 | [ask, ask], color='white') 195 | self._ax[prod_i].set_title('Product {} (spread coef {})'.format( 196 | prod_i, str(self._spread_coefficients[prod_i]))) 197 | 198 | # Spread price 199 | prices = self._prices_history[-1] 200 | bid, ask = calc_spread(prices, self._spread_coefficients) 201 | self._ax[-1].plot([self._iteration, self._iteration + 1], 202 | [bid, bid], color='white') 203 | self._ax[-1].plot([self._iteration, self._iteration + 1], 204 | [ask, ask], color='white') 205 | ymin, ymax = self._ax[-1].get_ylim() 206 | yrange = ymax - ymin 207 | if (self._action == self._actions['sell']).all(): 208 | self._ax[-1].scatter(self._iteration + 0.5, bid + 0.03 * 209 | yrange, color='orangered', marker='v') 210 | elif (self._action == self._actions['buy']).all(): 211 | self._ax[-1].scatter(self._iteration + 0.5, ask - 0.03 * 212 | yrange, color='lawngreen', marker='^') 213 | plt.suptitle('Cumulated Reward: ' + "%.2f" % self._total_reward + ' ~ ' + 214 | 'Cumulated PnL: ' + "%.2f" % self._total_pnl + ' ~ ' + 215 | 'Position: ' + ['flat', 'long', 'short'][list(self._position).index(1)] + ' ~ ' + 216 | 'Entry Price: ' + "%.2f" % self._entry_price) 217 | self._f.tight_layout() 218 | plt.xticks(range(self._iteration)[::5]) 219 | plt.xlim([max(0, self._iteration - 80.5), self._iteration + 0.5]) 220 | plt.subplots_adjust(top=0.85) 221 | plt.pause(0.01) 222 | if savefig: 223 | plt.savefig(filename) 224 | 225 | def _get_observation(self): 226 | """Concatenate all necessary elements to create the observation. 227 | 228 | Returns: 229 | numpy.array: observation array. 230 | """ 231 | return np.concatenate( 232 | [prices for prices in self._prices_history[-self._history_length:]] + 233 | 234 | [depths for depths in self._depths_history[-self._history_length:]] + 235 | [ 236 | np.array([self._entry_price]), 237 | np.array(self._position) 238 | ] 239 | ) 240 | 241 | @staticmethod 242 | def random_action_fun(): 243 | """The default random action for exploration. 244 | We hold 80% of the time and buy or sell 10% of the time each. 245 | 246 | Returns: 247 | numpy.array: array with a 1 on the action index, 0 elsewhere. 248 | """ 249 | return np.random.multinomial(1, [0.8, 0.1, 0.1]) 250 | -------------------------------------------------------------------------------- /examples/DQNAgent.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stderr", 10 | "output_type": "stream", 11 | "text": [ 12 | "/Users/matthewdixon/anaconda/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n", 13 | " from ._conv import register_converters as _register_converters\n", 14 | "Using TensorFlow backend.\n" 15 | ] 16 | } 17 | ], 18 | "source": [ 19 | "\"\"\"\n", 20 | "In this example we demonstrate how to implement a DQN agent and\n", 21 | "train it to trade optimally on a periodic price signal.\n", 22 | "Training time is short and results are unstable.\n", 23 | "Do not hesitate to run several times and/or tweak parameters to get better results.\n", 24 | "Inspired from https://github.com/keon/deep-q-learning\n", 25 | "\"\"\"\n", 26 | "import random\n", 27 | "import sys\n", 28 | "sys.path.append('/Users/matthewdixon/Downloads/dq-MM/')\n", 29 | "import numpy as np\n", 30 | "from keras.layers import Dense\n", 31 | "from keras.models import Sequential\n", 32 | "from keras.optimizers import Adam\n", 33 | "from tgym.envs import SpreadTrading\n", 34 | "%matplotlib inline\n", 35 | "%load_ext autoreload\n", 36 | "%autoreload 2" 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": 106, 42 | "metadata": {}, 43 | "outputs": [], 44 | "source": [ 45 | "class DQNAgent:\n", 46 | " def __init__(self,\n", 47 | " state_size,\n", 48 | " action_size,\n", 49 | " episodes,\n", 50 | " episode_length,\n", 51 | " memory_size=2000,\n", 52 | " train_interval=100,\n", 53 | " gamma=0.95,\n", 54 | " learning_rate=0.001,\n", 55 | " batch_size=64,\n", 56 | " epsilon_min=0.01\n", 57 | " ):\n", 58 | " self.state_size = state_size\n", 59 | " self.action_size = action_size\n", 60 | " self.memory_size = memory_size\n", 61 | " self.memory = [None] * memory_size\n", 62 | " self.gamma = gamma\n", 63 | " self.epsilon = 1.0\n", 64 | " self.epsilon_min = epsilon_min\n", 65 | " self.epsilon_decrement = (self.epsilon - epsilon_min)\\\n", 66 | " * train_interval / (episodes * episode_length) # linear decrease rate\n", 67 | " self.learning_rate = learning_rate\n", 68 | " self.train_interval = train_interval\n", 69 | " self.batch_size = batch_size\n", 70 | " self.brain = self._build_brain()\n", 71 | " self.i = 0\n", 72 | "\n", 73 | " def _build_brain(self):\n", 74 | " \"\"\"Build the agent's brain\n", 75 | " \"\"\"\n", 76 | " brain = Sequential()\n", 77 | " neurons_per_layer = 24\n", 78 | " activation = \"relu\"\n", 79 | " brain.add(Dense(neurons_per_layer,\n", 80 | " input_dim=self.state_size,\n", 81 | " activation=activation))\n", 82 | " brain.add(Dense(neurons_per_layer, activation=activation))\n", 83 | " brain.add(Dense(self.action_size, activation='linear'))\n", 84 | " brain.compile(loss='mse', optimizer=Adam(lr=self.learning_rate))\n", 85 | " return brain\n", 86 | "\n", 87 | " def act(self, state):\n", 88 | " \"\"\"Acting Policy of the DQNAgent\n", 89 | " \"\"\"\n", 90 | " action = np.zeros(self.action_size)\n", 91 | " valid_actions = []\n", 92 | " position = state[-3:]\n", 93 | " \n", 94 | " if all(position == [1,0,0]): # flat\n", 95 | " valid_actions = [0,1,2]\n", 96 | " elif all(position == [0,1,0]): # long\n", 97 | " valid_actions = [0,2] # hold or sell\n", 98 | " else: # short\n", 99 | " valid_actions = [0,1] # hold or buy\n", 100 | " \n", 101 | " if np.random.rand() <= self.epsilon: \n", 102 | " action[valid_actions[random.randrange(len(valid_actions))]] = 1 \n", 103 | " else:\n", 104 | " state = state.reshape(1, self.state_size)\n", 105 | " act_values = self.brain.predict(state)\n", 106 | " #print act_values[0]\n", 107 | " action[valid_actions[np.argmax(act_values[0][valid_actions])]] = 1\n", 108 | " return action\n", 109 | "\n", 110 | " def observe(self, state, action, reward, next_state, done, warming_up=False):\n", 111 | " \"\"\"Memory Management and training of the agent\n", 112 | " \"\"\"\n", 113 | " self.i = (self.i + 1) % self.memory_size\n", 114 | " self.memory[self.i] = (state, action, reward, next_state, done)\n", 115 | " if (not warming_up) and (self.i % self.train_interval) == 0:\n", 116 | " if self.epsilon > self.epsilon_min:\n", 117 | " self.epsilon -= self.epsilon_decrement\n", 118 | " state, action, reward, next_state, done = self._get_batches()\n", 119 | " reward += (self.gamma\n", 120 | " * np.logical_not(done)\n", 121 | " * np.amax(self.brain.predict(next_state),\n", 122 | " axis=1))\n", 123 | " q_target = self.brain.predict(state)\n", 124 | " #print \"state: \", state[0]\n", 125 | " #print \"action[0]: \", action[0]\n", 126 | " #print \"action[1]: \", action[1]\n", 127 | " #print \"q_target: \", q_target[action[0], action[1]]\n", 128 | " #print \"reward: \", reward\n", 129 | " \n", 130 | " q_target[action[0], action[1]] = reward\n", 131 | " return self.brain.fit(state, q_target,\n", 132 | " batch_size=self.batch_size,\n", 133 | " epochs=1,\n", 134 | " verbose=False)\n", 135 | "\n", 136 | " def _get_batches(self):\n", 137 | " \"\"\"Selecting a batch of memory\n", 138 | " Split it into categorical subbatches\n", 139 | " Process action_batch into a position vector\n", 140 | " \"\"\"\n", 141 | " batch = np.array(random.sample(self.memory, self.batch_size))\n", 142 | " state_batch = np.concatenate(batch[:, 0])\\\n", 143 | " .reshape(self.batch_size, self.state_size)\n", 144 | " action_batch = np.concatenate(batch[:, 1])\\\n", 145 | " .reshape(self.batch_size, self.action_size)\n", 146 | " reward_batch = batch[:, 2]\n", 147 | " next_state_batch = np.concatenate(batch[:, 3])\\\n", 148 | " .reshape(self.batch_size, self.state_size)\n", 149 | " done_batch = batch[:, 4]\n", 150 | " # action processing\n", 151 | " action_batch = np.where(action_batch == 1)\n", 152 | " return state_batch, action_batch, reward_batch, next_state_batch, done_batch" 153 | ] 154 | }, 155 | { 156 | "cell_type": "code", 157 | "execution_count": 105, 158 | "metadata": { 159 | "collapsed": true 160 | }, 161 | "outputs": [], 162 | "source": [ 163 | "import matplotlib.pyplot as plt\n", 164 | "#import sys\n", 165 | "#sys.path.append('/Users/matthewdixon/Downloads/Trading-Gym/')\n", 166 | "#from tgym.envs import SpreadTrading\n", 167 | "#from tgym.gens.deterministic import WavySignal\n", 168 | "#from tgym.gens.random import AR1\n", 169 | "from tgym.gens.csvstream import CSVStreamer\n", 170 | "# Instantiating the environmnent\n", 171 | "generator = CSVStreamer(filename='../data/AMZN-L1.csv')\n", 172 | "#generator = AR1(a=0.1, ba_spread=0.1) #WavySignal(period_1=25, period_2=50, epsilon=-0.5)\n", 173 | "episodes = 100\n", 174 | "episode_length = 400\n", 175 | "trading_fee = .0\n", 176 | "time_fee = 0\n", 177 | "history_length = 2\n", 178 | "environment = SpreadTrading(spread_coefficients=[1],\n", 179 | " data_generator=generator,\n", 180 | " trading_fee=trading_fee,\n", 181 | " time_fee=time_fee,\n", 182 | " history_length=history_length)" 183 | ] 184 | }, 185 | { 186 | "cell_type": "code", 187 | "execution_count": 102, 188 | "metadata": { 189 | "collapsed": true 190 | }, 191 | "outputs": [], 192 | "source": [ 193 | "state = environment.reset()\n", 194 | "# Instantiating the agent\n", 195 | "memory_size = 3000\n", 196 | "state_size = len(state)\n", 197 | "gamma = 0.96\n", 198 | "epsilon_min = 0.01\n", 199 | "batch_size = 64\n", 200 | "action_size = len(SpreadTrading._actions)\n", 201 | "train_interval = 10\n", 202 | "learning_rate = 0.001\n", 203 | "agent = DQNAgent(state_size=state_size,\n", 204 | " action_size=action_size,\n", 205 | " memory_size=memory_size,\n", 206 | " episodes=episodes,\n", 207 | " episode_length=episode_length,\n", 208 | " train_interval=train_interval,\n", 209 | " gamma=gamma,\n", 210 | " learning_rate=learning_rate,\n", 211 | " batch_size=batch_size,\n", 212 | " epsilon_min=epsilon_min)" 213 | ] 214 | }, 215 | { 216 | "cell_type": "code", 217 | "execution_count": 103, 218 | "metadata": {}, 219 | "outputs": [ 220 | { 221 | "name": "stdout", 222 | "output_type": "stream", 223 | "text": [ 224 | "[-1614.2766 259.9944 1560.3267]\n", 225 | "[-968.71735 115.208725 676.751 ]\n", 226 | "[-768.54614 156.22867 531.3052 ]\n", 227 | "[-768.53314 154.577 530.10254]\n", 228 | "[-1063.5344 355.69556 1164.2972 ]\n", 229 | "[-490.92935 219.9465 345.1379 ]\n", 230 | "[-339.80334 230.88425 259.27557]\n", 231 | "[-300.0792 221.48132 236.31671]\n", 232 | "[-298.92703 219.47346 234.68428]\n", 233 | "[-263.3491 220.34482 203.0032 ]\n", 234 | "[-196.79391 215.44624 174.33176]\n", 235 | "[-643.70325 364.6928 879.065 ]\n", 236 | "[-529.93054 367.23532 803.2838 ]\n", 237 | "[-529.7739 346.93646 796.4288 ]\n", 238 | "[-478.14557 359.29495 765.4579 ]\n", 239 | "[ 16.931746 242.12386 77.22698 ]\n", 240 | "[ -1.0915122 231.0158 70.317116 ]\n", 241 | "[ 44.462944 234.21417 46.299534]\n", 242 | "[ 34.92208 218.52374 49.66454]\n", 243 | "[-314.50632 259.07666 617.5656 ]\n", 244 | "[-256.92844 322.32834 573.8034 ]\n", 245 | "[-204.61076 313.67435 539.8428 ]\n", 246 | "[ 262.99448 232.8314 -103.668 ]\n", 247 | "[ 303.33878 220.31445 -116.058304]\n", 248 | "[ 303.60376 222.96992 -119.20332]\n", 249 | "[-92.47566 305.70847 433.5396 ]\n", 250 | "[-65.954346 346.2579 439.03528 ]\n", 251 | "[-57.94802 299.7024 407.65805]\n", 252 | "[ 369.90576 231.15532 -160.27202]\n", 253 | "[ 383.8384 197.36357 -174.03574]\n", 254 | "[-29.308668 254.12491 393.766 ]\n", 255 | "[ 416.6959 207.32558 -185.14778]\n", 256 | "[ 395.28485 194.54149 -189.71928]\n", 257 | "[ 1.0032966 230.39482 326.96588 ]\n", 258 | "[ 566.4357 511.53577 -238.90025]\n", 259 | "[239.04132 705.3621 199.72264]\n", 260 | "[ 444.0609 197.07143 -226.8661 ]\n", 261 | "Ep:0| rew:218.6| eps:0.8| loss:15975.4482\n", 262 | "[107.728134 220.53938 253.59003 ]\n", 263 | "[283.09128 687.46875 131.9855 ]\n", 264 | "[ 607.3796 376.30508 -307.32315]\n", 265 | "[ 491.8029 176.56361 -268.39597]\n", 266 | "[153.6066 246.22182 198.97278]\n", 267 | "[ 533.34576 148.1677 -266.653 ]\n", 268 | "[169.97266 173.45787 172.72598]\n", 269 | "[ 539.0696 144.1219 -270.0518]\n", 270 | "[ 567.8553 161.93411 -267.903 ]\n", 271 | "[152.22859 157.79707 173.67422]\n", 272 | "[182.34961 176.41692 148.18303]\n", 273 | "[135.04924 111.78032 171.4572 ]\n", 274 | "[ 475.29022 187.35526 -199.32323]\n", 275 | "[ 671.61395 437.3607 -334.97833]\n", 276 | "[ 637.6705 271.83606 -264.57294]\n", 277 | "[175.85222 92.884865 142.02234 ]\n", 278 | "[ 568.30786 130.08742 -292.3047 ]\n", 279 | "[189.87505 137.28624 96.50612]\n", 280 | "[183.40276 105.0554 104.0634 ]\n", 281 | "[ 546.52765 101.4907 -284.94846]\n", 282 | "[ 560.8531 103.75114 -277.66718]\n", 283 | "[ 547.7642 95.10148 -285.4066 ]\n", 284 | "[ 547.7977 92.0971 -281.01584]\n", 285 | "[168.366 52.851345 108.99835 ]\n", 286 | "[169.8397 89.33288 95.932816]\n", 287 | "[193.29836 118.68334 83.19386]\n", 288 | "[191.03566 100.118065 78.77604 ]\n", 289 | "[169.62186 74.69254 84.71253]\n", 290 | "[ 556.8951 103.451866 -283.5607 ]\n", 291 | "[ 565.2538 106.88009 -276.08383]\n", 292 | "[193.24214 90.91891 71.68838]\n", 293 | "[196.3955 93.713585 71.543816]\n", 294 | "[ 567.3863 109.009514 -275.79883 ]\n", 295 | "[202.4682 57.518303 77.53694 ]\n", 296 | "[203.83173 72.96592 73.92348]\n", 297 | "[207.70656 87.03991 66.56958]\n", 298 | "[197.02205 69.62322 64.49829]\n", 299 | "[197.02205 69.62322 64.49829]\n", 300 | "[196.27872 67.954384 65.35837 ]\n", 301 | "[203.42162 73.175865 56.098335]\n", 302 | "[184.15958 72.899864 50.306953]\n", 303 | "[ 549.15186 102.50259 -243.64622]\n", 304 | "[205.66081 100.600235 43.125385]\n", 305 | "[205.03793 95.62387 41.286182]\n", 306 | "[200.92384 91.39072 46.52486]\n", 307 | "[185.86911 78.167305 44.598576]\n", 308 | "[187.38116 81.13076 43.498722]\n", 309 | "[239.74199 142.59874 34.849735]\n", 310 | "[236.81871 139.70761 35.859386]\n", 311 | "[231.63954 129.58983 39.60832]\n", 312 | "[202.88364 93.92218 45.753643]\n", 313 | "[ 533.2882 94.9613 -210.0297]\n", 314 | "[ 545.798 110.655365 -205.2863 ]\n", 315 | "[204.99075 51.458946 51.15505 ]\n", 316 | "[189.3691 16.20153 67.32401]\n", 317 | "[ 522.9523 92.65934 -197.80412]\n", 318 | "[175.19162 6.112846 74.22311 ]\n", 319 | "[161.81189 -20.219524 85.20315 ]\n", 320 | "[ 470.88162 34.058563 -131.66188 ]\n", 321 | "[ 485.58066 41.241486 -124.46548 ]\n", 322 | "[155.65395 -22.77841 87.02305]\n", 323 | "[ 457.42822 21.027582 -142.79536 ]\n", 324 | "[ 469.8484 26.680025 -135.25854 ]\n", 325 | "[ 499.36066 81.37578 -145.60446]\n", 326 | "[ 480.2307 38.944656 -107.76949 ]\n", 327 | "[150.36101 -1.609579 76.75874 ]\n", 328 | "[180.9644 45.48837 59.17133]\n", 329 | "[143.29701 -34.94965 103.63687]\n", 330 | "[116.63616 -56.796276 113.93884 ]\n", 331 | "[301.3774 377.2761 4.3709383]\n", 332 | "[536.2794 353.8533 -71.78847]\n", 333 | "[538.17456 335.26437 -81.621826]\n", 334 | "[318.74026 435.46088 3.6056418]\n", 335 | "[529.0613 351.1025 -63.752956]\n", 336 | "[137.29936 67.950584 71.84816 ]\n", 337 | "[136.01256 66.95638 64.622086]\n", 338 | "[137.0488 80.96667 61.159958]\n", 339 | "[138.15202 80.628136 67.33504 ]\n", 340 | "[138.17336 83.39921 65.290634]\n", 341 | "[ 467.1848 95.69976 -115.409805]\n", 342 | "[129.64178 47.064182 72.73848 ]\n", 343 | "[129.94351 69.352455 68.381165]\n", 344 | "[129.37946 7.2408957 88.3654 ]\n", 345 | "[119.88858 -31.398142 107.51578 ]\n", 346 | "[132.75067 52.367527 71.946625]\n", 347 | "[118.227486 35.518654 82.43362 ]\n", 348 | "[105.15378 23.777182 82.95545 ]\n", 349 | "[125.494576 72.245415 70.654945]\n", 350 | "[125.52036 69.59457 72.901344]\n", 351 | "[118.71075 85.340355 70.8985 ]\n", 352 | "[118.87763 71.28542 82.78143]\n", 353 | "[427.4965 78.238014 -56.07026 ]\n", 354 | "[422.8505 67.02882 -44.003754]\n", 355 | "[422.8505 67.02882 -44.003754]\n", 356 | "[423.98865 101.308556 -40.685287]\n", 357 | "[429.34552 87.46084 -38.61535]\n", 358 | "[110.94063 64.55822 79.36644]\n", 359 | "[104.245674 84.01972 79.442085]\n", 360 | "[106.58141 88.620384 85.52271 ]\n", 361 | "[399.96127 60.11768 -9.353766]\n", 362 | "[396.4506 56.915592 -9.2612295]\n", 363 | "[398.40067 62.948467 -6.047523]\n", 364 | "[388.98932 71.83164 0.9663679]\n", 365 | "[393.6952 40.910164 57.225838]\n", 366 | "[346.28867 5.295405 83.34376 ]\n", 367 | "[396.36786 82.15627 27.636168]\n", 368 | "[392.18912 72.08146 26.893972]\n", 369 | "[390.14868 89.22532 21.766798]\n", 370 | "[396.3883 82.14362 27.641874]\n", 371 | "[320.57614 -12.036209 79.91187 ]\n", 372 | "[77.49858 60.889633 98.310745]\n", 373 | "[372.46643 66.2789 21.924086]\n", 374 | "[420.5574 352.8607 106.93507]\n", 375 | "[98.15464 97.29024 95.97193]\n", 376 | "[90.75668 84.58478 98.81965]\n", 377 | "[362.05786 72.56663 41.940094]\n", 378 | "[341.93063 8.516252 94.29508 ]\n", 379 | "[298.19495 -16.506628 104.27652 ]\n", 380 | "[295.71298 -25.889727 119.57837 ]\n", 381 | "[289.35352 -31.750612 121.297714]\n", 382 | "[321.77267 38.63797 43.46441]\n", 383 | "[ 65.17316 47.655056 106.90837 ]\n", 384 | "[345.25873 67.06241 57.30996]\n", 385 | "[333.71716 8.223203 109.68011 ]\n", 386 | "[ 50.507668 -20.38804 130.35294 ]\n", 387 | "[332.39014 79.603935 67.474785]\n", 388 | "[341.8728 78.93423 74.95691]\n", 389 | "Ep:1| rew:140.4| eps:0.6| loss:4157.3794\n", 390 | "[317.8782 30.601358 75.05672 ]\n", 391 | "[331.14313 63.263824 91.74564 ]\n", 392 | "[315.41162 71.80917 99.55429]\n", 393 | "[ 58.184742 87.27157 102.51546 ]\n", 394 | "[318.89258 94.68315 100.39389]\n", 395 | "[324.45914 89.12391 104.82153]\n", 396 | "[322.34253 66.28559 107.104904]\n", 397 | "[ 29.059074 52.548252 101.73607 ]\n", 398 | "[310.64703 95.05583 109.33652]\n", 399 | "[ 50.31996 68.565 107.43178]\n", 400 | "[310.4237 60.831585 116.547554]\n", 401 | "[ 40.1035 55.85979 103.66984]\n", 402 | "[294.20453 40.9042 113.51484]\n", 403 | "[ 22.079933 37.281544 103.47819 ]\n", 404 | "[299.80878 78.10509 122.70319]\n", 405 | "[300.6297 79.55946 123.02323]\n", 406 | "[ 14.916663 29.64172 106.22752 ]\n", 407 | "[281.16815 88.271416 129.51768 ]\n", 408 | "[298.8216 46.822987 118.3388 ]\n", 409 | "[36.824055 73.07078 94.74727 ]\n", 410 | "[ 32.891186 56.966694 104.68589 ]\n", 411 | "[285.03345 89.30048 133.0469 ]\n", 412 | "[284.39258 74.62834 139.5064 ]\n", 413 | "[286.44443 93.30217 135.66138]\n", 414 | "[282.51193 65.93186 150.53493]\n", 415 | "[275.80566 64.775185 154.11731 ]\n", 416 | "[30.702042 80.5259 97.449486]\n", 417 | "[ 50.695423 104.76046 92.44488 ]\n", 418 | "[265.79776 89.09239 144.02045]\n", 419 | "[25.01453 67.214554 94.14382 ]\n", 420 | "[299.83075 154.11412 215.97655]\n", 421 | "[275.39053 121.656815 176.86394 ]\n", 422 | "[265.41946 121.019775 200.90923 ]\n", 423 | "[282.1456 135.7832 208.3326]\n", 424 | "[278.70953 148.3948 225.02708]\n", 425 | "[288.59848 180.0609 240.66577]\n", 426 | "[313.03333 185.80644 227.56947]\n", 427 | "[318.62518 128.75957 178.87003]\n", 428 | "[ 85.04235 186.91034 107.73857]\n", 429 | "[ 71.28197 150.61568 98.78657]\n", 430 | "[ 53.779037 96.662994 100.57081 ]\n", 431 | "[259.19153 94.77455 164.26343]\n", 432 | "[252.08331 105.665634 180.79303 ]\n", 433 | "[271.04227 119.96418 185.29813]\n", 434 | "[278.2547 109.2936 168.61731]\n", 435 | "[262.9808 91.6783 151.6686]\n", 436 | "[255.80951 77.552376 164.25073 ]\n", 437 | "[252.40114 65.68323 166.6288 ]\n", 438 | "[ 12.977097 17.008404 114.108635]\n", 439 | "[ -1.825528 6.4671907 113.716286 ]\n", 440 | "[250.759 102.94938 155.29796]\n", 441 | "[290.04446 156.42006 177.31354]\n", 442 | "[256.60385 123.67462 152.83235]\n", 443 | "[ 5.154691 29.25245 86.987175]\n", 444 | "[255.90407 77.17709 146.61621]\n", 445 | "[31.880926 57.44755 93.36819 ]\n", 446 | "[281.7698 127.88908 177.73389]\n", 447 | "[270.69632 104.107185 157.64955 ]\n", 448 | "[28.46925 80.25911 81.291176]\n", 449 | "[266.00497 146.81825 165.27213]\n", 450 | "[267.76617 156.33015 159.93285]\n", 451 | "[287.83603 139.77396 131.82655]\n", 452 | "[255.76018 113.80565 132.15952]\n", 453 | "[-9.719006 35.735264 75.53454 ]\n", 454 | "[251.86884 123.980034 143.62296 ]\n", 455 | "[45.17444 97.42794 73.85728]\n", 456 | "[258.63885 112.42694 124.01807]\n", 457 | "[ 53.04297 121.531136 77.3036 ]\n", 458 | "[257.79248 108.52464 124.49412]\n", 459 | "[224.63478 150.9832 183.68674]\n", 460 | "[323.63684 158.8475 125.4439 ]\n", 461 | "[257.701 97.07946 122.46201]\n", 462 | "[-11.491713 -3.5293686 91.01769 ]\n", 463 | "[-19.573433 86.27854 77.2459 ]\n", 464 | "[259.85706 95.93407 119.09911]\n", 465 | "[254.01083 101.70111 109.15774]\n", 466 | "[244.61305 129.28012 143.10803]\n", 467 | "[288.39032 131.4193 114.99246]\n", 468 | "[-15.731352 20.944393 69.731094]\n", 469 | "[231.29037 156.46284 168.26714]\n", 470 | "[327.16635 162.41281 115.62874]\n", 471 | "[290.6737 134.92113 109.61838]\n", 472 | "[261.3784 109.21189 110.57933]\n", 473 | "[252.86583 81.30908 98.055534]\n", 474 | "[258.00092 90.8656 103.19543]\n", 475 | "[258.74655 75.10728 109.55379]\n", 476 | "[281.9165 125.376595 121.70882 ]\n", 477 | "[264.43457 96.49518 103.54538]\n", 478 | "[259.06213 93.27538 101.9422 ]\n", 479 | "[261.96735 95.01753 104.0211 ]\n", 480 | "[-5.6869373 6.655792 76.94902 ]\n", 481 | "[-9.455575 -6.317932 79.56331 ]\n", 482 | "[262.81964 76.02961 104.94103]\n", 483 | "[263.34357 90.20562 99.928825]\n", 484 | "[262.5974 91.90153 98.09882]\n", 485 | "[263.15115 75.95295 104.31352]\n", 486 | "[251.52089 78.92811 108.61025]\n", 487 | "[243.04059 134.3636 176.76126]\n", 488 | "[238.33934 133.41447 178.24799]\n", 489 | "[ 5.5882525 29.886732 53.951763 ]\n", 490 | "[257.5432 80.624 86.48252]\n", 491 | "[257.1303 95.39306 103.560616]\n", 492 | "[275.72278 93.49186 92.14928]\n", 493 | "[-15.729152 19.888363 67.96825 ]\n", 494 | "[-14.10059 -4.14539 77.03566]\n", 495 | "[263.94217 98.29142 87.38959]\n", 496 | "[-12.507995 -16.650871 84.806885]\n", 497 | "[255.96257 57.996475 87.94457 ]\n", 498 | "[254.0596 58.328262 88.493675]\n", 499 | "[255.711 59.021706 89.31393 ]\n" 500 | ] 501 | }, 502 | { 503 | "name": "stdout", 504 | "output_type": "stream", 505 | "text": [ 506 | "[254.6904 54.253014 88.00538 ]\n", 507 | "[253.39085 50.5067 86.51295]\n", 508 | "[253.60275 50.45137 86.54161]\n", 509 | "[253.38026 50.454197 86.591255]\n", 510 | "[252.59874 30.956013 92.03665 ]\n", 511 | "[251.4352 76.73456 73.62871]\n", 512 | "[-14.528659 2.5096235 72.98269 ]\n", 513 | "[260.12448 77.06353 89.979065]\n", 514 | "[260.53824 61.2372 96.483284]\n", 515 | "[255.41614 54.857117 90.296776]\n", 516 | "[-3.45246 4.21754 73.1177 ]\n", 517 | "[-9.077881 -6.3254876 77.55094 ]\n", 518 | "[17.777374 25.895414 70.792366]\n", 519 | "[265.43112 86.872925 108.45012 ]\n", 520 | "[267.9401 76.54962 111.161545]\n", 521 | "[268.60385 93.3721 106.31654]\n", 522 | "[267.9597 76.53725 111.174805]\n", 523 | "[268.96478 74.05029 112.7617 ]\n", 524 | "[265.1487 50.789967 119.75941 ]\n", 525 | "[256.43588 55.9754 135.51741]\n", 526 | "[275.43387 101.8947 132.35594]\n", 527 | "[281.0382 98.053825 132.88855 ]\n", 528 | "[277.89505 91.563286 135.07718 ]\n", 529 | "[278.60428 85.5704 134.6689 ]\n", 530 | "[274.8786 77.92897 137.27818]\n", 531 | "[36.002808 59.46593 62.664787]\n", 532 | "[278.59756 85.56617 134.73808]\n", 533 | "[35.91596 71.47973 55.440758]\n", 534 | "[288.62778 93.43184 111.60275]\n", 535 | "[272.04343 78.09026 103.43657]\n", 536 | "[25.188375 46.93717 53.91328 ]\n", 537 | "[277.3222 109.42447 112.2332 ]\n", 538 | "[281.1995 123.54036 118.42995]\n", 539 | "[307.6731 185.89316 168.36668]\n", 540 | "[320.04388 205.27803 167.01486]\n", 541 | "[319.9858 184.33368 174.21068]\n", 542 | "[316.86176 181.24341 175.31429]\n", 543 | "[344.6925 120.95454 108.96815]\n", 544 | "[263.49506 59.839436 86.96435 ]\n", 545 | "[265.833 78.61644 90.88592]\n", 546 | "[266.53275 49.506767 97.30295 ]\n", 547 | "[ 8.8477545 11.8449335 64.23996 ]\n", 548 | "[266.5524 49.4942 97.316376]\n", 549 | "[264.65817 42.10051 93.79575]\n", 550 | "[234.18703 86.97114 159.22821]\n", 551 | "[327.04358 122.80911 155.50285]\n", 552 | "[265.03 93.51531 126.82123]\n", 553 | "[54.612865 98.30972 56.00152 ]\n", 554 | "[ 4.002483 11.564618 66.15533 ]\n", 555 | "[264.93845 83.673325 92.55058 ]\n", 556 | "[277.64633 93.29986 93.380974]\n", 557 | "[276.01788 62.737053 102.45949 ]\n", 558 | "[269.67197 30.621038 109.43058 ]\n", 559 | "[264.07346 24.993399 114.97877 ]\n", 560 | "[266.94806 37.923252 104.70366 ]\n", 561 | "[269.94354 46.232845 104.881325]\n", 562 | "[265.48685 58.028473 119.9254 ]\n", 563 | "[271.26447 44.61424 102.97724]\n", 564 | "[259.3167 26.106363 77.88067 ]\n", 565 | "[261.68173 27.46985 79.798836]\n", 566 | "[ 8.118454 -33.214825 109.01425 ]\n", 567 | "[251.17441 10.149805 95.80719 ]\n", 568 | "[ 9.869963 -5.821394 80.08116 ]\n", 569 | "[265.28967 33.018246 83.97155 ]\n", 570 | "[261.87674 42.477394 73.452675]\n", 571 | "[264.8594 28.135796 83.93607 ]\n", 572 | "[265.03568 31.149612 82.894966]\n", 573 | "[261.8973 42.46769 73.457504]\n", 574 | "[265.829 47.975807 77.16321 ]\n", 575 | "[265.0514 31.137688 82.89224 ]\n", 576 | "[ 6.0625715 -18.855637 82.08858 ]\n", 577 | "Ep:2| rew:143.0| eps:0.41| loss:2302.0525\n", 578 | "[ 6.5104117 -3.4272273 74.53071 ]\n", 579 | "[249.34016 76.58159 119.02543]\n", 580 | "[272.752 66.38454 95.92028]\n", 581 | "[279.89645 60.171383 84.4363 ]\n", 582 | "[278.81448 115.55107 150.55946]\n", 583 | "[314.00238 150.4754 162.81555]\n", 584 | "[317.0599 153.64853 162.00386]\n", 585 | "[317.30634 149.33867 160.31378]\n", 586 | "[318.2328 137.20041 151.64218]\n", 587 | "[283.04913 80.075645 104.35613 ]\n", 588 | "[293.58893 99.01755 120.79454]\n", 589 | "[292.336 94.54322 114.24743]\n", 590 | "[290.00446 90.404 110.691574]\n", 591 | "[290.31876 81.22499 99.6156 ]\n", 592 | "[283.7318 56.68096 80.10937]\n", 593 | "[-4.0842104 21.9667 67.59259 ]\n", 594 | "[292.42914 77.149376 92.7206 ]\n", 595 | "[273.57007 47.590405 92.9662 ]\n", 596 | "[265.22635 52.045895 110.976555]\n", 597 | "[277.9728 75.65721 131.60484]\n", 598 | "[294.7054 71.762886 141.59708 ]\n", 599 | "[287.57883 52.336834 154.38135 ]\n", 600 | "[296.83203 105.216385 131.35904 ]\n", 601 | "[302.80334 125.35212 122.54724]\n", 602 | "[305.5792 130.8651 120.42735]\n", 603 | "[301.94528 111.84304 126.504715]\n", 604 | "[298.61966 105.521095 128.78241 ]\n", 605 | "[306.85355 101.02834 110.78656]\n", 606 | "[289.05664 88.19388 105.905365]\n", 607 | "[293.97195 77.39126 90.17173]\n", 608 | "[276.17346 64.55134 85.29852]\n", 609 | "[277.51285 65.14508 83.19515]\n", 610 | "[278.4298 78.85101 78.97969]\n", 611 | "[280.24432 70.31545 81.32488]\n", 612 | "[27.041388 29.752567 71.759285]\n", 613 | "[278.46155 78.84257 78.94016]\n", 614 | "[280.0304 67.28517 82.2335 ]\n", 615 | "[276.68668 61.01191 84.48793]\n", 616 | "[282.54715 70.46645 77.57046]\n", 617 | "[278.54166 48.590096 84.682785]\n", 618 | "[265.8489 64.038155 118.30788 ]\n", 619 | "[307.4251 72.63557 103.58488]\n", 620 | "[276.4137 59.037582 81.7941 ]\n", 621 | "[282.52805 70.4583 77.63408]\n", 622 | "[278.45758 47.530766 82.08106 ]\n", 623 | "[265.92947 63.008156 115.652954]\n", 624 | "[24.102493 22.243784 63.43583 ]\n", 625 | "[279.03046 75.482765 70.3121 ]\n", 626 | "[281.63647 68.123344 72.722115]\n", 627 | "[277.1808 46.150757 79.41731 ]\n", 628 | "[22.64434 24.492014 60.105385]\n", 629 | "[272.14493 42.23828 85.17128]\n", 630 | "[275.13318 56.62782 76.52645]\n", 631 | "[279.63312 76.56539 69.959595]\n", 632 | "[280.3715 68.278175 71.57036 ]\n", 633 | "[26.719582 29.357985 70.818665]\n", 634 | "[278.1823 76.62662 68.389404]\n", 635 | "[280.12808 65.263535 72.547806]\n", 636 | "[275.3505 60.780724 76.82279 ]\n", 637 | "[23.40106 34.03787 61.53687]\n", 638 | "[277.9825 50.514675 81.594666]\n", 639 | "[25.666784 34.54594 56.935966]\n", 640 | "[275.7169 50.600735 80.420845]\n", 641 | "[273.83237 60.950928 77.19449 ]\n", 642 | "[26.22359 21.201517 67.26153 ]\n", 643 | "[21.926958 16.423756 68.324394]\n", 644 | "[264.79147 40.42326 79.378456]\n", 645 | "[-6.306453 25.292133 68.601524]\n", 646 | "[282.4939 72.98358 53.647236]\n", 647 | "[268.25867 49.195393 58.049343]\n", 648 | "[264.67978 57.961994 48.23666 ]\n", 649 | "[268.25867 49.195393 58.049343]\n", 650 | "[264.67978 57.961994 48.23666 ]\n", 651 | "[262.13678 72.21993 65.6499 ]\n", 652 | "[280.04504 73.01586 53.65505]\n", 653 | "[265.79767 49.256966 58.02196 ]\n", 654 | "[255.53714 33.437973 67.75811 ]\n", 655 | "[248.04163 34.114746 71.55114 ]\n", 656 | "[266.4516 57.02435 73.26678]\n", 657 | "[17.111729 33.081596 63.308796]\n", 658 | "[267.13354 48.4153 79.13394]\n", 659 | "[261.79086 44.974236 85.50157 ]\n", 660 | "[264.32166 58.75197 74.045204]\n", 661 | "[269.26517 78.503105 67.18258 ]\n", 662 | "[17.064373 32.227455 64.896355]\n", 663 | "[20.808723 45.517204 51.421715]\n", 664 | "[273.1041 83.93415 66.45136]\n", 665 | "[273.10422 83.93655 66.45202]\n", 666 | "[271.58316 67.33352 72.01961]\n", 667 | "[266.9896 60.752792 72.92594 ]\n", 668 | "[266.3202 79.74838 67.95644]\n", 669 | "[270.79025 86.2012 66.77058]\n", 670 | "[21.16712 34.91063 62.051353]\n", 671 | "[266.3202 79.74838 67.95644]\n", 672 | "[275.13586 77.682785 55.503227]\n", 673 | "[262.031 54.830444 59.990005]\n", 674 | "[ 6.603746 8.917269 86.03101 ]\n", 675 | "[256.6933 52.548344 93.26213 ]\n", 676 | "[260.96832 63.06996 80.81763]\n", 677 | "[25.295818 33.294277 71.121895]\n", 678 | "[251.9924 72.563896 115.88025 ]\n", 679 | "[290.04266 83.44699 105.43264]\n", 680 | "[20.213484 49.506542 52.588047]\n", 681 | "[264.06204 81.42509 69.11808]\n", 682 | "[20.904072 58.628597 55.64739 ]\n", 683 | "[266.51202 76.49921 76.606186]\n", 684 | "[264.6018 87.212685 73.57678 ]\n", 685 | "[264.86514 62.824474 81.1898 ]\n", 686 | "[259.9321 68.705666 80.17248 ]\n", 687 | "[260.86334 59.574936 85.522156]\n", 688 | "[25.07512 48.654217 61.676746]\n", 689 | "[260.63617 59.565506 85.5604 ]\n", 690 | "[257.67508 70.30066 82.92522]\n", 691 | "[261.5118 76.23692 80.330414]\n", 692 | "[257.69376 70.288025 82.93914 ]\n", 693 | "[258.5178 61.20359 88.380104]\n", 694 | "[257.74103 70.32361 82.89102]\n", 695 | "[258.50998 61.19218 88.39663]\n", 696 | "[261.44592 76.21387 80.36457]\n", 697 | "[258.53293 61.226383 88.34724 ]\n", 698 | "[256.0599 71.79562 85.24803]\n", 699 | "[256.7982 62.940228 91.09763 ]\n", 700 | "[256.05243 71.783424 85.263466]\n", 701 | "[259.9372 77.688034 82.62014 ]\n", 702 | "[29.06801 57.906876 76.50247 ]\n", 703 | "[259.95563 77.675354 82.6342 ]\n", 704 | "[256.826 62.9306 91.14737]\n", 705 | "[256.0893 71.75842 85.2911 ]\n", 706 | "[259.97415 77.66283 82.647896]\n", 707 | "[249.20515 60.87747 101.86129]\n", 708 | "[251.62453 68.30054 85.40304]\n", 709 | "[24.762775 54.340137 88.90576 ]\n", 710 | "[265.0235 92.41333 106.068214]\n", 711 | "[270.5622 111.96577 98.615005]\n", 712 | "[272.12677 103.13391 101.113846]\n", 713 | "[260.40002 72.5336 113.151344]\n", 714 | "[249.54497 68.7816 91.45205]\n", 715 | "[255.21489 88.30178 83.87032]\n", 716 | "[252.39496 70.60288 90.20547]\n", 717 | "[254.51344 87.28664 84.296844]\n", 718 | "[256.76266 79.46843 86.33543]\n", 719 | "[249.90869 60.62824 98.25245]\n", 720 | "[23.219519 50.994137 81.540245]\n", 721 | "[247.8642 60.86493 102.89571]\n", 722 | "[247.36023 69.308624 96.3763 ]\n", 723 | "[266.47287 112.95235 109.763115]\n", 724 | "[269.1341 119.66675 110.08834]\n", 725 | "[256.37927 93.53662 86.42629]\n", 726 | "[255.74652 95.47149 89.08454]\n", 727 | "[256.47583 81.01695 95.89951]\n", 728 | "[251.63171 67.24893 90.485214]\n", 729 | "[233.06474 63.398342 93.16766 ]\n", 730 | "[ 44.89811 102.70718 70.48539]\n", 731 | "[271.19916 106.25724 94.11756]\n", 732 | "[254.10661 93.332695 88.85009 ]\n", 733 | "[19.654427 59.95026 75.1424 ]\n", 734 | "[256.90103 84.112724 75.87928 ]\n", 735 | "[238.3944 55.892937 79.757645]\n", 736 | "[231.6814 60.649044 92.7468 ]\n", 737 | "[247.69762 86.85561 94.2939 ]\n", 738 | "[251.1788 94.553024 94.0669 ]\n", 739 | "[251.75668 80.1075 101.022446]\n", 740 | "[248.06734 77.3343 102.85698]\n", 741 | "[254.44417 72.28967 91.45578]\n", 742 | "[234.28407 70.13552 99.956696]\n", 743 | "[248.81189 90.07392 116.519936]\n", 744 | "[256.6274 96.54313 128.39685]\n", 745 | "[258.3838 85.63457 131.57614]\n", 746 | "[254.74399 73.80078 125.99757]\n", 747 | "[240.82678 67.94233 103.217026]\n", 748 | "[241.53072 59.029667 109.19991 ]\n", 749 | "[230.33093 45.634403 131.02434 ]\n", 750 | "[ 70.17152 134.58524 103.511055]\n", 751 | "[268.78873 88.79364 138.29915]\n", 752 | "[237.18687 54.070232 114.65526 ]\n", 753 | "[222.14577 42.07242 101.24097]\n", 754 | "[223.6107 42.181366 106.91405 ]\n", 755 | "[228.38474 52.52209 92.025764]\n", 756 | "[233.78699 57.195133 88.13814 ]\n", 757 | "[229.66753 45.55811 101.19765]\n", 758 | "[224.40675 48.737606 111.04463 ]\n", 759 | "[ 15.076268 2.2367394 118.274345 ]\n", 760 | "[219.53639 43.00142 110.70887]\n", 761 | "[234.64487 50.865482 119.14933 ]\n", 762 | "[225.43869 48.940056 88.27348 ]\n", 763 | "[224.33154 70.36298 114.33846]\n", 764 | "[257.44324 109.551056 121.17849 ]\n", 765 | "[259.6152 101.62382 123.26238]\n", 766 | "[ 48.294582 52.61296 106.553795]\n", 767 | "[218.12767 36.086464 99.08629 ]\n", 768 | "[215.43091 47.968872 117.628456]\n", 769 | "[ 11.481844 -1.1763763 108.1576 ]\n", 770 | "[217.94446 49.501007 119.93508 ]\n", 771 | "[249.47295 86.44665 130.00203]\n", 772 | "[254.3872 95.09812 125.82587]\n", 773 | "[252.4376 79.42768 131.64897]\n", 774 | "[250.83113 90.38055 128.41238]\n", 775 | "[251.7908 107.44264 141.7686 ]\n", 776 | "[275.3378 97.55618 114.62099]\n", 777 | "[243.90121 63.129295 90.88929 ]\n", 778 | "[241.2849 71.77314 103.29231]\n", 779 | "[241.38527 71.89323 103.1332 ]\n", 780 | "[236.94029 56.154892 110.892456]\n", 781 | "[23.431185 43.37937 78.40651 ]\n", 782 | "[236.96211 56.15052 110.905914]\n", 783 | "[236.07323 65.64022 105.545586]\n", 784 | "[24.33759 31.217062 89.44026 ]\n", 785 | "[238.74463 70.00011 109.53902]\n", 786 | "[ 32.30333 29.743937 104.73167 ]\n", 787 | "[218.73213 40.767998 100.256485]\n", 788 | "[220.84818 47.3728 110.2285 ]\n", 789 | "[236.07893 59.97478 122.41912]\n", 790 | "[233.56682 56.713875 119.75613 ]\n", 791 | "[230.70187 54.060787 118.24959 ]\n", 792 | "[19.578619 45.606956 82.538185]\n", 793 | "[26.948751 49.084934 87.431946]\n", 794 | "[239.44734 73.77984 100.98775]\n", 795 | "[235.91449 58.704704 109.529755]\n", 796 | "[230.27133 56.85563 117.97356]\n", 797 | "[237.72615 72.59089 108.108734]\n", 798 | "[238.8452 62.241962 112.55827 ]\n", 799 | "[238.8452 62.241962 112.55827 ]\n", 800 | "[26.6571 50.609318 94.15848 ]\n", 801 | "[242.04813 88.93523 148.46982]\n", 802 | "[261.7947 118.4675 147.81425]\n", 803 | "[266.23242 123.99718 144.71216]\n", 804 | "[263.28738 107.42122 151.1485 ]\n", 805 | "[261.04166 92.45592 140.52315]\n", 806 | "[245.2967 72.555786 124.636375]\n", 807 | "[234.25598 69.443245 102.944466]\n", 808 | "[235.61382 86.493454 116.54491 ]\n", 809 | "[255.4604 87.9547 105.59448]\n", 810 | "[238.64246 74.9686 99.853096]\n", 811 | "[233.67368 87.760635 116.19262 ]\n", 812 | "[253.43134 89.21167 105.2065 ]\n", 813 | "[236.64862 76.216156 99.42305 ]\n", 814 | "[236.64891 76.21735 99.410355]\n", 815 | "[233.67484 87.76636 116.18458]\n", 816 | "[13.782761 60.265125 81.43101 ]\n", 817 | "[244.51254 123.87533 155.46188]\n", 818 | "[ 0.6686248 89.71242 101.418976 ]\n", 819 | "[266.70602 102.58952 112.175705]\n", 820 | "[224.4139 111.267715 151.06036 ]\n", 821 | "[249.97128 89.58321 106.35937]\n", 822 | "[230.29538 88.13898 117.3808 ]\n", 823 | "[249.97128 89.58321 106.35937]\n", 824 | "[230.29538 88.13898 117.3808 ]\n", 825 | "[246.98135 101.15256 123.19187]\n", 826 | "[35.442726 69.93221 75.71521 ]\n", 827 | "[229.82562 76.35205 101.799126]\n", 828 | "[ 3.1900997 93.80489 101.79544 ]\n", 829 | "[263.85263 183.64832 197.69875]\n", 830 | "[229.74625 76.329994 101.84824 ]\n", 831 | "[229.76958 76.36599 101.80087]\n", 832 | "[231.87444 66.84656 87.95555]\n", 833 | "[210.8089 64.68138 93.117065]\n", 834 | "[225.9564 78.10927 105.85892]\n", 835 | "[229.47365 78.366516 103.86476 ]\n" 836 | ] 837 | }, 838 | { 839 | "name": "stdout", 840 | "output_type": "stream", 841 | "text": [ 842 | "[228.62358 66.439026 88.75077 ]\n", 843 | "[202.23755 99.36177 144.527 ]\n", 844 | "[275.87985 116.45301 122.58691]\n", 845 | "[228.8069 89.49863 97.59774]\n", 846 | "[232.60861 94.06134 94.80891]\n", 847 | "[229.94888 80.54634 100.16698]\n", 848 | "[222.51443 60.971092 111.20059 ]\n", 849 | "[218.43387 69.95559 106.94289]\n", 850 | "[222.52246 77.41473 106.7881 ]\n", 851 | "[225.02902 81.72599 110.73679]\n", 852 | "[211.00168 53.006523 78.1652 ]\n", 853 | "[205.29822 42.13102 93.35785]\n", 854 | "[205.22786 51.040707 79.50608 ]\n", 855 | "[209.97437 65.6941 96.43353]\n", 856 | "[207.9646 39.681778 143.30739 ]\n", 857 | "[189.03897 28.712357 152.94472 ]\n", 858 | "[169.11957 6.4829907 151.53532 ]\n", 859 | "[169.80067 15.825482 138.82959 ]\n", 860 | "[187.10005 26.668133 156.41757 ]\n", 861 | "[167.18042 4.4387326 155.00829 ]\n", 862 | "[161.77673 8.155343 165.96024 ]\n", 863 | "[176.31168 15.28251 175.84985]\n", 864 | "[167.86525 13.787423 142.2719 ]\n", 865 | "[189.63516 47.497566 87.19655 ]\n", 866 | "[201.41112 41.087883 94.75552 ]\n", 867 | "[193.87358 37.436844 98.8269 ]\n", 868 | "[198.70192 47.60973 83.31452]\n", 869 | "[204.63606 49.5839 82.091385]\n", 870 | "[203.04759 59.41087 96.225685]\n", 871 | "[-2.7702136 23.215849 82.09315 ]\n", 872 | "[211.4581 80.25209 91.98188]\n", 873 | "Ep:3| rew:94.6| eps:0.21| loss:1263.2747\n", 874 | "[204.82643 50.97742 77.93737]\n", 875 | "[200.3048 57.798588 92.97624 ]\n", 876 | "[206.72585 63.85732 71.64858]\n", 877 | "[212.05942 55.729046 82.220665]\n", 878 | "[199.56395 41.81413 93.000114]\n", 879 | "[198.63988 50.25613 77.51064]\n", 880 | "[192.76295 40.668423 95.10198 ]\n", 881 | "[195.25844 41.909653 96.70205 ]\n", 882 | "[192.46802 44.63397 101.37538]\n", 883 | "[207.03664 51.96284 110.57355]\n", 884 | "[192.49214 44.724747 101.24012 ]\n", 885 | "[200.74599 86.280495 161.52179 ]\n", 886 | "[254.30934 97.22798 137.72232]\n", 887 | "[190.86368 44.75351 100.53703]\n", 888 | "[210.70245 67.59538 102.40314]\n", 889 | "[218.09248 86.340096 93.67195 ]\n", 890 | "[219.50009 77.407036 96.81047 ]\n", 891 | "[205.02211 57.90733 118.61192]\n", 892 | "[206.68004 58.65044 122.98028]\n", 893 | "[205.70071 57.399883 123.038185]\n", 894 | "[192.5908 48.005566 81.44325 ]\n", 895 | "[200.52803 51.688 77.69502]\n", 896 | "[196.02315 41.702877 93.96883 ]\n", 897 | "[188.50854 44.49986 102.01802]\n", 898 | "[202.6743 56.701653 118.79345 ]\n", 899 | "[202.99536 52.28789 111.93315]\n", 900 | "[189.79814 45.606663 103.493835]\n", 901 | "[203.00113 52.29483 111.88288]\n", 902 | "[183.0475 76.77087 150.77394]\n", 903 | "[ 11.554048 77.188545 107.666466]\n", 904 | "[247.81384 115.37118 169.05315]\n", 905 | "[233.94283 82.97874 133.19882]\n", 906 | "[187.86945 45.281822 105.403854]\n", 907 | "[185.39615 27.326593 169.78915 ]\n", 908 | "[163.96841 13.624856 199.0361 ]\n", 909 | "[187.65468 64.152275 120.884445]\n", 910 | "[208.04248 59.68793 115.06744]\n", 911 | "[196.61122 47.355137 138.3805 ]\n", 912 | "[185.5909 35.819553 159.43465 ]\n", 913 | "[173.04951 24.895218 183.74954 ]\n", 914 | "[167.99234 24.100044 187.27957 ]\n", 915 | "[167.99696 24.106777 187.24478 ]\n", 916 | "[167.61029 28.975777 195.25522 ]\n", 917 | "[182.08595 36.131706 205.33371 ]\n", 918 | "[182.08595 36.131706 205.33371 ]\n", 919 | "[167.99234 24.100044 187.27957 ]\n", 920 | "[167.61029 28.975777 195.25522 ]\n", 921 | "[185.83986 51.738827 201.83287 ]\n", 922 | "[193.08469 56.45487 190.79436]\n", 923 | "[198.77235 64.141136 177.34929 ]\n", 924 | "[39.54183 85.78981 88.40987]\n", 925 | "[197.39458 39.773815 204.97148 ]\n", 926 | "[174.97229 40.75231 221.90945]\n", 927 | "[202.67036 82.34892 152.34544]\n", 928 | "[221.50836 97.47659 140.88742]\n", 929 | "[40.92707 85.4086 93.05284]\n", 930 | "[218.99559 99.61725 142.70042]\n", 931 | "[219.43918 102.634155 145.31857 ]\n", 932 | "[223.1151 102.714386 143.07161 ]\n", 933 | "[219.71973 102.58366 145.27913]\n", 934 | "[227.05669 83.29698 113.31597]\n", 935 | "[39.085857 82.45445 87.96947 ]\n", 936 | "[216.6754 103.416336 147.19127 ]\n", 937 | "[219.53864 105.91724 148.46071]\n", 938 | "[219.63715 106.024185 148.3158 ]\n", 939 | "[215.85646 89.73538 155.23128]\n", 940 | "[214.68575 101.01698 151.62364]\n", 941 | "[219.65366 106.011185 148.33052 ]\n", 942 | "[215.87285 89.72232 155.2458 ]\n", 943 | "[214.7022 101.00401 151.63838]\n", 944 | "[219.67012 105.99826 148.34512]\n", 945 | "[215.88927 89.70932 155.26056]\n", 946 | "[213.83818 101.60824 151.05777]\n", 947 | "[218.84193 106.56027 147.76956]\n", 948 | "[214.99658 90.29563 154.70592]\n", 949 | "[207.71329 97.105675 175.97256 ]\n", 950 | "[227.76375 126.48858 175.71748]\n", 951 | "[232.76733 131.44058 172.42934]\n", 952 | "[228.92209 115.17599 179.36546]\n", 953 | "[227.78012 126.47561 175.7322 ]\n", 954 | "[232.78375 131.42747 172.4439 ]\n", 955 | "[228.93846 115.16294 179.3802 ]\n", 956 | "[232.95602 131.98634 169.50093]\n", 957 | "[237.78749 106.11015 130.11684]\n", 958 | "[198.10153 62.164486 124.17211 ]\n", 959 | "[197.29955 72.3684 118.87131]\n", 960 | "[202.1287 77.28701 115.61755]\n", 961 | "[202.211 77.369896 115.504875]\n", 962 | "[198.0166 62.194847 124.014435]\n", 963 | "[29.135729 50.523945 87.71625 ]\n", 964 | "[203.37492 78.31514 112.45867]\n", 965 | "[25.935774 36.912663 90.78014 ]\n", 966 | "[200.60318 77.428635 119.67512 ]\n", 967 | "[205.64748 82.30079 116.43396]\n", 968 | "[201.47412 66.91879 124.61542]\n", 969 | "[200.61954 77.41557 119.68968]\n", 970 | "[205.6638 82.28773 116.44868]\n", 971 | "[201.48842 66.913864 124.641594]\n", 972 | "[200.63597 77.40272 119.704216]\n", 973 | "[201.6034 78.63195 116.19203]\n", 974 | "[206.67389 83.46627 112.96681]\n", 975 | "[202.26678 68.83119 122.22981]\n", 976 | "[196.50845 66.13736 128.53789]\n", 977 | "[199.38069 74.6677 112.070694]\n", 978 | "[23.945301 44.005642 74.09715 ]\n", 979 | "[199.45102 65.62188 119.301796]\n", 980 | "[24.573488 44.982933 71.75715 ]\n", 981 | "[198.234 66.35003 118.106834]\n", 982 | "[197.72144 75.65218 111.29933]\n", 983 | "[202.82948 80.446045 108.10028 ]\n", 984 | "[198.24846 66.34507 118.13304]\n", 985 | "[202.84593 80.43328 108.114746]\n", 986 | "[198.26266 66.340034 118.15927 ]\n", 987 | "[197.75746 75.63227 111.31137]\n", 988 | "[26.040232 34.16597 84.98819 ]\n", 989 | "[32.28109 53.91371 81.51749]\n", 990 | "[201.84145 81.02207 107.396385]\n", 991 | "[201.90735 81.08059 107.31596]\n", 992 | "[197.25725 67.12634 117.554565]\n", 993 | "[191.44698 65.34596 125.12121]\n", 994 | "[196.79497 76.361496 110.39434 ]\n", 995 | "[201.93318 81.10426 107.244 ]\n", 996 | "[196.9712 67.72268 115.04758]\n", 997 | "[196.55164 76.78126 107.612656]\n", 998 | "[201.70679 81.46429 104.54854]\n", 999 | "[196.98558 67.71763 115.07389]\n", 1000 | "[196.56966 76.77132 107.618385]\n", 1001 | "[201.72299 81.45141 104.562874]\n", 1002 | "[33.70201 45.57324 91.96233]\n", 1003 | "[199.99724 71.55202 118.700935]\n", 1004 | "[200.90706 82.69021 109.084465]\n", 1005 | "[37.084827 62.497658 76.496315]\n", 1006 | "[11.700566 23.357796 84.57038 ]\n", 1007 | "[188.4402 86.9838 113.756615]\n", 1008 | "[220.53384 112.736275 130.89996 ]\n", 1009 | "[220.53384 112.736275 130.89996 ]\n", 1010 | "[222.40375 98.421196 109.247696]\n", 1011 | "[206.58894 95.6481 95.61626]\n", 1012 | "[212.01619 99.88001 90.5916 ]\n", 1013 | "[208.50046 86.86395 96.231674]\n", 1014 | "[204.53311 83.11072 98.72004]\n", 1015 | "[204.45898 83.00381 98.86074]\n", 1016 | "[203.02003 95.07504 117.07997]\n", 1017 | "[218.37236 105.32149 125.10723]\n", 1018 | "[218.2014 107.494 124.37544]\n", 1019 | "[214.55411 91.00464 131.31836]\n", 1020 | "[207.49055 86.16101 140.83481]\n", 1021 | "[46.02243 82.80704 74.38348]\n", 1022 | "[224.07869 123.12538 115.08579]\n", 1023 | "[227.59402 152.66618 148.0856 ]\n", 1024 | "[262.5379 155.06891 125.23905]\n", 1025 | "[225.98672 112.64817 118.35038]\n", 1026 | "[225.03471 123.95644 114.55927]\n", 1027 | "[221.81416 96.56167 125.32251]\n", 1028 | "[205.45813 79.567825 151.13098 ]\n", 1029 | "[199.72162 72.75153 150.54716]\n", 1030 | "[184.68033 58.79676 137.0865 ]\n", 1031 | "[ 60.88225 65.432945 111.4678 ]\n", 1032 | "[ 60.875725 65.417946 111.467445]\n", 1033 | "[183.77322 57.71178 137.35349]\n", 1034 | "[183.78468 56.18147 134.81416]\n", 1035 | "[190.92908 72.41874 95.368324]\n", 1036 | "[199.90416 83.10519 102.64395]\n", 1037 | "[213.1952 90.08036 102.66148]\n", 1038 | "[208.83965 78.065834 88.19001 ]\n", 1039 | "[196.36996 64.146225 76.59188 ]\n", 1040 | "[196.11522 64.71104 77.13334]\n", 1041 | "[195.76405 64.38819 76.63564]\n", 1042 | "[195.76405 64.38819 76.63564]\n", 1043 | "[195.76405 64.38819 76.63564]\n", 1044 | "[195.949 63.772488 75.72017 ]\n", 1045 | "[194.27673 62.227352 73.587875]\n", 1046 | "[194.27673 62.227352 73.587875]\n", 1047 | "[195.40186 62.471848 73.76857 ]\n", 1048 | "[194.27016 60.551704 76.93209 ]\n", 1049 | "[190.92282 66.317 85.68863]\n", 1050 | "[205.14934 71.91932 89.96564]\n", 1051 | "[193.78146 62.055252 73.568184]\n", 1052 | "[195.39601 62.405487 73.78314 ]\n", 1053 | "[195.25793 62.332237 73.719765]\n", 1054 | "[183.45096 42.2828 106.84617]\n", 1055 | "[196.07027 61.55689 73.95791]\n", 1056 | "[193.99475 69.16907 85.135994]\n", 1057 | "[207.86284 73.04304 85.63378]\n", 1058 | "[196.05785 61.542072 74.01112 ]\n", 1059 | "[196.05785 61.542072 74.01112 ]\n", 1060 | "[196.05785 61.542072 74.01112 ]\n", 1061 | "[196.05785 61.542072 74.01112 ]\n", 1062 | "[197.30988 64.394005 69.74942 ]\n", 1063 | "[199.82698 67.964905 68.36287 ]\n", 1064 | "[202.09204 71.79717 72.541534]\n", 1065 | "[205.52306 73.0478 75.87481]\n", 1066 | "[191.44795 45.907032 114.23916 ]\n", 1067 | "[176.0089 42.487614 116.112854]\n", 1068 | "[172.16196 44.110035 119.289536]\n", 1069 | "[185.98756 56.08967 137.49724]\n", 1070 | "[186.02039 51.085224 129.1204 ]\n", 1071 | "[172.05142 44.07735 118.98032]\n", 1072 | "[185.07402 54.339016 140.92003 ]\n", 1073 | "[196.37383 75.91751 104.3549 ]\n", 1074 | "[207.47168 78.27367 94.80844]\n", 1075 | "[205.72102 88.39267 112.23899]\n", 1076 | "[221.90099 101.6309 119.43612]\n", 1077 | "[222.47873 90.928986 102.78673 ]\n", 1078 | "[210.09943 89.07478 87.85132]\n", 1079 | "[230.49875 105.91617 92.61458]\n", 1080 | "[213.54787 104.79574 104.19954]\n", 1081 | "[231.32202 94.76439 75.37738]\n", 1082 | "[203.91406 72.476875 68.33571 ]\n", 1083 | "[203.91406 72.476875 68.33571 ]\n", 1084 | "[200.79707 92.94836 98.204765]\n", 1085 | "[230.9645 95.030716 77.34335 ]\n", 1086 | "[207.3087 74.58418 71.4391 ]\n", 1087 | "[203.89745 63.162933 79.04414 ]\n", 1088 | "[197.0521 61.778313 78.25231 ]\n", 1089 | "[197.91109 62.46138 79.180725]\n", 1090 | "[197.88524 62.311943 79.10263 ]\n", 1091 | "[185.8775 191.36671 271.079 ]\n", 1092 | "[ 90.87336 291.07877 171.74019]\n", 1093 | "[206.40416 75.109886 93.50195 ]\n", 1094 | "[206.33104 74.568924 94.18267 ]\n", 1095 | "[209.94963 85.73555 87.35726]\n", 1096 | "[210.57362 73.352356 97.22954 ]\n", 1097 | "[201.95682 71.41668 103.1671 ]\n", 1098 | "[204.54918 74.828064 106.42405 ]\n", 1099 | "[212.50644 91.2917 97.73299]\n", 1100 | "[220.88751 83.92188 77.72433]\n", 1101 | "[205.61482 71.96985 73.2505 ]\n", 1102 | "[208.47865 71.62103 72.641045]\n", 1103 | "[205.28223 70.29097 71.33494]\n", 1104 | "[203.94395 80.14076 85.475105]\n", 1105 | "[215.68217 92.6676 93.415504]\n", 1106 | "[218.81882 97.359535 92.70037 ]\n", 1107 | "[219.16681 95.127396 94.30102 ]\n", 1108 | "[220.239 83.11221 78.33527]\n", 1109 | "[204.63208 68.497635 70.32946 ]\n", 1110 | "[205.76695 72.01954 69.19213]\n", 1111 | "[206.63188 69.75764 71.71049]\n", 1112 | "[205.15385 68.79056 70.46304]\n", 1113 | "[205.69354 71.83081 69.324326]\n", 1114 | "[206.79277 71.76488 68.0889 ]\n", 1115 | "[206.26915 68.923294 69.464165]\n", 1116 | "[203.97667 76.53013 80.18173]\n", 1117 | "[213.72847 86.79543 87.79589]\n", 1118 | "[216.62398 91.622185 86.79793 ]\n", 1119 | "[217.63914 94.824326 90.025375]\n", 1120 | "[222.63493 86.1252 74.599396]\n", 1121 | "[186.88153 33.52998 133.48512]\n", 1122 | "[161.50171 28.95029 139.49135]\n", 1123 | "[157.77313 24.791912 139.15535 ]\n", 1124 | "[155.6186 24.399529 137.80968 ]\n", 1125 | "[155.4983 24.744019 138.38515 ]\n", 1126 | "[179.98924 66.932365 68.0145 ]\n", 1127 | "[206.94441 71.55749 66.58362]\n", 1128 | "[183.42352 28.75013 133.70116]\n", 1129 | "[156.22148 29.117332 145.82887 ]\n", 1130 | "[167.47903 34.76754 154.03773]\n", 1131 | "[156.28735 30.954678 149.02391 ]\n", 1132 | "[196.01825 86.20931 99.06901]\n", 1133 | "[219.40605 98.614815 91.59256 ]\n", 1134 | "[219.83351 98.827354 90.081474]\n", 1135 | "[195.67865 51.102844 148.78708 ]\n", 1136 | "[171.50241 39.90922 162.20367]\n", 1137 | "[153.27771 30.740335 149.1106 ]\n", 1138 | "[171.84694 49.145203 178.2536 ]\n", 1139 | "[ 68.65899 71.12031 140.24013]\n", 1140 | "[198.43956 88.245 129.07397]\n", 1141 | "[216.14888 93.05109 107.832756]\n", 1142 | "[216.06393 87.85963 99.33454]\n", 1143 | "[205.3811 75.853905 92.4445 ]\n", 1144 | "[201.01031 73.97639 90.97634]\n", 1145 | "[200.97563 73.97061 90.974014]\n", 1146 | "[182.12921 42.51955 142.20609]\n", 1147 | "[164.00658 40.414547 154.98193 ]\n", 1148 | "[165.11203 42.365665 151.5421 ]\n", 1149 | "[181.55008 69.66374 102.650955]\n", 1150 | "[198.06303 71.45174 94.7514 ]\n", 1151 | "[187.45665 53.749187 123.59117 ]\n", 1152 | "[187.4802 71.539986 95.530914]\n", 1153 | "[189.18471 54.33694 122.939255]\n", 1154 | "[173.4311 52.093998 129.88559 ]\n", 1155 | "[173.59001 52.287655 129.50409 ]\n", 1156 | "[173.79715 52.48029 129.08585]\n", 1157 | "[174.00432 52.672745 128.66776 ]\n", 1158 | "[174.21143 52.86549 128.24948]\n", 1159 | "[174.622 63.08383 146.02466]\n", 1160 | "[215.14412 108.81772 141.38626]\n", 1161 | "[225.58388 116.73769 132.0003 ]\n", 1162 | "[230.52228 130.92342 125.57238]\n", 1163 | "[234.88028 134.47377 123.1961 ]\n", 1164 | "[ 63.898746 103.3519 108.70324 ]\n", 1165 | "[211.61531 108.94229 139.46664]\n", 1166 | "[222.50635 115.53498 130.52736]\n", 1167 | "[222.70949 115.61204 130.41034]\n", 1168 | "[222.51486 115.547134 130.51196 ]\n", 1169 | "[ 63.925488 119.89671 88.20495 ]\n", 1170 | "[222.98886 115.43557 130.18619]\n", 1171 | "[222.79437 115.37064 130.28775]\n", 1172 | "[223.08456 127.12761 123.72636]\n", 1173 | "[223.57018 117.773705 127.0713 ]\n", 1174 | "[218.98248 96.14483 99.47729]\n", 1175 | "[186.3492 67.94393 63.7661 ]\n", 1176 | "[192.30177 69.86339 65.548706]\n", 1177 | "[192.47067 69.919525 65.59936 ]\n", 1178 | "[192.08498 68.000595 68.11071 ]\n", 1179 | "[191.07234 69.26387 65.43576]\n", 1180 | "[184.14511 51.36143 93.71059]\n", 1181 | "[167.77383 46.39597 93.45436]\n", 1182 | "[161.90852 43.422268 95.943726]\n", 1183 | "[168.55615 56.49838 73.10804]\n", 1184 | "[177.38611 68.14103 90.08912]\n", 1185 | "[191.67453 76.19261 126.202065]\n", 1186 | "[195.84369 95.2974 99.96159]\n", 1187 | "[212.44318 95.10722 81.12879]\n" 1188 | ] 1189 | }, 1190 | { 1191 | "name": "stdout", 1192 | "output_type": "stream", 1193 | "text": [ 1194 | "[199.69801 84.76022 80.01086]\n", 1195 | "[200.02773 95.78178 93.71998]\n", 1196 | "[209.72586 106.67634 98.418144]\n", 1197 | "[211.24452 110.5689 101.92222]\n", 1198 | "[214.53699 95.0194 75.87477]\n", 1199 | "[183.31158 87.11031 91.50206]\n", 1200 | "[214.49713 95.151085 76.07591 ]\n", 1201 | "[177.90514 49.665344 91.7904 ]\n", 1202 | "[168.27293 56.1286 72.20643]\n", 1203 | "[176.84245 57.97332 73.86507]\n", 1204 | "[171.75189 77.57105 104.27914]\n", 1205 | "[210.7619 97.57732 102.46556]\n", 1206 | "[189.87378 78.59395 77.3098 ]\n", 1207 | "[196.65532 82.94585 77.22856]\n", 1208 | "[191.25282 106.08508 107.02905]\n", 1209 | "[217.95203 132.0752 118.604416]\n", 1210 | "[220.95088 135.1952 121.007324]\n", 1211 | "[223.09756 114.12871 86.97247]\n", 1212 | "[199.68748 85.3475 73.04028]\n", 1213 | "[179.80403 56.69374 105.267166]\n", 1214 | "[162.02284 53.38201 103.635414]\n", 1215 | "[164.5341 55.555283 100.72386 ]\n", 1216 | "[167.0382 53.136635 96.6435 ]\n", 1217 | "[169.7631 64.48771 56.428696]\n", 1218 | "[179.20844 66.55022 60.493378]\n", 1219 | "[175.99446 94.06163 100.101974]\n", 1220 | "[213.51859 129.87625 115.465706]\n", 1221 | "[216.2572 132.07767 117.05019]\n", 1222 | "[216.14604 133.89877 119.906395]\n", 1223 | "[222.13391 108.44308 78.12234]\n", 1224 | "[178.47076 66.05766 60.15159]\n", 1225 | "[178.95087 66.22058 60.472633]\n", 1226 | "[174.82619 95.56893 102.828896]\n", 1227 | "[216.18628 132.68578 117.96882]\n", 1228 | "[211.44443 130.88446 116.75345]\n", 1229 | "[216.50522 105.38927 77.16409]\n", 1230 | "[174.21477 65.056114 60.65602 ]\n", 1231 | "[174.5788 58.497707 74.78129 ]\n", 1232 | "[167.58595 56.3448 72.190605]\n", 1233 | "[164.58269 52.71275 72.93716]\n", 1234 | "[162.70692 53.061596 73.75715 ]\n", 1235 | "[164.56467 54.81361 76.193344]\n", 1236 | "[170.31648 66.62139 57.68612]\n", 1237 | "[180.42546 73.031845 65.61824 ]\n", 1238 | "Ep:4| rew:35.8| eps:0.01| loss:859.5931\n" 1239 | ] 1240 | } 1241 | ], 1242 | "source": [ 1243 | "# Warming up the agent\n", 1244 | "for _ in range(memory_size):\n", 1245 | " action = agent.act(state)\n", 1246 | " next_state, reward, done, _ = environment.step(action)\n", 1247 | " agent.observe(state, action, reward, next_state, done, warming_up=True)\n", 1248 | " \n", 1249 | "rews = []\n", 1250 | "losses = []\n", 1251 | "epsilons = []\n", 1252 | "# Training the agent\n", 1253 | "for ep in range(episodes):\n", 1254 | " state = environment.reset()\n", 1255 | " rew = 0\n", 1256 | " for _ in range(episode_length):\n", 1257 | " action = agent.act(state)\n", 1258 | " \n", 1259 | " for position in environment._positions:\n", 1260 | " if all(environment._position==environment._positions[position]):\n", 1261 | " position_name = position\n", 1262 | " \n", 1263 | " \n", 1264 | " for _action in environment._actions:\n", 1265 | " if all(action==environment._actions[_action]):\n", 1266 | " action_name = _action\n", 1267 | " \n", 1268 | " next_state, reward, done, _ = environment.step(action)\n", 1269 | " \n", 1270 | " for position in environment._positions:\n", 1271 | " if all(environment._position==environment._positions[position]):\n", 1272 | " next_position_name = position\n", 1273 | " \n", 1274 | " \n", 1275 | " \n", 1276 | " #print position_name, action_name, next_position_name\n", 1277 | " loss = agent.observe(state, action, reward, next_state, done)\n", 1278 | " state = next_state\n", 1279 | " rew += reward\n", 1280 | " print(\"Ep:\" + str(ep)\n", 1281 | " + \"| rew:\" + str(round(rew, 2))\n", 1282 | " + \"| eps:\" + str(round(agent.epsilon, 2))\n", 1283 | " + \"| loss:\" + str(round(loss.history[\"loss\"][0], 4)))\n", 1284 | " rews.append(rew)\n", 1285 | " epsilons.append(agent.epsilon)\n", 1286 | " losses.append(loss.history[\"loss\"][0])" 1287 | ] 1288 | }, 1289 | { 1290 | "cell_type": "code", 1291 | "execution_count": null, 1292 | "metadata": {}, 1293 | "outputs": [], 1294 | "source": [ 1295 | "plt.plot(epsilons)\n", 1296 | "plt.xlabel('episodes')\n", 1297 | "plt.ylabel('eps')\n", 1298 | "plt.savefig('epsilons.jpg')" 1299 | ] 1300 | }, 1301 | { 1302 | "cell_type": "code", 1303 | "execution_count": null, 1304 | "metadata": {}, 1305 | "outputs": [], 1306 | "source": [ 1307 | "plt.plot(rews)\n", 1308 | "plt.xlabel('episodes')\n", 1309 | "plt.ylabel('rewards')\n", 1310 | "plt.savefig('rewards.jpg')" 1311 | ] 1312 | }, 1313 | { 1314 | "cell_type": "code", 1315 | "execution_count": 104, 1316 | "metadata": {}, 1317 | "outputs": [ 1318 | { 1319 | "name": "stdout", 1320 | "output_type": "stream", 1321 | "text": [ 1322 | "[20.81069 75.89479 79.476746]\n", 1323 | "flat sell short\n", 1324 | "[192.71753 106.13866 118.627106]\n", 1325 | "short hold short\n", 1326 | "[194.92357 95.1293 98.77579]\n", 1327 | "short hold short\n", 1328 | "[167.19397 83.26781 109.89962]\n", 1329 | "short hold short\n", 1330 | "[193.84074 106.91522 118.10751]\n", 1331 | "short hold short\n", 1332 | "[194.94403 95.113914 98.81683 ]\n", 1333 | "short hold short\n", 1334 | "[165.08765 59.310696 104.55839 ]\n", 1335 | "short hold short\n", 1336 | "[156.48079 55.810658 105.860115]\n", 1337 | "short hold short\n", 1338 | "[154.02504 54.56989 104.18098]\n", 1339 | "short hold short\n", 1340 | "[156.48079 55.810658 105.860115]\n", 1341 | "short hold short\n", 1342 | "[154.02504 54.56989 104.18098]\n", 1343 | "short hold short\n", 1344 | "[154.69577 60.89822 114.207115]\n", 1345 | "short hold short\n", 1346 | "[168.14651 76.003494 116.886086]\n", 1347 | "short hold short\n", 1348 | "[174.38722 84.181526 102.88573 ]\n", 1349 | "short hold short\n", 1350 | "[181.52422 86.42606 100.33677]\n", 1351 | "short hold short\n", 1352 | "[181.52422 86.42606 100.33677]\n", 1353 | "short hold short\n", 1354 | "[181.52422 86.42606 100.33677]\n", 1355 | "short hold short\n", 1356 | "[181.52422 86.42606 100.33677]\n", 1357 | "short hold short\n", 1358 | "[181.52422 86.42606 100.33677]\n", 1359 | "short hold short\n", 1360 | "[182.06625 87.304474 98.88487 ]\n", 1361 | "short hold short\n", 1362 | "[182.27321 86.66803 100.050186]\n", 1363 | "short hold short\n", 1364 | "[183.25185 81.20543 92.49652]\n", 1365 | "short hold short\n", 1366 | "[173.71762 73.51787 73.64316]\n", 1367 | "short hold short\n", 1368 | "[180.97012 75.81481 71.03125]\n", 1369 | "short hold short\n", 1370 | "[178.62483 85.32105 85.4355 ]\n", 1371 | "short hold short\n", 1372 | "[190.90445 96.53618 87.97102]\n", 1373 | "short hold short\n", 1374 | "[190.82782 96.515366 88.05179 ]\n", 1375 | "short hold short\n", 1376 | "[190.83029 96.5535 88.00691]\n", 1377 | "short hold short\n", 1378 | "[168.29796 55.963955 144.46191 ]\n", 1379 | "short hold short\n", 1380 | "[140.92664 49.934345 167.09619 ]\n", 1381 | "short hold short\n", 1382 | "[143.57713 52.49279 168.90076]\n", 1383 | "short hold short\n", 1384 | "[143.67574 46.48399 158.76254]\n", 1385 | "short hold short\n", 1386 | "[127.17354 42.912197 157.35742 ]\n", 1387 | "short hold short\n", 1388 | "[158.98866 77.7416 197.03073]\n", 1389 | "short hold short\n", 1390 | "[194.17514 127.76248 149.68716]\n", 1391 | "short hold short\n", 1392 | "[198.43103 101.88824 171.5823 ]\n", 1393 | "short hold short\n", 1394 | "[183.35043 102.89125 186.53233]\n", 1395 | "short hold short\n", 1396 | "[189.02893 108.598946 173.89363 ]\n", 1397 | "short hold short\n", 1398 | "[197.78256 118.68438 152.9279 ]\n", 1399 | "short hold short\n", 1400 | "[203.72673 114.65977 136.6969 ]\n", 1401 | "short hold short\n", 1402 | "[188.10199 100.56727 127.88661]\n", 1403 | "short hold short\n", 1404 | "[185.53506 93.94277 146.71156]\n", 1405 | "short hold short\n", 1406 | "[179.69481 91.88245 152.56296]\n", 1407 | "short hold short\n", 1408 | "[184.75154 102.77617 126.16213]\n", 1409 | "short hold short\n", 1410 | "short buy flat\n", 1411 | "[ 65.31699 121.63103 91.06973]\n", 1412 | "flat buy long\n", 1413 | "[193.82921 99.20619 106.29849]\n", 1414 | "long hold long\n", 1415 | "[182.88814 81.570625 93.678185]\n", 1416 | "long hold long\n", 1417 | "[175.08316 75.36332 77.18204]\n", 1418 | "long hold long\n", 1419 | "[181.60376 76.62405 73.74777]\n", 1420 | "long hold long\n", 1421 | "[179.84253 73.6292 71.65546]\n", 1422 | "long hold long\n", 1423 | "[177.41205 72.10863 71.99614]\n", 1424 | "long hold long\n", 1425 | "[180.41835 75.93305 70.71658]\n", 1426 | "long hold long\n", 1427 | "[176.66566 68.190025 83.71477 ]\n", 1428 | "long hold long\n", 1429 | "[169.46211 65.020676 85.09412 ]\n", 1430 | "long hold long\n", 1431 | "[166.07288 60.790325 86.69846 ]\n", 1432 | "long hold long\n", 1433 | "[165.575 62.33256 83.191315]\n", 1434 | "long hold long\n", 1435 | "[166.93793 63.481777 84.846054]\n", 1436 | "long hold long\n", 1437 | "[162.95316 89.81951 122.695724]\n", 1438 | "long hold long\n", 1439 | "[210.53021 140.38057 134.10231]\n", 1440 | "long hold long\n", 1441 | "[215.23798 143.8989 131.74304]\n", 1442 | "long hold long\n", 1443 | "[210.05075 128.09962 138.78255]\n", 1444 | "long hold long\n", 1445 | "[204.26262 126.23143 145.26886]\n", 1446 | "long hold long\n", 1447 | "[208.0815 131.26724 145.56723]\n", 1448 | "long hold long\n", 1449 | "[208.92622 133.86969 148.22568]\n", 1450 | "long hold long\n", 1451 | "[210.39262 152.59258 166.23799]\n", 1452 | "long hold long\n", 1453 | "[226.1462 156.39114 152.79454]\n", 1454 | "long hold long\n", 1455 | "[211.50676 134.0391 146.32774]\n", 1456 | "long hold long\n", 1457 | "[208.92622 133.86969 148.22568]\n", 1458 | "long hold long\n", 1459 | "[210.39262 152.59258 166.23799]\n", 1460 | "long hold long\n", 1461 | "[224.64336 176.34753 167.67172]\n", 1462 | "long hold long\n", 1463 | "long sell flat\n", 1464 | "[109.84273 224.9608 116.57327]\n", 1465 | "flat buy long\n", 1466 | "[232.38051 196.04292 157.3034 ]\n", 1467 | "long hold long\n", 1468 | "[229.30408 180.3194 164.60558]\n", 1469 | "long hold long\n", 1470 | "[223.8669 173.5765 168.42711]\n", 1471 | "long hold long\n", 1472 | "[225.9758 120.12888 114.77629]\n", 1473 | "long hold long\n", 1474 | "[157.88829 51.616795 72.046265]\n", 1475 | "long hold long\n", 1476 | "[158.90921 51.790775 78.2432 ]\n", 1477 | "long hold long\n", 1478 | "[157.50131 50.769787 76.79894 ]\n", 1479 | "long hold long\n", 1480 | "[155.24942 48.348484 75.43603 ]\n", 1481 | "long hold long\n", 1482 | "[155.06602 48.916714 74.14399 ]\n", 1483 | "long hold long\n", 1484 | "[154.4594 52.50082 79.91894]\n", 1485 | "long hold long\n", 1486 | "[164.90364 57.768406 87.23468 ]\n", 1487 | "long hold long\n", 1488 | "[154.45848 52.502956 79.93789 ]\n", 1489 | "long hold long\n", 1490 | "[163.42258 62.062138 94.143456]\n", 1491 | "long hold long\n", 1492 | "[167.1744 60.19367 88.4435 ]\n", 1493 | "long hold long\n", 1494 | "[154.45296 52.49513 79.95841]\n", 1495 | "long hold long\n", 1496 | "long sell flat\n", 1497 | "[ 6.7866163 17.734636 61.81455 ]\n", 1498 | "flat sell short\n", 1499 | "[163.20009 62.055103 94.07497 ]\n", 1500 | "short hold short\n", 1501 | "[166.9532 60.192738 88.34594 ]\n", 1502 | "short hold short\n", 1503 | "[154.22101 52.449764 80.08362 ]\n", 1504 | "short hold short\n", 1505 | "[164.6846 57.735317 87.28747 ]\n", 1506 | "short hold short\n", 1507 | "[154.22694 52.456936 80.056816]\n", 1508 | "short hold short\n", 1509 | "[163.20009 62.055103 94.07497 ]\n", 1510 | "short hold short\n", 1511 | "[166.9532 60.192738 88.34594 ]\n", 1512 | "short hold short\n", 1513 | "[154.22101 52.449764 80.08362 ]\n", 1514 | "short hold short\n", 1515 | "[164.62048 63.076954 89.76653 ]\n", 1516 | "short hold short\n", 1517 | "short buy flat\n", 1518 | "[23.989162 34.205082 57.247746]\n", 1519 | "flat sell short\n", 1520 | "[157.0221 54.657734 77.22826 ]\n", 1521 | "short hold short\n", 1522 | "[167.51863 60.085995 83.73647 ]\n", 1523 | "short hold short\n", 1524 | "[156.73663 55.47064 78.56739]\n", 1525 | "short hold short\n", 1526 | "[169.79176 62.564625 84.70255 ]\n", 1527 | "short hold short\n", 1528 | "[157.0221 54.657734 77.22826 ]\n", 1529 | "short hold short\n", 1530 | "[165.17033 61.740566 92.25306 ]\n", 1531 | "short hold short\n", 1532 | "[164.68758 57.727085 87.29536 ]\n", 1533 | "short hold short\n", 1534 | "[153.94472 53.26167 81.40362]\n", 1535 | "short hold short\n", 1536 | "[165.75838 63.703785 93.771675]\n", 1537 | "short hold short\n", 1538 | "[164.69826 57.743275 87.26096 ]\n", 1539 | "short hold short\n", 1540 | "[154.25983 52.482883 79.918564]\n", 1541 | "short hold short\n", 1542 | "[163.22086 62.069805 93.9951 ]\n", 1543 | "short hold short\n", 1544 | "[166.97412 60.20743 88.26601]\n", 1545 | "short hold short\n", 1546 | "short buy flat\n", 1547 | "[20.829088 39.604176 58.394413]\n", 1548 | "flat sell short\n", 1549 | "[166.9532 60.192738 88.34594 ]\n", 1550 | "short hold short\n", 1551 | "[154.22101 52.449764 80.08362 ]\n", 1552 | "short hold short\n", 1553 | "[164.62048 63.076954 89.76653 ]\n", 1554 | "short hold short\n", 1555 | "[166.0299 64.4291 90.44625]\n", 1556 | "short hold short\n", 1557 | "[169.78314 62.566685 84.71716 ]\n", 1558 | "short hold short\n", 1559 | "[157.0131 54.658894 77.246994]\n", 1560 | "short hold short\n", 1561 | "[172.32904 73.355896 73.07042 ]\n", 1562 | "short hold short\n", 1563 | "[180.92769 77.099014 71.412704]\n", 1564 | "short hold short\n", 1565 | "[184.70331 75.09723 65.479095]\n", 1566 | "short hold short\n", 1567 | "[170.72614 66.73938 63.539455]\n", 1568 | "short hold short\n", 1569 | "[182.09222 72.64341 64.82785]\n", 1570 | "short hold short\n", 1571 | "[170.72978 66.741035 63.54424 ]\n", 1572 | "short hold short\n", 1573 | "[182.09499 72.652084 64.79813 ]\n", 1574 | "short hold short\n", 1575 | "[170.73486 66.75247 63.52377]\n", 1576 | "short hold short\n", 1577 | "[176.20775 67.94336 83.48598]\n", 1578 | "short hold short\n", 1579 | "[169.91875 62.078884 80.70883 ]\n", 1580 | "short hold short\n", 1581 | "[159.3911 56.513447 74.849976]\n", 1582 | "short hold short\n", 1583 | "[169.96185 61.97952 80.43863]\n", 1584 | "short hold short\n", 1585 | "[159.0977 56.241444 74.1163 ]\n", 1586 | "short hold short\n", 1587 | "[169.92174 62.104923 80.641335]\n", 1588 | "short hold short\n", 1589 | "[159.42723 56.55405 74.67082]\n", 1590 | "short hold short\n", 1591 | "[169.93289 62.112965 80.59859 ]\n", 1592 | "short hold short\n", 1593 | "[159.42696 56.554806 74.67728 ]\n", 1594 | "short hold short\n", 1595 | "[168.45085 66.43681 87.33858]\n", 1596 | "short hold short\n", 1597 | "[172.20409 64.57432 81.60947]\n", 1598 | "short hold short\n", 1599 | "[159.40244 56.528187 74.80282 ]\n", 1600 | "short hold short\n", 1601 | "[168.44466 66.42828 87.3714 ]\n", 1602 | "short hold short\n", 1603 | "[172.19781 64.56592 81.642296]\n", 1604 | "short hold short\n", 1605 | "[159.39673 56.521183 74.829605]\n", 1606 | "short hold short\n", 1607 | "[169.92537 62.091564 80.66493 ]\n", 1608 | "short hold short\n", 1609 | "[159.1174 57.34138 76.141846]\n", 1610 | "short hold short\n", 1611 | "[172.20409 64.57432 81.60947]\n", 1612 | "short hold short\n", 1613 | "[159.40323 56.526936 74.79029 ]\n", 1614 | "short hold short\n", 1615 | "[169.9191 62.083233 80.69763 ]\n", 1616 | "short hold short\n", 1617 | "[159.11133 57.334126 76.16868 ]\n", 1618 | "short hold short\n", 1619 | "[172.19781 64.56592 81.642296]\n", 1620 | "short hold short\n", 1621 | "[159.39673 56.521183 74.829605]\n", 1622 | "short hold short\n", 1623 | "[169.92488 62.087208 80.676125]\n", 1624 | "short hold short\n", 1625 | "[159.11133 57.334126 76.16868 ]\n", 1626 | "short hold short\n", 1627 | "[170.99435 68.07901 87.08264]\n", 1628 | "short hold short\n", 1629 | "[169.93108 62.09564 80.64347]\n", 1630 | "short hold short\n", 1631 | "[159.40323 56.526936 74.79029 ]\n", 1632 | "short hold short\n", 1633 | "[169.9191 62.083233 80.69763 ]\n", 1634 | "short hold short\n", 1635 | "[159.11133 57.334126 76.16868 ]\n", 1636 | "short hold short\n", 1637 | "[170.99435 68.07901 87.08264]\n", 1638 | "short hold short\n", 1639 | "[169.93108 62.09564 80.64347]\n", 1640 | "short hold short\n", 1641 | "[159.40323 56.526936 74.79029 ]\n", 1642 | "short hold short\n", 1643 | "[169.9191 62.083233 80.69763 ]\n", 1644 | "short hold short\n", 1645 | "[159.11133 57.334126 76.16868 ]\n", 1646 | "short hold short\n", 1647 | "[170.99435 68.07901 87.08264]\n", 1648 | "short hold short\n", 1649 | "[169.93108 62.09564 80.64347]\n", 1650 | "short hold short\n", 1651 | "[159.40323 56.526936 74.79029 ]\n", 1652 | "short hold short\n", 1653 | "[169.9191 62.083233 80.69763 ]\n", 1654 | "short hold short\n", 1655 | "[159.11133 57.334126 76.16868 ]\n", 1656 | "short hold short\n", 1657 | "[172.19781 64.56592 81.642296]\n" 1658 | ] 1659 | }, 1660 | { 1661 | "name": "stdout", 1662 | "output_type": "stream", 1663 | "text": [ 1664 | "short hold short\n", 1665 | "[159.39769 56.519123 74.8107 ]\n", 1666 | "short hold short\n", 1667 | "[169.90778 62.075207 80.7403 ]\n", 1668 | "short hold short\n", 1669 | "[159.39745 56.519802 74.816895]\n", 1670 | "short hold short\n", 1671 | "[169.91354 62.079136 80.718864]\n", 1672 | "short hold short\n", 1673 | "[160.61116 53.059734 69.16075 ]\n", 1674 | "short hold short\n", 1675 | "[160.66156 52.93932 68.92976]\n", 1676 | "short hold short\n", 1677 | "[160.32985 52.630665 68.41347 ]\n", 1678 | "short hold short\n", 1679 | "[159.2046 50.777317 71.46637 ]\n", 1680 | "short hold short\n", 1681 | "[157.51126 50.569332 71.361046]\n", 1682 | "short hold short\n", 1683 | "[157.86023 50.89989 71.80371]\n", 1684 | "short hold short\n", 1685 | "[157.86023 50.89989 71.80371]\n", 1686 | "short hold short\n", 1687 | "[156.6455 54.362057 77.47898 ]\n", 1688 | "short hold short\n", 1689 | "[165.65178 64.10455 90.80412]\n", 1690 | "short hold short\n", 1691 | "[167.91911 66.57927 91.79151]\n", 1692 | "short hold short\n", 1693 | "[169.53069 61.782368 84.65055 ]\n", 1694 | "short hold short\n", 1695 | "[155.22704 54.09242 77.94614]\n", 1696 | "short hold short\n", 1697 | "[173.94225 76.33833 75.65941]\n", 1698 | "short hold short\n", 1699 | "[178.019 71.221375 85.59218 ]\n", 1700 | "short hold short\n", 1701 | "[169.64156 67.08432 91.25675]\n", 1702 | "short hold short\n", 1703 | "[168.2316 65.72784 90.58817]\n", 1704 | "short hold short\n", 1705 | "[165.67628 64.07303 90.89839]\n", 1706 | "short hold short\n", 1707 | "[169.08804 68.40207 88.820724]\n", 1708 | "short hold short\n", 1709 | "[169.63544 67.07606 91.289406]\n", 1710 | "short hold short\n", 1711 | "[166.97989 64.98643 94.46699]\n", 1712 | "short hold short\n", 1713 | "[165.8377 63.71758 93.693 ]\n", 1714 | "short hold short\n", 1715 | "[163.28809 62.067028 93.98173 ]\n", 1716 | "short hold short\n", 1717 | "[165.8377 63.71758 93.693 ]\n", 1718 | "short hold short\n", 1719 | "[163.28809 62.067028 93.98173 ]\n", 1720 | "short hold short\n", 1721 | "[171.57864 74.30066 78.837 ]\n", 1722 | "short hold short\n", 1723 | "[176.60164 70.742424 86.18719 ]\n", 1724 | "short hold short\n", 1725 | "[171.08261 68.09083 86.98918]\n", 1726 | "short hold short\n", 1727 | "[167.67082 63.761868 89.06688 ]\n", 1728 | "short hold short\n", 1729 | "[167.12343 65.08785 86.5982 ]\n", 1730 | "short hold short\n", 1731 | "[168.53299 66.44015 87.27792]\n", 1732 | "short hold short\n", 1733 | "[171.08261 68.09083 86.98918]\n", 1734 | "short hold short\n", 1735 | "short buy flat\n", 1736 | "[20.453474 39.865177 53.333103]\n", 1737 | "flat sell short\n", 1738 | "[168.48102 66.452286 87.36561 ]\n", 1739 | "short hold short\n", 1740 | "[171.0306 68.10289 87.076836]\n", 1741 | "short hold short\n", 1742 | "[167.61885 63.773968 89.15451 ]\n", 1743 | "short hold short\n", 1744 | "[167.07156 65.10007 86.68589]\n", 1745 | "short hold short\n", 1746 | "[168.48102 66.452286 87.36561 ]\n", 1747 | "short hold short\n", 1748 | "[171.0306 68.10289 87.076836]\n", 1749 | "short hold short\n", 1750 | "[167.61885 63.773968 89.15451 ]\n", 1751 | "short hold short\n", 1752 | "[165.92715 63.2459 89.751045]\n", 1753 | "short hold short\n", 1754 | "[165.92715 63.2459 89.751045]\n", 1755 | "short hold short\n", 1756 | "[165.92715 63.2459 89.751045]\n", 1757 | "short hold short\n", 1758 | "[165.64484 64.06997 91.02712]\n", 1759 | "short hold short\n", 1760 | "[168.19452 65.72065 90.738335]\n", 1761 | "short hold short\n", 1762 | "[165.64484 64.06997 91.02712]\n", 1763 | "short hold short\n", 1764 | "[167.91231 66.54468 92.01449]\n", 1765 | "short hold short\n", 1766 | "[168.19452 65.72065 90.738335]\n", 1767 | "short hold short\n", 1768 | "[165.64484 64.06997 91.02712]\n", 1769 | "short hold short\n", 1770 | "[168.19452 65.72065 90.738335]\n", 1771 | "short hold short\n", 1772 | "[165.64484 64.06997 91.02712]\n", 1773 | "short hold short\n", 1774 | "[168.19452 65.72065 90.738335]\n", 1775 | "short hold short\n", 1776 | "[165.64484 64.06997 91.02712]\n", 1777 | "short hold short\n", 1778 | "[168.19452 65.72065 90.738335]\n", 1779 | "short hold short\n", 1780 | "[165.64484 64.06997 91.02712]\n", 1781 | "short hold short\n", 1782 | "[168.19452 65.72065 90.738335]\n", 1783 | "short hold short\n", 1784 | "[167.07156 65.10007 86.68589]\n", 1785 | "short hold short\n", 1786 | "[168.48102 66.452286 87.36561 ]\n", 1787 | "short hold short\n", 1788 | "[171.0306 68.10289 87.076836]\n", 1789 | "short hold short\n", 1790 | "[167.61885 63.773968 89.15451 ]\n", 1791 | "short hold short\n", 1792 | "[167.07156 65.10007 86.68589]\n", 1793 | "short hold short\n", 1794 | "[167.61885 63.773968 89.15451 ]\n", 1795 | "short hold short\n", 1796 | "[167.07156 65.10007 86.68589]\n", 1797 | "short hold short\n", 1798 | "[168.48102 66.452286 87.36561 ]\n", 1799 | "short hold short\n", 1800 | "[170.59984 69.3607 89.02464]\n", 1801 | "short hold short\n", 1802 | "[172.07556 69.83923 88.26825]\n", 1803 | "short hold short\n", 1804 | "[168.66373 65.51018 90.345924]\n", 1805 | "short hold short\n", 1806 | "[168.11636 66.83627 87.87717]\n", 1807 | "short hold short\n", 1808 | "[169.52571 68.18843 88.55703]\n", 1809 | "short hold short\n", 1810 | "[171.57031 71.313774 90.551926]\n", 1811 | "short hold short\n", 1812 | "short hold short\n", 1813 | "[178.79857 82.05335 76.81382]\n", 1814 | "short hold short\n", 1815 | "[187.0433 83.98995 73.127014]\n", 1816 | "short hold short\n", 1817 | "[183.67493 79.39171 74.80989]\n", 1818 | "short hold short\n", 1819 | "[182.20605 78.21296 74.39871]\n", 1820 | "short hold short\n", 1821 | "[180.41595 76.25927 73.61919]\n", 1822 | "short hold short\n", 1823 | "[180.41595 76.25927 73.61919]\n", 1824 | "short hold short\n", 1825 | "[180.54968 75.86887 73.01468]\n", 1826 | "short hold short\n", 1827 | "[180.8128 70.79332 66.502045]\n", 1828 | "short hold short\n", 1829 | "[166.46838 60.44585 59.981853]\n", 1830 | "short hold short\n", 1831 | "[167.89963 63.93275 63.586514]\n", 1832 | "short hold short\n", 1833 | "[180.69963 70.67142 66.41759]\n", 1834 | "short hold short\n", 1835 | "[166.31233 60.093952 59.585667]\n", 1836 | "short hold short\n", 1837 | "[164.82698 59.62424 59.10574]\n", 1838 | "short hold short\n", 1839 | "[167.62071 61.8691 61.387653]\n", 1840 | "short hold short\n", 1841 | "[170.81325 63.295094 62.81927 ]\n", 1842 | "short hold short\n", 1843 | "[167.99254 61.53124 61.012394]\n", 1844 | "short hold short\n", 1845 | "[162.02615 96.38983 112.42522]\n", 1846 | "short hold short\n", 1847 | "[213.64758 143.46446 135.78683]\n", 1848 | "short hold short\n", 1849 | "[216.07841 147.86856 140.68327]\n", 1850 | "short hold short\n", 1851 | "[215.47202 139.10875 147.15134]\n", 1852 | "short hold short\n", 1853 | "short hold short\n", 1854 | "[214.84956 148.73474 143.6972 ]\n", 1855 | "short hold short\n", 1856 | "[216.31187 139.58029 146.85416]\n", 1857 | "short hold short\n", 1858 | "[211.53273 134.0704 146.18953]\n", 1859 | "short hold short\n", 1860 | "[209.10197 129.66643 141.29317]\n", 1861 | "short hold short\n", 1862 | "[206.11877 127.166405 139.85864 ]\n", 1863 | "short hold short\n", 1864 | "[206.03752 129.46506 143.54701]\n", 1865 | "short hold short\n", 1866 | "[213.08482 144.8126 139.24121]\n", 1867 | "short hold short\n", 1868 | "[220.27493 113.70575 81.281204]\n", 1869 | "short hold short\n", 1870 | "[168.60646 63.327213 58.41656 ]\n", 1871 | "short hold short\n", 1872 | "[169.66415 64.283905 59.40099 ]\n", 1873 | "short hold short\n", 1874 | "[172.71982 65.31424 62.62295]\n", 1875 | "short hold short\n", 1876 | "[172.13504 65.463165 61.93423 ]\n", 1877 | "short hold short\n", 1878 | "[169.5572 57.02804 74.11928]\n", 1879 | "short hold short\n", 1880 | "[161.10872 53.64352 75.89451]\n", 1881 | "short hold short\n", 1882 | "[157.96086 57.581608 82.58659 ]\n", 1883 | "short hold short\n", 1884 | "[169.89093 68.53194 92.51392]\n", 1885 | "short hold short\n", 1886 | "[167.34105 66.881256 92.80275 ]\n", 1887 | "short hold short\n", 1888 | "[170.75304 71.210175 90.724945]\n", 1889 | "short hold short\n", 1890 | "[171.30016 69.88417 93.19381]\n", 1891 | "short hold short\n", 1892 | "[170.92708 71.23791 90.738914]\n", 1893 | "short hold short\n", 1894 | "[172.78482 70.96751 89.25917]\n", 1895 | "short hold short\n", 1896 | "[171.15767 68.05961 87.15156]\n", 1897 | "short hold short\n", 1898 | "[168.88931 65.57616 86.1866 ]\n", 1899 | "short hold short\n", 1900 | "[168.87752 65.56379 86.2405 ]\n", 1901 | "short hold short\n", 1902 | "[173.6288 73.4453 73.18507]\n", 1903 | "short hold short\n", 1904 | "[174.86723 66.01082 86.64134]\n", 1905 | "short hold short\n", 1906 | "[165.96358 63.226856 89.79104 ]\n", 1907 | "short hold short\n", 1908 | "[167.10239 65.077065 86.74738 ]\n", 1909 | "short hold short\n", 1910 | "[167.64964 63.750942 89.21606 ]\n", 1911 | "short hold short\n", 1912 | "[167.10239 65.077065 86.74738 ]\n", 1913 | "short hold short\n", 1914 | "[167.64964 63.750942 89.21606 ]\n", 1915 | "short hold short\n", 1916 | "[166.69621 61.01524 86.55548]\n", 1917 | "short hold short\n", 1918 | "[160.15294 57.60348 82.94364]\n", 1919 | "short hold short\n", 1920 | "[167.10239 65.077065 86.74738 ]\n", 1921 | "short hold short\n", 1922 | "[173.62062 73.50173 73.07973]\n", 1923 | "short hold short\n", 1924 | "[174.83046 66.025635 86.61248 ]\n", 1925 | "short hold short\n", 1926 | "[164.4414 67.58297 96.46747]\n", 1927 | "short hold short\n", 1928 | "[177.51973 82.46205 98.59905]\n", 1929 | "short hold short\n", 1930 | "[178.92903 83.8142 99.27881]\n", 1931 | "short hold short\n", 1932 | "[186.32713 98.060974 89.22142 ]\n", 1933 | "short hold short\n", 1934 | "[198.07265 89.15219 68.69168]\n", 1935 | "short hold short\n", 1936 | "[167.24893 54.346165 70.9524 ]\n", 1937 | "short hold short\n", 1938 | "[159.27238 51.081608 71.11628 ]\n", 1939 | "short hold short\n", 1940 | "[156.73456 48.918613 74.03006 ]\n", 1941 | "short hold short\n", 1942 | "[154.8618 49.223003 74.760155]\n", 1943 | "short hold short\n", 1944 | "[156.29059 51.656162 78.47074 ]\n", 1945 | "short hold short\n", 1946 | "[158.70169 53.025394 80.36019 ]\n", 1947 | "short hold short\n", 1948 | "[157.15851 50.484035 76.49134 ]\n", 1949 | "short hold short\n", 1950 | "[154.92705 48.602467 73.76646 ]\n", 1951 | "short hold short\n", 1952 | "[160.56639 61.01955 56.3551 ]\n", 1953 | "short hold short\n", 1954 | "[166.88835 52.991657 73.33245 ]\n", 1955 | "short hold short\n", 1956 | "[161.88617 61.321163 56.994877]\n", 1957 | "short hold short\n", 1958 | "[169.17812 77.534996 79.38107 ]\n", 1959 | "short hold short\n", 1960 | "short hold short\n", 1961 | "[189.55345 96.11858 86.99208]\n", 1962 | "short hold short\n", 1963 | "[190.6718 99.272995 90.31427 ]\n", 1964 | "short hold short\n", 1965 | "[192.9759 101.41071 90.810074]\n", 1966 | "short hold short\n", 1967 | "[192.02238 98.42837 92.18689]\n", 1968 | "short hold short\n", 1969 | "[191.38017 100.34244 90.580246]\n", 1970 | "short hold short\n", 1971 | "[192.02238 98.42837 92.18689]\n", 1972 | "short hold short\n", 1973 | "[191.38017 100.34244 90.580246]\n", 1974 | "short hold short\n", 1975 | "[192.02238 98.42837 92.18689]\n", 1976 | "short hold short\n", 1977 | "[191.38017 100.34244 90.580246]\n", 1978 | "short hold short\n", 1979 | "[192.02238 98.42837 92.18689]\n", 1980 | "short hold short\n", 1981 | "[191.22867 99.86983 90.80043]\n", 1982 | "short hold short\n", 1983 | "[195.04321 91.27882 76.677826]\n", 1984 | "short hold short\n", 1985 | "[180.91846 76.04603 70.067 ]\n", 1986 | "short hold short\n", 1987 | "[180.91107 77.179344 71.40752 ]\n", 1988 | "short hold short\n" 1989 | ] 1990 | }, 1991 | { 1992 | "name": "stdout", 1993 | "output_type": "stream", 1994 | "text": [ 1995 | "[182.06209 77.6262 75.20578]\n", 1996 | "short hold short\n", 1997 | "[181.85622 72.7609 69.08551]\n", 1998 | "short hold short\n", 1999 | "[167.34987 60.794353 61.677776]\n", 2000 | "short hold short\n", 2001 | "[165.73659 75.49234 82.57347]\n", 2002 | "short hold short\n", 2003 | "[192.32285 90.14804 80.900955]\n", 2004 | "short hold short\n", 2005 | "[174.36574 67.36404 91.83639]\n", 2006 | "short hold short\n", 2007 | "[167.69238 68.019554 89.33806 ]\n", 2008 | "short hold short\n", 2009 | "[175.80057 77.11416 74.82112]\n", 2010 | "short hold short\n", 2011 | "[183.56728 78.62232 70.92351]\n", 2012 | "short hold short\n", 2013 | "[180.13852 74.281494 73.06531 ]\n", 2014 | "short hold short\n", 2015 | "[179.5912 75.60748 70.59654]\n", 2016 | "short hold short\n", 2017 | "[180.13852 74.281494 73.06531 ]\n", 2018 | "short hold short\n", 2019 | "[179.5912 75.60748 70.59654]\n", 2020 | "short hold short\n", 2021 | "[180.13852 74.281494 73.06531 ]\n", 2022 | "short hold short\n", 2023 | "[179.5912 75.60748 70.59654]\n", 2024 | "short hold short\n", 2025 | "[181.08485 75.840126 70.4827 ]\n", 2026 | "short hold short\n", 2027 | "[174.89539 66.2869 86.19916]\n", 2028 | "short hold short\n", 2029 | "[165.1506 61.78877 92.21281]\n", 2030 | "short hold short\n", 2031 | "[161.97319 65.59776 99.52567]\n", 2032 | "short hold short\n", 2033 | "[175.39288 74.2854 98.00578]\n", 2034 | "short hold short\n", 2035 | "[169.50436 71.11718 76.20889]\n", 2036 | "short hold short\n", 2037 | "[178.10304 74.62343 74.81469]\n", 2038 | "short hold short\n", 2039 | "[180.65112 76.26099 74.55977]\n", 2040 | "short hold short\n", 2041 | "[174.5564 67.4475 84.13086]\n", 2042 | "short hold short\n", 2043 | "[173.58765 73.48022 73.21703]\n", 2044 | "short hold short\n", 2045 | "[180.80797 75.75512 70.62193]\n", 2046 | "short hold short\n", 2047 | "[181.89165 77.52098 67.652725]\n", 2048 | "short hold short\n", 2049 | "[182.35696 76.177605 70.13368 ]\n", 2050 | "short hold short\n", 2051 | "[180.66283 75.6278 70.78633]\n", 2052 | "short hold short\n", 2053 | "[181.779 77.461914 67.82814 ]\n", 2054 | "short hold short\n", 2055 | "[182.91103 77.10887 68.68231]\n", 2056 | "short hold short\n", 2057 | "[181.55746 75.98816 70.39615]\n", 2058 | "short hold short\n", 2059 | "[180.9092 76.03566 70.17262]\n", 2060 | "short hold short\n", 2061 | "[180.04625 74.285675 73.10542 ]\n", 2062 | "short hold short\n", 2063 | "[179.31842 75.319016 71.120636]\n", 2064 | "short hold short\n", 2065 | "[174.66756 65.99634 86.74638]\n", 2066 | "short hold short\n", 2067 | "[171.80875 73.00716 73.695496]\n", 2068 | "short hold short\n", 2069 | "[175.6942 67.85978 83.61273]\n", 2070 | "short hold short\n", 2071 | "[174.24556 74.784454 71.00746 ]\n", 2072 | "short hold short\n", 2073 | "[175.81303 66.65268 85.779144]\n", 2074 | "short hold short\n", 2075 | "[172.78625 74.33414 71.506744]\n", 2076 | "short hold short\n", 2077 | "[175.82741 66.67375 85.740845]\n", 2078 | "short hold short\n", 2079 | "[172.06354 73.16312 73.44265]\n", 2080 | "short hold short\n", 2081 | "[174.75908 66.340164 86.117386]\n", 2082 | "short hold short\n", 2083 | "[172.76909 74.33146 71.50535]\n", 2084 | "short hold short\n", 2085 | "[181.3076 75.4756 71.20705]\n", 2086 | "short hold short\n", 2087 | "[179.615 74.938774 71.82588 ]\n", 2088 | "short hold short\n", 2089 | "[179.6047 74.93929 71.84607]\n", 2090 | "short hold short\n", 2091 | "[175.26321 67.74239 83.749374]\n", 2092 | "short hold short\n", 2093 | "short buy flat\n", 2094 | "[26.818296 38.175983 71.68744 ]\n", 2095 | "flat sell short\n", 2096 | "[158.6605 58.911396 94.68696 ]\n", 2097 | "short hold short\n", 2098 | "[164.2891 64.38863 86.81363]\n", 2099 | "short hold short\n", 2100 | "[173.74338 73.80145 72.51731]\n", 2101 | "short hold short\n", 2102 | "[180.53996 75.157 71.468185]\n", 2103 | "short hold short\n", 2104 | "[180.10686 75.614426 70.55727 ]\n", 2105 | "short hold short\n", 2106 | "[174.8355 66.33429 85.98156]\n", 2107 | "short hold short\n", 2108 | "[172.24393 73.42858 72.836174]\n", 2109 | "short hold short\n", 2110 | "[176.00067 67.996704 83.24185 ]\n", 2111 | "short hold short\n", 2112 | "[167.59407 64.15267 88.363556]\n", 2113 | "short hold short\n", 2114 | "[165.02518 61.85368 91.93089]\n", 2115 | "short hold short\n", 2116 | "[163.05127 62.14964 93.80333]\n", 2117 | "short hold short\n", 2118 | "[164.11319 68.11988 100.27609]\n", 2119 | "short hold short\n", 2120 | "[176.44681 70.80824 92.4029 ]\n", 2121 | "short hold short\n", 2122 | "[153.76169 53.309605 81.385506]\n", 2123 | "short hold short\n", 2124 | "[167.46152 68.045525 89.147255]\n", 2125 | "short hold short\n", 2126 | "[170.14177 68.314354 89.2164 ]\n", 2127 | "short hold short\n", 2128 | "[168.37416 66.265625 92.50121 ]\n", 2129 | "short hold short\n", 2130 | "[172.70566 75.49647 76.965324]\n", 2131 | "short hold short\n", 2132 | "[177.20404 71.06273 85.768875]\n", 2133 | "short hold short\n", 2134 | "[170.17245 68.291214 89.278046]\n", 2135 | "short hold short\n", 2136 | "[168.40492 66.24245 92.56269]\n", 2137 | "short hold short\n", 2138 | "[165.74954 64.15283 95.740105]\n", 2139 | "short hold short\n", 2140 | "[164.10217 64.35874 97.249725]\n", 2141 | "short hold short\n", 2142 | "[166.39424 64.811745 95.81323 ]\n", 2143 | "short hold short\n", 2144 | "[160.81735 64.69646 100.89108]\n", 2145 | "short hold short\n", 2146 | "[174.23698 73.384125 99.371284]\n", 2147 | "short hold short\n", 2148 | "[156.27994 50.60017 110.306694]\n", 2149 | "short hold short\n", 2150 | "[147.58305 48.717968 109.11525 ]\n", 2151 | "short hold short\n", 2152 | "[147.2857 49.517292 110.51401 ]\n", 2153 | "short hold short\n", 2154 | "[149.8804 52.26295 112.35234]\n", 2155 | "short hold short\n", 2156 | "[151.63742 54.26624 109.28601]\n", 2157 | "short hold short\n", 2158 | "[159.33862 64.49374 92.84438]\n", 2159 | "short hold short\n", 2160 | "[169.12042 68.46274 88.91193]\n", 2161 | "short hold short\n", 2162 | "[175.6043 77.105194 74.85879 ]\n", 2163 | "short hold short\n", 2164 | "[182.42854 78.45582 73.83162]\n", 2165 | "short hold short\n", 2166 | "[182.68636 80.17296 71.18346]\n", 2167 | "short hold short\n", 2168 | "[177.7957 69.94857 88.007805]\n", 2169 | "short hold short\n", 2170 | "[169.63518 62.46815 84.48377]\n", 2171 | "short hold short\n", 2172 | "[157.44289 51.5658 72.29612]\n", 2173 | "short hold short\n", 2174 | "[159.85448 52.93352 74.17319]\n", 2175 | "short hold short\n", 2176 | "[161.73477 61.28615 56.997723]\n", 2177 | "short hold short\n", 2178 | "[169.04634 62.858204 60.200207]\n", 2179 | "short hold short\n", 2180 | "[168.8398 62.815296 60.08163 ]\n", 2181 | "short hold short\n", 2182 | "[168.43759 61.15833 62.328205]\n", 2183 | "short hold short\n", 2184 | "[167.71976 62.804295 59.29463 ]\n", 2185 | "short hold short\n", 2186 | "[166.9139 54.552074 71.13666 ]\n", 2187 | "short hold short\n", 2188 | "[160.19778 53.127224 69.21329 ]\n", 2189 | "short hold short\n", 2190 | "[160.11627 53.33308 69.570854]\n", 2191 | "short hold short\n", 2192 | "[160.4627 54.514713 71.415565]\n", 2193 | "short hold short\n", 2194 | "[161.75298 55.443264 74.966774]\n", 2195 | "short hold short\n", 2196 | "[166.40033 65.27962 58.789402]\n", 2197 | "short hold short\n", 2198 | "[170.2597 57.787197 75.3727 ]\n", 2199 | "short hold short\n", 2200 | "[161.76364 55.43768 74.97702]\n", 2201 | "short hold short\n", 2202 | "[166.40265 65.2747 58.806866]\n", 2203 | "short hold short\n", 2204 | "[170.27037 57.78158 75.382935]\n", 2205 | "short hold short\n", 2206 | "[161.95802 56.808613 74.93589 ]\n", 2207 | "short hold short\n", 2208 | "[163.36256 57.84531 78.645706]\n", 2209 | "short hold short\n", 2210 | "[168.80853 67.6117 61.763386]\n", 2211 | "short hold short\n", 2212 | "[171.93408 60.47173 77.69459]\n", 2213 | "short hold short\n", 2214 | "[163.37335 57.839733 78.655785]\n", 2215 | "short hold short\n", 2216 | "[168.81935 67.60618 61.77351]\n", 2217 | "short hold short\n", 2218 | "[171.94418 60.464115 77.71511 ]\n", 2219 | "short hold short\n", 2220 | "[163.3841 57.83433 78.66586]\n", 2221 | "short hold short\n", 2222 | "[168.83014 67.600716 61.78371 ]\n", 2223 | "short hold short\n", 2224 | "short buy flat\n", 2225 | "[12.537618 24.66405 54.628727]\n", 2226 | "flat sell short\n", 2227 | "[168.96492 67.57902 61.530285]\n", 2228 | "short hold short\n", 2229 | "[172.08617 60.42026 77.5518 ]\n", 2230 | "short hold short\n", 2231 | "[163.28006 60.419773 80.374016]\n", 2232 | "short hold short\n", 2233 | "[168.0484 64.91265 87.14299]\n", 2234 | "short hold short\n", 2235 | "[168.17049 62.571453 83.9482 ]\n", 2236 | "short hold short\n", 2237 | "[161.27614 55.0497 80.3458 ]\n", 2238 | "short hold short\n", 2239 | "[165.68153 64.60331 63.260143]\n", 2240 | "short hold short\n", 2241 | "[171.21147 78.33099 83.564026]\n", 2242 | "short hold short\n", 2243 | "[189.84819 96.15423 87.36931]\n", 2244 | "short hold short\n", 2245 | "[189.61113 94.035355 88.630844]\n", 2246 | "short hold short\n", 2247 | "[187.78433 95.21268 91.54491]\n", 2248 | "short hold short\n", 2249 | "[184.5597 84.63867 103.84157]\n", 2250 | "short hold short\n", 2251 | "[178.62802 73.18486 93.546875]\n", 2252 | "short hold short\n", 2253 | "[159.794 58.959225 58.96963 ]\n", 2254 | "short hold short\n", 2255 | "[165.666 54.208546 70.57891 ]\n", 2256 | "short hold short\n", 2257 | "[159.12422 56.48235 74.87959]\n", 2258 | "short hold short\n", 2259 | "[168.45114 65.5666 86.12273]\n", 2260 | "short hold short\n", 2261 | "[168.44589 65.56682 86.132996]\n", 2262 | "short hold short\n", 2263 | "[172.34906 71.91149 75.62443]\n", 2264 | "short hold short\n", 2265 | "[172.12033 63.96967 89.69731]\n", 2266 | "short hold short\n", 2267 | "[162.93468 62.01401 94.11188]\n", 2268 | "short hold short\n", 2269 | "[165.4829 63.651577 93.8569 ]\n", 2270 | "short hold short\n", 2271 | "[169.24405 71.02155 76.33291]\n", 2272 | "short hold short\n", 2273 | "[179.26935 75.55792 70.59808]\n", 2274 | "short hold short\n", 2275 | "[180.65024 77.08581 71.5354 ]\n", 2276 | "short hold short\n", 2277 | "[182.45482 78.69057 73.38895]\n", 2278 | "short hold short\n", 2279 | "[177.23976 71.02605 85.95532]\n", 2280 | "short hold short\n", 2281 | "[168.89146 73.21237 95.107445]\n", 2282 | "short hold short\n", 2283 | "[186.36089 98.989075 88.8537 ]\n", 2284 | "short hold short\n", 2285 | "[193.47835 101.12384 91.689896]\n", 2286 | "short hold short\n", 2287 | "[187.68799 88.387856 97.8687 ]\n", 2288 | "short hold short\n", 2289 | "[185.15584 95.54473 90.5137 ]\n", 2290 | "short hold short\n", 2291 | "[186.28528 86.14055 101.57761]\n", 2292 | "short hold short\n", 2293 | "[180.36739 74.63474 91.23816]\n", 2294 | "short hold short\n", 2295 | "[155.67416 48.391186 75.56864 ]\n", 2296 | "short hold short\n", 2297 | "[154.53671 48.764362 74.09015 ]\n", 2298 | "short hold short\n", 2299 | "[153.91579 52.38991 79.922455]\n", 2300 | "short hold short\n", 2301 | "[169.30139 71.10319 76.35526]\n", 2302 | "short hold short\n", 2303 | "[179.14769 75.35431 71.06821]\n", 2304 | "short hold short\n", 2305 | "[180.49466 75.69875 70.72597]\n", 2306 | "short hold short\n", 2307 | "[180.5492 76.05523 70.08455]\n", 2308 | "short hold short\n", 2309 | "[175.84596 67.9365 83.558235]\n", 2310 | "short hold short\n", 2311 | "[169.74153 61.2653 79.6068 ]\n", 2312 | "short hold short\n", 2313 | "[156.87239 54.50671 72.27462]\n", 2314 | "short hold short\n", 2315 | "[169.72667 61.30875 79.67407]\n", 2316 | "short hold short\n", 2317 | "[157.06018 48.670856 68.84162 ]\n", 2318 | "short hold short\n", 2319 | "[156.18802 50.174953 65.909485]\n", 2320 | "short hold short\n", 2321 | "[157.0652 48.66138 68.87653]\n", 2322 | "short hold short\n", 2323 | "[154.35808 52.502796 75.15318 ]\n", 2324 | "short hold short\n" 2325 | ] 2326 | }, 2327 | { 2328 | "name": "stdout", 2329 | "output_type": "stream", 2330 | "text": [ 2331 | "[167.04816 59.01972 83.249054]\n", 2332 | "short hold short\n", 2333 | "[154.31606 52.57478 75.35315]\n", 2334 | "short hold short\n", 2335 | "[165.79558 63.61336 90.09068]\n", 2336 | "short hold short\n", 2337 | "[165.79558 63.61336 90.09068]\n", 2338 | "short hold short\n", 2339 | "[165.79558 63.61336 90.09068]\n", 2340 | "short hold short\n", 2341 | "[166.897 65.37261 87.18835]\n", 2342 | "short hold short\n", 2343 | "[167.58887 64.39864 89.06248]\n", 2344 | "short hold short\n", 2345 | "[166.25346 63.981724 89.53315 ]\n", 2346 | "short hold short\n", 2347 | "[166.25346 63.981724 89.53315 ]\n", 2348 | "short hold short\n", 2349 | "[165.1693 62.225018 92.4371 ]\n", 2350 | "short hold short\n", 2351 | "[164.65082 63.48142 90.09818]\n", 2352 | "short hold short\n", 2353 | "[165.1693 62.225018 92.4371 ]\n", 2354 | "short hold short\n", 2355 | "[163.56665 61.724735 93.00193 ]\n", 2356 | "short hold short\n", 2357 | "[163.59634 61.63789 92.867645]\n", 2358 | "short hold short\n", 2359 | "[164.13033 59.122166 89.27115 ]\n", 2360 | "short hold short\n", 2361 | "[157.40285 55.707104 84.794106]\n", 2362 | "short hold short\n", 2363 | "[169.41638 71.23657 76.17438]\n", 2364 | "short hold short\n", 2365 | "[179.38663 75.698 70.491486]\n", 2366 | "short hold short\n", 2367 | "[175.85216 67.90028 83.637436]\n", 2368 | "short hold short\n", 2369 | "[168.3091 65.55082 86.28715]\n", 2370 | "short hold short\n", 2371 | "[162.27873 55.781315 102.43849 ]\n", 2372 | "short hold short\n", 2373 | "[154.72559 50.027477 97.30118 ]\n", 2374 | "short hold short\n", 2375 | "[151.44528 51.078487 67.443146]\n", 2376 | "short hold short\n", 2377 | "[159.20367 51.360386 71.659744]\n", 2378 | "short hold short\n", 2379 | "[158.82802 52.580326 68.894066]\n", 2380 | "short hold short\n", 2381 | "[154.06914 42.947826 85.91899 ]\n", 2382 | "short hold short\n", 2383 | "[151.4496 51.06506 67.46033]\n", 2384 | "short hold short\n", 2385 | "[160.12216 52.839077 69.16165 ]\n", 2386 | "short hold short\n", 2387 | "[160.38828 52.88165 69.17541]\n", 2388 | "short hold short\n", 2389 | "[160.33394 52.635883 69.0825 ]\n", 2390 | "short hold short\n", 2391 | "[158.72766 55.959713 74.51587 ]\n", 2392 | "short hold short\n", 2393 | "[162.50229 55.717533 102.52621 ]\n", 2394 | "short hold short\n", 2395 | "[154.72902 50.634785 98.337135]\n", 2396 | "short hold short\n", 2397 | "[147.34178 42.798122 86.433075]\n", 2398 | "short hold short\n", 2399 | "[139.57462 31.286669 100.818924]\n", 2400 | "short hold short\n", 2401 | "[130.94498 29.388384 98.94511 ]\n", 2402 | "short hold short\n", 2403 | "[129.54343 27.31605 101.321976]\n", 2404 | "short hold short\n", 2405 | "[141.19601 48.56084 64.47519]\n", 2406 | "short hold short\n", 2407 | "[158.8199 56.05534 74.16466]\n", 2408 | "short hold short\n", 2409 | "[162.61084 55.843708 102.02441 ]\n", 2410 | "short hold short\n", 2411 | "[159.88417 63.493336 85.81148 ]\n", 2412 | "short hold short\n", 2413 | "[168.41113 66.253334 86.899864]\n", 2414 | "short hold short\n", 2415 | "[169.93372 68.98767 88.88835]\n", 2416 | "short hold short\n", 2417 | "[173.56766 66.995026 83.10725 ]\n", 2418 | "short hold short\n", 2419 | "[161.68141 55.80321 73.23861]\n", 2420 | "short hold short\n", 2421 | "[145.23557 27.752443 125.90727 ]\n", 2422 | "short hold short\n", 2423 | "[126.11165 32.79005 105.26581]\n", 2424 | "short hold short\n", 2425 | "[133.03505 32.612774 108.268166]\n", 2426 | "short hold short\n", 2427 | "[130.95447 34.56912 111.65502]\n", 2428 | "short hold short\n", 2429 | "[136.61998 40.951588 121.19361 ]\n", 2430 | "short hold short\n", 2431 | "[140.17708 38.62102 117.02613]\n", 2432 | "short hold short\n", 2433 | "[127.65497 26.02775 104.22496]\n", 2434 | "short hold short\n", 2435 | "[125.670166 25.016253 105.09334 ]\n", 2436 | "short hold short\n", 2437 | "[125.06255 24.89274 104.98104]\n", 2438 | "short hold short\n", 2439 | "[125.11355 24.771547 104.74375 ]\n", 2440 | "short hold short\n", 2441 | "[124.50689 25.223337 105.49788 ]\n", 2442 | "short hold short\n", 2443 | "[126.788765 26.527254 107.29895 ]\n", 2444 | "short hold short\n", 2445 | "[125.118 24.78148 104.74247]\n", 2446 | "short hold short\n", 2447 | "[124.5812 25.130716 105.154045]\n", 2448 | "short hold short\n", 2449 | "[126.02524 27.521265 108.794235]\n", 2450 | "short hold short\n", 2451 | "[142.73093 53.220676 71.436615]\n", 2452 | "short hold short\n", 2453 | "[157.44678 47.530605 92.31715 ]\n", 2454 | "short hold short\n", 2455 | "[154.82709 55.647854 73.85862 ]\n", 2456 | "short hold short\n", 2457 | "[168.49821 65.82922 61.37914]\n", 2458 | "short hold short\n", 2459 | "[174.24191 66.13507 62.357227]\n", 2460 | "short hold short\n", 2461 | "[168.82332 63.4381 59.68778]\n", 2462 | "short hold short\n", 2463 | "[171.8645 64.98039 61.99641]\n", 2464 | "short hold short\n", 2465 | "[171.63976 64.92888 61.894672]\n", 2466 | "short hold short\n", 2467 | "[171.38585 64.338 61.263927]\n", 2468 | "short hold short\n", 2469 | "[169.32268 63.992687 60.91959 ]\n", 2470 | "short hold short\n", 2471 | "[174.37244 66.384346 64.96037 ]\n", 2472 | "short hold short\n", 2473 | "[174.48094 68.41718 61.959118]\n", 2474 | "short hold short\n", 2475 | "[175.66626 68.15554 62.032322]\n", 2476 | "short hold short\n", 2477 | "[170.12712 56.4491 74.452034]\n", 2478 | "short hold short\n", 2479 | "[161.72415 53.906353 71.49443 ]\n", 2480 | "short hold short\n", 2481 | "[158.39183 55.59637 74.615776]\n", 2482 | "short hold short\n", 2483 | "[169.44647 61.405087 80.90839 ]\n", 2484 | "short hold short\n", 2485 | "[158.60133 50.2094 71.55163]\n", 2486 | "short hold short\n", 2487 | "[156.99487 50.019 71.463295]\n", 2488 | "short hold short\n", 2489 | "[157.41873 50.135807 71.555336]\n", 2490 | "short hold short\n", 2491 | "[155.27223 54.08517 78.13385]\n", 2492 | "short hold short\n", 2493 | "[162.755 58.380688 104.709755]\n", 2494 | "short hold short\n", 2495 | "[157.32187 52.049015 99.51462 ]\n", 2496 | "short hold short\n", 2497 | "[145.98541 40.98586 83.24218]\n", 2498 | "short hold short\n", 2499 | "[143.9766 44.106464 88.52661 ]\n", 2500 | "short hold short\n", 2501 | "[154.09808 53.67185 102.06382]\n", 2502 | "short hold short\n", 2503 | "[154.01323 53.59714 102.57503]\n", 2504 | "short hold short\n", 2505 | "[153.1857 52.197132 104.660484]\n", 2506 | "short hold short\n", 2507 | "[151.65973 52.572483 105.45832 ]\n", 2508 | "short hold short\n", 2509 | "[153.1315 53.797848 108.506645]\n", 2510 | "short hold short\n", 2511 | "[146.73135 43.83621 125.20247]\n", 2512 | "short hold short\n", 2513 | "[137.28896 40.460243 126.984184]\n", 2514 | "short hold short\n", 2515 | "[136.37422 41.419178 129.2562 ]\n", 2516 | "short hold short\n", 2517 | "[150.12448 62.916424 97.989494]\n", 2518 | "short hold short\n", 2519 | "[167.06229 67.159 95.88994]\n", 2520 | "short hold short\n", 2521 | "[173.44153 77.02921 79.6321 ]\n", 2522 | "short hold short\n", 2523 | "[184.03442 83.3243 72.81206]\n", 2524 | "short hold short\n", 2525 | "[186.10565 83.8351 73.70334]\n", 2526 | "short hold short\n", 2527 | "[187.1451 78.20723 65.59938]\n", 2528 | "short hold short\n", 2529 | "[172.02666 64.01541 63.32809]\n", 2530 | "short hold short\n", 2531 | "[170.95895 64.27482 63.44103]\n", 2532 | "short hold short\n", 2533 | "[169.90016 58.751896 76.43016 ]\n", 2534 | "short hold short\n", 2535 | "[163.48068 57.07346 75.91828]\n", 2536 | "short hold short\n", 2537 | "[157.08052 47.11191 92.61431]\n", 2538 | "short hold short\n", 2539 | "[147.3179 43.55827 93.93674]\n", 2540 | "short hold short\n", 2541 | "[146.84642 45.01929 90.6142 ]\n", 2542 | "short hold short\n", 2543 | "[146.1279 51.83605 101.57445]\n", 2544 | "short hold short\n", 2545 | "[163.609 70.7264 118.792946]\n", 2546 | "short hold short\n", 2547 | "[168.72876 64.396706 106.29529 ]\n", 2548 | "short hold short\n", 2549 | "[144.3343 39.02666 87.10335]\n", 2550 | "short hold short\n", 2551 | "[141.2731 42.982456 93.81256 ]\n", 2552 | "short hold short\n", 2553 | "[152.97333 53.01141 108.32593]\n", 2554 | "short hold short\n", 2555 | "[151.93196 52.7693 102.851295]\n", 2556 | "short hold short\n", 2557 | "[154.76543 49.46008 97.24514]\n", 2558 | "short hold short\n", 2559 | "[143.83124 43.952152 89.39969 ]\n", 2560 | "short hold short\n", 2561 | "[154.47676 50.21027 98.606636]\n", 2562 | "short hold short\n", 2563 | "[147.15932 42.271046 86.36038 ]\n", 2564 | "short hold short\n", 2565 | "[151.15579 50.216473 66.74337 ]\n", 2566 | "short hold short\n", 2567 | "[159.99701 52.39986 67.86976]\n", 2568 | "short hold short\n", 2569 | "[160.17148 52.052044 68.549095]\n", 2570 | "short hold short\n", 2571 | "[153.79703 42.088184 85.222176]\n", 2572 | "short hold short\n", 2573 | "[151.17734 50.205463 66.763466]\n", 2574 | "short hold short\n", 2575 | "[159.97078 52.38518 67.89528]\n", 2576 | "short hold short\n", 2577 | "[162.59912 62.267437 55.02203 ]\n", 2578 | "short hold short\n", 2579 | "[169.75105 64.18115 57.87086]\n", 2580 | "short hold short\n", 2581 | "[171.95963 69.080826 63.101765]\n", 2582 | "short hold short\n", 2583 | "[182.88327 79.47286 69.977295]\n", 2584 | "short hold short\n", 2585 | "[185.58337 75.79123 62.717594]\n", 2586 | "short hold short\n", 2587 | "[164.68527 52.269962 68.615616]\n", 2588 | "short hold short\n", 2589 | "[159.95657 60.288822 52.920353]\n", 2590 | "short hold short\n", 2591 | "[164.75217 52.27071 68.66939]\n", 2592 | "short hold short\n", 2593 | "[157.51237 50.039387 66.54268 ]\n", 2594 | "short hold short\n", 2595 | "[152.4836 39.95799 82.028244]\n", 2596 | "short hold short\n", 2597 | "[149.80148 48.08066 63.624493]\n", 2598 | "short hold short\n", 2599 | "[157.31166 50.372433 65.88911 ]\n", 2600 | "short hold short\n", 2601 | "[159.9402 60.254925 53.015675]\n", 2602 | "short hold short\n", 2603 | "[167.29451 62.608097 56.323627]\n", 2604 | "short hold short\n", 2605 | "[169.79568 64.19648 57.82575]\n", 2606 | "short hold short\n", 2607 | "[170.31673 64.5252 58.055134]\n", 2608 | "short hold short\n", 2609 | "[170.31926 64.51876 58.086826]\n", 2610 | "short hold short\n", 2611 | "[170.27017 64.406235 57.93761 ]\n", 2612 | "short hold short\n", 2613 | "[170.07014 64.822525 58.33279 ]\n", 2614 | "short hold short\n", 2615 | "[170.66199 56.8848 73.40666]\n", 2616 | "short hold short\n", 2617 | "[166.10721 64.88057 57.52097]\n", 2618 | "short hold short\n", 2619 | "[170.66199 56.8848 73.40666]\n", 2620 | "short hold short\n", 2621 | "[166.13818 64.88559 57.530476]\n", 2622 | "short hold short\n", 2623 | "[170.75269 56.88332 73.439354]\n", 2624 | "short hold short\n", 2625 | "[162.17146 54.769444 72.49665 ]\n", 2626 | "short hold short\n", 2627 | "[155.77133 44.807987 89.19255 ]\n", 2628 | "short hold short\n", 2629 | "[147.32344 42.393375 86.44531 ]\n", 2630 | "short hold short\n", 2631 | "[145.85165 41.168102 83.396935]\n", 2632 | "short hold short\n", 2633 | "[152.25182 51.12956 66.70106]\n", 2634 | "short hold short\n", 2635 | "[163.24773 62.710804 55.41843 ]\n", 2636 | "short hold short\n", 2637 | "[168.00739 54.69701 71.12328]\n", 2638 | "short hold short\n", 2639 | "[162.75706 61.255573 57.26636 ]\n", 2640 | "short hold short\n", 2641 | "[168.61243 62.216053 58.767025]\n", 2642 | "short hold short\n", 2643 | "[159.86897 41.954235 83.09194 ]\n", 2644 | "short hold short\n", 2645 | "[150.41417 48.803066 63.12129 ]\n", 2646 | "short hold short\n", 2647 | "[157.38158 49.09448 68.04429]\n", 2648 | "short hold short\n", 2649 | "[158.66609 59.022335 54.08708 ]\n", 2650 | "short hold short\n", 2651 | "[166.16934 61.10532 57.09891]\n", 2652 | "short hold short\n", 2653 | "[166.94945 61.420063 57.42268 ]\n", 2654 | "short hold short\n" 2655 | ] 2656 | }, 2657 | { 2658 | "name": "stdout", 2659 | "output_type": "stream", 2660 | "text": [ 2661 | "[166.40063 61.62373 57.63448]\n", 2662 | "short hold short\n", 2663 | "[169.41092 63.16119 59.93352]\n", 2664 | "short hold short\n", 2665 | "[168.86823 61.595158 61.841526]\n", 2666 | "short hold short\n", 2667 | "[168.02298 61.910976 62.038586]\n", 2668 | "short hold short\n", 2669 | "[171.5593 66.649956 59.488277]\n", 2670 | "short hold short\n", 2671 | "[172.77196 63.94933 64.65063]\n", 2672 | "short hold short\n", 2673 | "[170.59468 63.373943 63.545574]\n", 2674 | "short hold short\n", 2675 | "[170.07927 62.453625 64.28111 ]\n", 2676 | "short hold short\n", 2677 | "[167.3524 56.27856 72.95974]\n", 2678 | "short hold short\n", 2679 | "[165.73604 63.727757 59.091686]\n", 2680 | "short hold short\n", 2681 | "[171.70488 64.60334 60.747967]\n", 2682 | "short hold short\n", 2683 | "[168.14482 60.91402 61.27728]\n", 2684 | "short hold short\n", 2685 | "[167.08066 61.173664 61.393238]\n", 2686 | "short hold short\n", 2687 | "[170.00932 63.44131 63.695545]\n", 2688 | "short hold short\n", 2689 | "[172.81758 64.574875 64.86131 ]\n", 2690 | "short hold short\n", 2691 | "[167.66948 55.922543 72.40688 ]\n", 2692 | "short hold short\n", 2693 | "[162.07716 54.0853 70.22604]\n", 2694 | "short hold short\n", 2695 | "[159.2735 50.683887 70.865845]\n", 2696 | "short hold short\n", 2697 | "[157.66565 50.496403 70.80263 ]\n", 2698 | "short hold short\n", 2699 | "[161.59569 60.99316 56.7008 ]\n", 2700 | "short hold short\n", 2701 | "[168.90884 62.818165 59.611546]\n", 2702 | "short hold short\n", 2703 | "[168.86327 62.70605 59.465496]\n", 2704 | "short hold short\n", 2705 | "[166.39412 54.041363 70.19533 ]\n", 2706 | "short hold short\n", 2707 | "[159.4171 50.691196 70.74339 ]\n", 2708 | "short hold short\n", 2709 | "[158.94551 52.152256 67.420845]\n", 2710 | "short hold short\n", 2711 | "[160.23672 53.2412 68.988495]\n", 2712 | "short hold short\n", 2713 | "[161.2901 58.047245 76.50974 ]\n", 2714 | "short hold short\n", 2715 | "short buy flat\n", 2716 | "[23.140882 43.155216 54.37528 ]\n", 2717 | "flat sell short\n", 2718 | "[168.52663 66.38586 87.35989]\n", 2719 | "short hold short\n", 2720 | "[170.94206 67.949684 87.0864 ]\n", 2721 | "short hold short\n", 2722 | "[168.89809 65.30159 85.68077]\n", 2723 | "short hold short\n", 2724 | "[167.79514 65.17051 86.52611]\n", 2725 | "short hold short\n", 2726 | "[170.21078 66.73435 86.25245]\n", 2727 | "short hold short\n", 2728 | "[167.79514 65.17051 86.52611]\n", 2729 | "short hold short\n", 2730 | "[173.87444 74.03692 76.644516]\n", 2731 | "short hold short\n", 2732 | "[179.67433 76.569176 75.367645]\n", 2733 | "short hold short\n", 2734 | "[182.2486 79.85653 73.675354]\n", 2735 | "short hold short\n", 2736 | "[185.21744 75.493965 65.83887 ]\n", 2737 | "short hold short\n", 2738 | "[168.3231 62.687588 58.987263]\n", 2739 | "short hold short\n", 2740 | "[168.91805 63.491352 59.762188]\n", 2741 | "short hold short\n", 2742 | "[171.89731 65.023796 62.05189 ]\n", 2743 | "short hold short\n", 2744 | "[171.38069 63.472363 63.934467]\n", 2745 | "short hold short\n", 2746 | "[170.7618 65.91463 66.81252]\n", 2747 | "short hold short\n", 2748 | "[179.45198 75.45969 71.00194]\n", 2749 | "short hold short\n", 2750 | "[181.80202 72.238235 64.97659 ]\n", 2751 | "short hold short\n", 2752 | "[167.90068 60.85245 61.463924]\n", 2753 | "short hold short\n", 2754 | "[166.84534 60.68987 61.169514]\n", 2755 | "short hold short\n", 2756 | "[167.77377 62.544613 59.44282 ]\n", 2757 | "short hold short\n", 2758 | "[167.02095 54.45564 71.04416]\n", 2759 | "short hold short\n", 2760 | "[154.44792 42.98287 85.90623]\n", 2761 | "short hold short\n", 2762 | "[145.8192 41.082386 84.01359 ]\n", 2763 | "short hold short\n", 2764 | "[145.2174 41.543446 84.75975 ]\n", 2765 | "short hold short\n", 2766 | "[147.56897 42.744686 86.21849 ]\n", 2767 | "short hold short\n", 2768 | "[145.51227 40.799618 83.36517 ]\n", 2769 | "short hold short\n", 2770 | "[145.70758 40.243137 82.44698 ]\n", 2771 | "short hold short\n", 2772 | "[144.02052 39.388287 81.337494]\n", 2773 | "short hold short\n", 2774 | "[145.67757 40.328625 82.58734 ]\n", 2775 | "short hold short\n", 2776 | "[144.53548 39.33137 80.54126]\n", 2777 | "short hold short\n", 2778 | "[144.76947 39.46565 80.407585]\n", 2779 | "short hold short\n", 2780 | "[143.41689 43.586246 87.14554 ]\n", 2781 | "short hold short\n", 2782 | "[155.81387 49.84274 95.68936]\n", 2783 | "short hold short\n", 2784 | "[144.6724 39.935055 81.30136 ]\n", 2785 | "short hold short\n", 2786 | "[146.11925 40.67838 82.135284]\n", 2787 | "short hold short\n", 2788 | "[150.72786 49.077206 64.16376 ]\n", 2789 | "short hold short\n", 2790 | "[158.2352 51.18919 66.26454]\n", 2791 | "short hold short\n", 2792 | "[160.27351 59.299145 55.631145]\n", 2793 | "short hold short\n", 2794 | "[166.12717 60.7784 57.69798]\n", 2795 | "short hold short\n", 2796 | "short buy flat\n", 2797 | "[-5.0042443 22.873705 63.17316 ]\n", 2798 | "flat sell short\n", 2799 | "[166.1166 61.01202 57.515003]\n", 2800 | "short hold short\n", 2801 | "[166.37686 61.05846 57.510006]\n", 2802 | "short hold short\n", 2803 | "[166.52214 61.56612 58.038685]\n", 2804 | "short hold short\n", 2805 | "[169.39412 63.770634 59.7777 ]\n", 2806 | "short hold short\n", 2807 | "[171.39626 63.37283 63.697674]\n", 2808 | "short hold short\n", 2809 | "[169.8937 62.318974 64.14016 ]\n", 2810 | "short hold short\n", 2811 | "[167.33633 56.1527 72.77967]\n", 2812 | "short hold short\n", 2813 | "[165.43134 63.24786 59.442707]\n", 2814 | "short hold short\n", 2815 | "[171.17537 63.280254 63.731014]\n", 2816 | "short hold short\n", 2817 | "[169.75589 62.28706 62.555813]\n", 2818 | "short hold short\n", 2819 | "[167.21791 61.75224 62.011044]\n", 2820 | "short hold short\n", 2821 | "[173.31447 66.68504 63.44875]\n", 2822 | "short hold short\n", 2823 | "[174.79944 69.13045 66.550316]\n", 2824 | "short hold short\n", 2825 | "[181.16367 76.16861 69.492905]\n", 2826 | "short hold short\n", 2827 | "[181.1774 77.273796 70.75447 ]\n", 2828 | "short hold short\n", 2829 | "[183.02097 80.82377 73.50751]\n", 2830 | "short hold short\n", 2831 | "[183.733 80.11382 75.99997]\n", 2832 | "short hold short\n", 2833 | "[178.11235 73.07772 87.37484]\n", 2834 | "short hold short\n", 2835 | "[171.05574 69.44821 92.40048]\n", 2836 | "short hold short\n", 2837 | "[175.47646 78.707085 76.83326 ]\n", 2838 | "short hold short\n", 2839 | "[185.86534 77.14945 66.97844]\n", 2840 | "short hold short\n", 2841 | "[169.15117 56.52283 73.14403]\n", 2842 | "short hold short\n", 2843 | "[155.95993 45.14652 88.545616]\n", 2844 | "short hold short\n", 2845 | "[146.19746 41.5928 89.86813]\n", 2846 | "short hold short\n", 2847 | "[143.7283 39.790066 92.077484]\n", 2848 | "short hold short\n", 2849 | "[148.48058 49.414677 75.05966 ]\n", 2850 | "short hold short\n", 2851 | "[157.4236 50.418552 75.49209 ]\n", 2852 | "short hold short\n", 2853 | "[155.1414 49.115322 73.69726 ]\n", 2854 | "short hold short\n", 2855 | "[162.54158 62.2524 58.004986]\n", 2856 | "short hold short\n", 2857 | "[170.72266 63.775967 60.69015 ]\n", 2858 | "short hold short\n", 2859 | "[168.11879 62.23347 59.103886]\n", 2860 | "short hold short\n", 2861 | "[169.88528 66.58671 63.683025]\n", 2862 | "short hold short\n", 2863 | "[174.85742 65.854836 89.36726 ]\n", 2864 | "short hold short\n", 2865 | "[164.39417 63.50162 94.070854]\n", 2866 | "short hold short\n", 2867 | "[168.17615 61.070972 87.62937 ]\n", 2868 | "short hold short\n", 2869 | "[155.20773 49.407925 74.076645]\n", 2870 | "short hold short\n", 2871 | "[159.43529 54.64105 71.42923]\n", 2872 | "short hold short\n", 2873 | "[156.17838 45.256397 88.82225 ]\n", 2874 | "short hold short\n", 2875 | "[147.73051 42.841778 86.075066]\n", 2876 | "short hold short\n", 2877 | "[144.41112 45.79582 91.20889]\n", 2878 | "short hold short\n", 2879 | "[153.6725 66.0425 121.55567]\n", 2880 | "short hold short\n", 2881 | "[183.60738 85.13608 122.95588]\n", 2882 | "short hold short\n", 2883 | "[153.6725 66.0425 121.55567]\n", 2884 | "short hold short\n", 2885 | "[183.43234 95.36236 140.40071]\n", 2886 | "short hold short\n", 2887 | "[183.6285 83.85326 120.78657]\n", 2888 | "short hold short\n", 2889 | "[154.15593 53.587887 102.447426]\n", 2890 | "short hold short\n", 2891 | "[151.15617 62.138058 116.47584 ]\n", 2892 | "short hold short\n", 2893 | "[179.72354 80.08478 118.19498]\n", 2894 | "short hold short\n", 2895 | "[151.26073 61.83945 115.991196]\n", 2896 | "short hold short\n", 2897 | "[178.6409 78.67938 116.81523]\n", 2898 | "short hold short\n", 2899 | "[153.36223 52.837788 101.30476 ]\n", 2900 | "short hold short\n", 2901 | "[151.15617 62.138058 116.47584 ]\n", 2902 | "short hold short\n", 2903 | "[179.53282 91.23153 137.20976]\n", 2904 | "short hold short\n", 2905 | "[182.35811 93.02264 137.52382]\n", 2906 | "short hold short\n", 2907 | "[179.63614 85.19786 126.91745]\n", 2908 | "short hold short\n", 2909 | "[166.06454 65.74508 109.89219]\n", 2910 | "short hold short\n", 2911 | "[159.52031 62.42976 84.05631]\n", 2912 | "short hold short\n", 2913 | "[173.06184 72.33726 71.802956]\n", 2914 | "short hold short\n", 2915 | "[180.1377 75.45977 70.32396]\n", 2916 | "short hold short\n", 2917 | "[177.31857 98.8416 102.81792]\n", 2918 | "short hold short\n", 2919 | "[206.31624 103.36811 80.93634]\n", 2920 | "short hold short\n", 2921 | "[182.12045 72.97627 65.5027 ]\n", 2922 | "short hold short\n", 2923 | "[171.7403 64.959404 61.831745]\n", 2924 | "short hold short\n", 2925 | "[171.48299 64.36817 61.197987]\n", 2926 | "short hold short\n", 2927 | "[170.34966 66.222084 63.171803]\n", 2928 | "short hold short\n", 2929 | "[175.2071 66.39409 85.70293]\n", 2930 | "short hold short\n", 2931 | "[166.38434 64.33637 89.63006]\n", 2932 | "short hold short\n", 2933 | "[167.78766 66.94056 91.56649]\n", 2934 | "short hold short\n", 2935 | "[168.85168 67.52846 95.40567]\n", 2936 | "short hold short\n", 2937 | "[168.33331 68.78475 93.066826]\n", 2938 | "short hold short\n", 2939 | "[168.85168 67.52846 95.40567]\n", 2940 | "short hold short\n", 2941 | "[168.33331 68.78475 93.066826]\n", 2942 | "short hold short\n", 2943 | "[168.85168 67.52846 95.40567]\n", 2944 | "short hold short\n", 2945 | "[168.33331 68.78475 93.066826]\n", 2946 | "short hold short\n", 2947 | "[168.85168 67.52846 95.40567]\n", 2948 | "short hold short\n", 2949 | "[168.7349 62.69102 89.25404]\n", 2950 | "short hold short\n", 2951 | "[157.41766 50.41138 75.518715]\n", 2952 | "short hold short\n", 2953 | "[155.3002 48.6387 72.95856]\n", 2954 | "short hold short\n", 2955 | "[154.54063 52.587193 79.25951 ]\n", 2956 | "short hold short\n", 2957 | "[164.80304 62.92776 89.771286]\n", 2958 | "short hold short\n", 2959 | "[165.91571 63.995304 90.30797 ]\n", 2960 | "short hold short\n", 2961 | "[168.78989 67.7057 88.18363]\n", 2962 | "short hold short\n", 2963 | "[170.12494 68.98655 88.82773]\n", 2964 | "short hold short\n", 2965 | "[173.98091 66.33484 82.061516]\n", 2966 | "short hold short\n", 2967 | "[155.40012 70.964294 97.27021 ]\n", 2968 | "short hold short\n", 2969 | "[189.86165 126.079895 151.67236 ]\n", 2970 | "short hold short\n", 2971 | "[219.8441 164.11435 163.96815]\n", 2972 | "short hold short\n", 2973 | "[221.7111 171.26978 166.86113]\n", 2974 | "short hold short\n", 2975 | "[227.10318 137.67169 138.5878 ]\n", 2976 | "short hold short\n", 2977 | "[195.80908 110.37558 121.67374]\n", 2978 | "short hold short\n", 2979 | "[195.91832 110.57573 121.574875]\n", 2980 | "short hold short\n", 2981 | "[195.12044 134.81479 160.37212]\n", 2982 | "short hold short\n", 2983 | "[224.71751 177.01968 166.40384]\n", 2984 | "short hold short\n", 2985 | "[228.33853 192.1598 159.19775]\n", 2986 | "short hold short\n", 2987 | "[236.61661 130.2703 90.97572]\n", 2988 | "short hold short\n", 2989 | "[168.78366 62.803165 59.656788]\n", 2990 | "short hold short\n" 2991 | ] 2992 | }, 2993 | { 2994 | "name": "stdout", 2995 | "output_type": "stream", 2996 | "text": [ 2997 | "[166.41315 52.607372 73.16764 ]\n", 2998 | "short hold short\n", 2999 | "[156.6066 54.3281 77.108986]\n", 3000 | "short hold short\n", 3001 | "[167.06894 65.08687 86.538414]\n", 3002 | "short hold short\n", 3003 | "[168.40417 66.36788 87.182495]\n", 3004 | "short hold short\n", 3005 | "[170.81972 67.931656 86.90883 ]\n", 3006 | "short hold short\n", 3007 | "[168.40417 66.36788 87.182495]\n", 3008 | "short hold short\n", 3009 | "[170.81972 67.931656 86.90883 ]\n", 3010 | "short hold short\n", 3011 | "[168.40417 66.36788 87.182495]\n", 3012 | "short hold short\n", 3013 | "[175.63704 77.00187 74.40277]\n", 3014 | "short hold short\n", 3015 | "[178.08209 71.08764 85.407745]\n", 3016 | "short hold short\n", 3017 | "[172.0064 64.389725 81.36218 ]\n", 3018 | "short hold short\n", 3019 | "[160.44707 52.897114 68.83937 ]\n", 3020 | "short hold short\n", 3021 | "[160.39922 52.876163 68.847145]\n", 3022 | "short hold short\n", 3023 | "[160.46445 52.89931 68.84243]\n", 3024 | "short hold short\n", 3025 | "[160.44409 52.877033 68.876144]\n", 3026 | "short hold short\n", 3027 | "[160.51692 52.98859 68.64249]\n", 3028 | "short hold short\n", 3029 | "[160.6642 53.105335 68.49182 ]\n", 3030 | "short hold short\n", 3031 | "[159.52184 56.62662 74.24155]\n", 3032 | "short hold short\n", 3033 | "[170.17166 62.26952 80.1446 ]\n", 3034 | "short hold short\n", 3035 | "short hold short\n", 3036 | "[166.39679 52.392986 73.554115]\n", 3037 | "short hold short\n", 3038 | "[156.25208 54.072292 77.48211 ]\n", 3039 | "short hold short\n", 3040 | "short hold short\n", 3041 | "[108.64814 -31.786577 247.26804 ]\n", 3042 | "short hold short\n", 3043 | "[ 64.385506 1.4627783 281.7191 ]\n", 3044 | "short hold short\n", 3045 | "[ 53.951736 -2.6513336 268.35233 ]\n", 3046 | "short hold short\n", 3047 | "[ 52.954483 -0.39270192 272.65646 ]\n", 3048 | "short hold short\n", 3049 | "[102.27275 60.820248 124.36014 ]\n", 3050 | "short hold short\n", 3051 | "[170.68521 66.6092 63.51276]\n", 3052 | "short hold short\n", 3053 | "[180.75981 75.6459 70.70584]\n", 3054 | "short hold short\n", 3055 | "[114.66097 -32.25659 249.78726]\n", 3056 | "short hold short\n", 3057 | "[ 62.432922 6.2968597 290.13235 ]\n", 3058 | "short hold short\n", 3059 | "[102.14485 60.514435 124.84508 ]\n", 3060 | "short hold short\n", 3061 | "[170.2287 69.9489 69.01759]\n", 3062 | "short hold short\n", 3063 | "[184.67758 81.318794 73.80643 ]\n", 3064 | "short hold short\n", 3065 | "[182.94153 78.19799 71.68086]\n", 3066 | "short hold short\n", 3067 | "[114.64743 -32.275726 249.83899 ]\n", 3068 | "short hold short\n", 3069 | "[ 61.04765 10.740961 289.6332 ]\n", 3070 | "short hold short\n", 3071 | "[ 61.44105 8.384211 288.00055 ]\n", 3072 | "short hold short\n", 3073 | "[ 62.005127 8.16353 285.54483 ]\n", 3074 | "short hold short\n", 3075 | "[ 62.333797 6.1512356 284.17136 ]\n", 3076 | "short hold short\n", 3077 | "[ 62.33827 6.163126 284.1349 ]\n", 3078 | "short hold short\n", 3079 | "[ 62.333797 6.1512356 284.17136 ]\n", 3080 | "short hold short\n", 3081 | "[110.555214 64.20165 131.7916 ]\n", 3082 | "short hold short\n", 3083 | "[108.66356 -31.768145 247.25659 ]\n", 3084 | "short hold short\n", 3085 | "[ 62.33827 6.163126 284.1349 ]\n", 3086 | "short hold short\n", 3087 | "[ 62.333797 6.1512356 284.17136 ]\n", 3088 | "short hold short\n", 3089 | "[ 62.33827 6.163126 284.1349 ]\n", 3090 | "short hold short\n", 3091 | "[ 62.33994 6.1608963 284.15588 ]\n", 3092 | "short hold short\n", 3093 | "[ 59.74936 11.988857 287.24872 ]\n", 3094 | "short hold short\n", 3095 | "[ 74.70403 11.647476 303.72925 ]\n", 3096 | "short hold short\n", 3097 | "[ 62.38181 6.1276817 284.164 ]\n", 3098 | "short hold short\n", 3099 | "[ 66.311 4.668148 269.61078 ]\n", 3100 | "short hold short\n", 3101 | "[ 74.11615 -5.9437723 248.68808 ]\n", 3102 | "short hold short\n", 3103 | "[ 77.85958 -9.369027 232.91475 ]\n", 3104 | "short hold short\n", 3105 | "[ 84.27335 -3.1382272 219.0586 ]\n", 3106 | "short hold short\n", 3107 | "[ 87.51617 -3.339855 216.65822 ]\n", 3108 | "short hold short\n", 3109 | "[ 87.55011 -3.303829 216.44897 ]\n", 3110 | "short hold short\n", 3111 | "[110.15498 35.36308 147.12949]\n", 3112 | "short hold short\n", 3113 | "[146.86539 63.169464 80.46402 ]\n", 3114 | "short hold short\n", 3115 | "[172.10678 68.529854 81.67113 ]\n", 3116 | "short hold short\n", 3117 | "[172.11078 68.520645 81.68366 ]\n", 3118 | "short hold short\n", 3119 | "[173.57306 71.03233 77.54644]\n", 3120 | "short hold short\n", 3121 | "[177.04808 68.47177 71.63162]\n", 3122 | "short hold short\n", 3123 | "[167.00856 62.7617 68.566795]\n", 3124 | "short hold short\n", 3125 | "[177.09058 68.33015 71.32476]\n", 3126 | "short hold short\n", 3127 | "[166.61926 62.40093 67.57569]\n", 3128 | "short hold short\n", 3129 | "[175.90816 71.80814 76.66525]\n", 3130 | "short hold short\n", 3131 | "[175.9394 71.81057 76.59324]\n", 3132 | "short hold short\n", 3133 | "[175.91371 71.812126 76.64391 ]\n", 3134 | "short hold short\n", 3135 | "[175.93893 71.80625 76.60446]\n", 3136 | "short hold short\n", 3137 | "[175.61092 72.675514 78.0086 ]\n", 3138 | "short hold short\n", 3139 | "[178.32516 74.406906 77.65508 ]\n", 3140 | "short hold short\n", 3141 | "[175.90242 71.80407 76.686745]\n", 3142 | "short hold short\n", 3143 | "[175.93893 71.80625 76.60446]\n", 3144 | "short hold short\n", 3145 | "[ 79.899185 -64.38106 360.10352 ]\n", 3146 | "short hold short\n", 3147 | "[ 55.318752 145.20201 583.11273 ]\n", 3148 | "short buy flat\n", 3149 | "[336.2063 140.88374 335.2074 ]\n", 3150 | "flat hold flat\n", 3151 | "[340.89938 136.23885 328.17172]\n", 3152 | "flat hold flat\n", 3153 | "[334.80637 125.032906 330.38766 ]\n", 3154 | "flat hold flat\n", 3155 | "[338.06924 140.3973 335.49414]\n", 3156 | "flat hold flat\n", 3157 | "[207.04926 237.76852 213.36519]\n", 3158 | "flat buy long\n", 3159 | "[ 82.19382 -63.88122 360.07574]\n", 3160 | "long sell flat\n", 3161 | "[207.1711 237.55055 213.63632]\n", 3162 | "flat buy long\n", 3163 | "[181.81163 72.11943 65.27162]\n", 3164 | "long hold long\n", 3165 | "[170.44536 66.03777 63.35481]\n", 3166 | "long hold long\n", 3167 | "[181.17653 76.24309 69.44786]\n", 3168 | "long hold long\n", 3169 | "[ 82.56648 -63.770607 359.83752 ]\n", 3170 | "long sell flat\n", 3171 | "[342.904 141.85406 336.28955]\n", 3172 | "flat hold flat\n", 3173 | "[341.20428 142.53389 336.17105]\n", 3174 | "flat hold flat\n", 3175 | "[268.07153 172.42711 300.46448]\n", 3176 | "flat sell short\n", 3177 | "[119.14523 70.391365 93.41728 ]\n", 3178 | "short hold short\n", 3179 | "[180.41476 75.499 70.70064]\n", 3180 | "short hold short\n", 3181 | "[180.38397 75.50097 70.76131]\n", 3182 | "short hold short\n", 3183 | "[180.58105 75.8151 70.14769]\n", 3184 | "short hold short\n", 3185 | "[174.83206 66.14983 86.16665]\n", 3186 | "short hold short\n", 3187 | "[171.95204 73.12941 73.17294]\n", 3188 | "short hold short\n", 3189 | "[180.63977 75.610695 70.51581 ]\n", 3190 | "short hold short\n", 3191 | "[175.55106 67.73804 83.47606]\n", 3192 | "short hold short\n", 3193 | "[167.23082 63.57301 89.194016]\n", 3194 | "short hold short\n", 3195 | "[165.44926 63.00838 89.84413]\n", 3196 | "short hold short\n", 3197 | "[166.64264 64.952225 86.66044 ]\n", 3198 | "short hold short\n", 3199 | "[167.21861 63.556293 89.259285]\n", 3200 | "short hold short\n", 3201 | "[166.64264 64.952225 86.66044 ]\n", 3202 | "short hold short\n", 3203 | "[168.59744 65.53587 86.04665]\n", 3204 | "short hold short\n", 3205 | "[168.3518 65.4036 86.22389]\n", 3206 | "short hold short\n", 3207 | "[169.89374 61.21007 79.3947 ]\n", 3208 | "short hold short\n", 3209 | "[157.02905 54.470448 71.9705 ]\n", 3210 | "short hold short\n", 3211 | "[169.87895 61.25337 79.46189]\n", 3212 | "short hold short\n", 3213 | "[157.1433 54.578503 72.12899 ]\n", 3214 | "short hold short\n", 3215 | "[169.86403 61.296825 79.52901 ]\n", 3216 | "short hold short\n", 3217 | "[157.64217 50.590626 66.359604]\n", 3218 | "short hold short\n", 3219 | "[157.48851 50.5212 66.326416]\n", 3220 | "short hold short\n", 3221 | "[157.67764 50.670345 66.44199 ]\n", 3222 | "short hold short\n", 3223 | "[157.83612 50.726788 66.5382 ]\n", 3224 | "short hold short\n", 3225 | "[157.71338 50.75011 66.524254]\n", 3226 | "short hold short\n", 3227 | "[158.18382 50.932568 66.750175]\n", 3228 | "short hold short\n", 3229 | "[157.74893 50.829975 66.606705]\n", 3230 | "short hold short\n", 3231 | "[158.52455 51.13754 66.956 ]\n", 3232 | "short hold short\n", 3233 | "[157.73997 50.815334 66.65767 ]\n", 3234 | "short hold short\n", 3235 | "[158.5156 51.122982 67.00698 ]\n", 3236 | "short hold short\n", 3237 | "[157.73793 50.80164 66.71466]\n", 3238 | "short hold short\n", 3239 | "[157.81035 55.207615 73.17918 ]\n", 3240 | "short hold short\n", 3241 | "[169.89374 61.21007 79.3947 ]\n", 3242 | "short hold short\n", 3243 | "[157.01437 54.512554 72.03427 ]\n", 3244 | "short hold short\n", 3245 | "[168.52164 65.67341 86.18448]\n", 3246 | "short hold short\n", 3247 | "[168.52164 65.67341 86.18448]\n", 3248 | "short hold short\n", 3249 | "[168.52164 65.67341 86.18448]\n", 3250 | "short hold short\n", 3251 | "[168.52164 65.67341 86.18448]\n", 3252 | "short hold short\n", 3253 | "[168.52164 65.67341 86.18448]\n", 3254 | "short hold short\n", 3255 | "[168.52164 65.67341 86.18448]\n", 3256 | "short hold short\n", 3257 | "[168.52164 65.67341 86.18448]\n", 3258 | "short hold short\n", 3259 | "[168.52164 65.67341 86.18448]\n", 3260 | "short hold short\n", 3261 | "[168.52164 65.67341 86.18448]\n", 3262 | "short hold short\n", 3263 | "[168.5365 65.63004 86.117355]\n", 3264 | "short hold short\n", 3265 | "[169.38301 62.680676 81.699646]\n", 3266 | "short hold short\n", 3267 | "[160.9139 58.14472 77.36015]\n", 3268 | "short hold short\n", 3269 | "[169.61392 62.05582 80.61449]\n", 3270 | "short hold short\n", 3271 | "[162.87585 61.2645 57.953625]\n", 3272 | "short hold short\n", 3273 | "[168.80782 62.765278 60.2232 ]\n", 3274 | "short hold short\n", 3275 | "[166.91008 54.62717 70.94311]\n", 3276 | "short hold short\n", 3277 | "[159.26381 51.17792 72.49731]\n", 3278 | "short hold short\n", 3279 | "[156.50026 49.141926 75.008095]\n", 3280 | "short hold short\n", 3281 | "[159.73209 58.84882 59.1452 ]\n", 3282 | "short hold short\n", 3283 | "[167.04314 60.493282 61.706882]\n", 3284 | "short hold short\n", 3285 | "[166.06151 60.00346 61.172062]\n", 3286 | "short hold short\n", 3287 | "[166.60887 60.328312 61.45415 ]\n", 3288 | "short hold short\n", 3289 | "[165.2768 53.972157 69.83477 ]\n", 3290 | "short hold short\n", 3291 | "[157.6075 60.540478 81.16396 ]\n", 3292 | "short hold short\n", 3293 | "[178.11613 81.295074 100.237144]\n", 3294 | "short hold short\n", 3295 | "[176.35002 81.55987 101.91258]\n", 3296 | "short hold short\n", 3297 | "[184.16016 95.0304 88.85889]\n", 3298 | "short hold short\n", 3299 | "[196.27669 87.638504 70.09239 ]\n", 3300 | "short hold short\n", 3301 | "[168.14357 60.729397 61.906445]\n", 3302 | "short hold short\n", 3303 | "[167.01672 61.15035 62.169064]\n", 3304 | "short hold short\n", 3305 | "[170.6968 65.79659 67.65717]\n", 3306 | "short hold short\n", 3307 | "[179.08258 75.10043 70.89436]\n", 3308 | "short hold short\n", 3309 | "[181.34431 76.83625 68.26088]\n", 3310 | "short hold short\n", 3311 | "[182.05823 79.07995 70.61589]\n", 3312 | "short hold short\n", 3313 | "[178.95192 71.606514 85.196075]\n", 3314 | "short hold short\n", 3315 | "[169.66939 67.39374 90.799904]\n", 3316 | "short hold short\n", 3317 | "[157.16827 49.06764 120.858025]\n", 3318 | "short hold short\n", 3319 | "[142.58134 40.647602 115.00105 ]\n", 3320 | "short hold short\n", 3321 | "[129.94438 27.862864 102.502045]\n", 3322 | "short hold short\n" 3323 | ] 3324 | }, 3325 | { 3326 | "name": "stdout", 3327 | "output_type": "stream", 3328 | "text": [ 3329 | "[127.01019 30.927652 107.768074]\n", 3330 | "short hold short\n", 3331 | "[137.34459 36.147106 114.87749 ]\n", 3332 | "short hold short\n", 3333 | "[125.51027 35.20284 114.782234]\n", 3334 | "short hold short\n", 3335 | "[149.8276 67.65473 162.91646]\n", 3336 | "short hold short\n", 3337 | "[182.15044 99.68045 180.48378]\n", 3338 | "short hold short\n", 3339 | "[183.30426 100.92089 180.7265 ]\n", 3340 | "short hold short\n", 3341 | "[186.6008 93.70736 165.375 ]\n", 3342 | "short hold short\n" 3343 | ] 3344 | }, 3345 | { 3346 | "data": { 3347 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAA04AAAGlCAYAAADNvKbpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XdYFNf+P/A3oCCigmKDJIId242xQNQbUeyxoEa9GnuX\nb4xdo4mJuRoSa2LUaKImNhAr9m5ErCAoUVAJKFjRUETK0tfP7w9/u5d1d5ldxJh78349z+d5dObs\nmcKc2fnMnDlrAUBARERERERERlm+7hUgIiIiIiL6q2PiREREREREpICJExERERERkQImTkRERERE\nRAqYOBERERERESlg4kRERERERKTgb5s4zZs3DyICFxeX170qRgUFBSE+Pv51r8Zf3oYNGyDCUfWp\nZPw3tDsRwYYNG173ahABMP8c/N/w/askPj4eQUFBr3s16C/of+H4JuPMSpxsbW0xefJknDlzBikp\nKcjLy8Pjx49x6NAhDB8+HFZWVq9qPf9y3n77bcybN+8v0zBERCdycnIQGxuL7777DpUqVXrdq/eX\nN3jwYAQEBCA2NhYqlQp3797Fvn374O7ubrD8i/tbExkZGSYvs1SpUpgzZw5u3LiBnJwcJCcnY9eu\nXahfv77B8hUqVMCKFSvw4MEDZGdnIyoqChMmTCjW9pY0Z2dnLFq0CFevXkV6ejpycnIQHx+PLVu2\nwMvL63Wv3p/K29sb8+bNe92rAQDw9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YDAaD8TcNc3IHxa56VlZW\n2LlzJ+rWrYvWrVsjKSlJr4ynpyf8/f2xcuVKLFu2TG/+uXPn0K5dO51pXbt2xezZs9GtWzfExcUB\nAMaMGYNy5crplNu2bRuCg4OxZs0ag8smIiIiIiJ61RQTp9WrV6N79+6YNGkSHB0d4ejoqJ0XERGB\nWrVqYe/evYiOjsb27dvh4eGhnZ+UlIS4uDikpKQgODhYp15XV1cAwNmzZ6FSqQAAly9f1lt+Tk4O\n7t+/r/d5IiIiIiKiP4ti4tS5c2cAwIoVK/Tmubq6wsPDAw4ODmjatCkuXryoM3/jxo0YOXJkCa0q\nERERERHR62GB5332/meEhYVxVD0iIiIiIlJkTu5QrB/AJSIiIiIi+jth4kRERERERKSAiRMRERER\nEZECJk5EREREREQKmDgREREREREpYOJERERERESkgIkTERERERGRAiZORERERERECpg4ERERERER\nKWDiREREREREpICJExERERERkQImTkRERERERAqYOBERERERESlg4kRERERERKSAiRMREREREZEC\nJk5EREREREQKmDgREREREREpYOJERERERESkgIkTERERERGRAiZORERERERECpg4ERERERERKWDi\nREREREREpICJExERERERkQImTkRERERERAqYOBERERERESlg4kRERERERKSAiRMREREREZECJk5E\nREREREQKmDgREREREREpYOJERERERESkgIkTERERERGRAiZORERERERECpg4ERERERERKWDiRERE\nREREpICJExERERERkQImTkRERERERAqYOBERERERESlg4kRERERERKSAiRMREREREZECJk5ERERE\nREQKmDgREREREREpYOJERERERESkgIkTERERERGRAiZOREREREREChQTp/79++PgwYNISEhARkYG\nwsPDMXDgQO18JycnLF26FJGRkcjMzMS9e/ewceNGODk5Ga3T2dkZGRkZEBHY2dm9VF1ERERERESv\nmmLiNHXqVKSlpWHy5Mno1asXgoKCEBAQgIkTJwIAmjVrBm9vb/j5+aFHjx6YOXMmPDw8cOHCBZ2k\nqLAlS5YgMzNTb3px6iIiIiIiIvozSFHh6OioN83f31/i4uIEgNjb24uVlZXO/Lp164qIyLBhw/Q+\n+95770lKSopMnz5dRETs7Oy088yty1CEhYW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oj99xz\nj+1rYDZ/O9WgmcPyBEKKtLQ0zc7O1oEDB+rw4cN1zZo1WllZqT179vSN6dGjh5aXl2thYaH27dvX\n74u4Gjplke877JMnT+r777+vAwcO1CeeeEKrqqqa9cvGwpn/2rVrNTs7WwcPHqxDhw7VN998U1VV\nJ06caGn+GRkZumLFCn3ooYfU6XRqRkaGbt26Vc+ePau9evWy9PyHew52rUGwCPY7QnZ9DZjN34rz\nb3YOQ4YM0ZUrV+ro0aPV6XTqU089pcePH9fDhw8HfOmhHWtgNn8710BEdMqUKXru3DmdOXOm3nPP\nPbp06VL1er36s5/9zPY1MJu/3d+H0tLSVFV12LBhQY9l588Cs3Owaw2uvvpq/eabb3T//v2akZGh\nAwcO1JdeeklVVSdMmGD714DZ/O3+PjR79mx98MEHtX///jpp0iQ9deqULl++3PLXQTjzt6oGFoTl\nCYQUqamp+sUXX2hVVZVWVlbqxo0bNSUlxW9Mw5dwBfPDQicnJ+uHH36oZ8+e1ZMnT2pOTo62atUq\nIvJ/4YUXtKioSD0ej549e1Z37NihjzzyiOXnv1evXrpx40YtKSnR2tpadbvd6nK59Cc/+UnA8S73\n+Q/3HOxag2DR2M0V7PgaMJu/Feff7Bx69uypeXl5eurUKT1//ryWlJTo8uXL/b400841MJu/nWvQ\nEFlZWVpcXKznzp3Tr776SocPHx4RNTCbv93fh15++WUtLy9v8kqxXT8LzM7BzjW46aabdM2aNXri\nxAmtqqrSXbt26fjx4y2vQTjzt/v70Msvv6zHjx/X2tpaPXjwoD7zzDMaExMTMTUwk79VNbjc4fjv\nHwAAAAAAjYi4L8AFAAAAgMuNxgkAAAAADNA4AQAAAIABGicAAAAAMEDjBAAAAAAGaJwAAAAAwACN\nEwAAAAAYoHECAAAAAAM0TgAAAABg4P8DuFmjqvTurysAAAAASUVORK5CYII=\n", 3348 | "text/plain": [ 3349 | "" 3350 | ] 3351 | }, 3352 | "metadata": {}, 3353 | "output_type": "display_data" 3354 | } 3355 | ], 3356 | "source": [ 3357 | "# Running the agent\n", 3358 | "done = False\n", 3359 | "state = environment.reset()\n", 3360 | "while not done:\n", 3361 | " action = agent.act(state)\n", 3362 | " \n", 3363 | " for position in environment._positions:\n", 3364 | " if all(environment._position==environment._positions[position]):\n", 3365 | " position_name = position\n", 3366 | " \n", 3367 | " for _action in environment._actions:\n", 3368 | " if all(action==environment._actions[_action]):\n", 3369 | " action_name = _action\n", 3370 | " \n", 3371 | " state, _, done, info = environment.step(action)\n", 3372 | " \n", 3373 | " for position in environment._positions:\n", 3374 | " if all(environment._position==environment._positions[position]):\n", 3375 | " next_position_name = position\n", 3376 | " \n", 3377 | " print position_name, action_name, next_position_name\n", 3378 | " \n", 3379 | " if 'status' in info and info['status'] == 'Closed plot':\n", 3380 | " done = True\n", 3381 | " else:\n", 3382 | " environment.render()" 3383 | ] 3384 | }, 3385 | { 3386 | "cell_type": "code", 3387 | "execution_count": null, 3388 | "metadata": { 3389 | "collapsed": true 3390 | }, 3391 | "outputs": [], 3392 | "source": [] 3393 | } 3394 | ], 3395 | "metadata": { 3396 | "kernelspec": { 3397 | "display_name": "Python 2", 3398 | "language": "python", 3399 | "name": "python2" 3400 | }, 3401 | "language_info": { 3402 | "codemirror_mode": { 3403 | "name": "ipython", 3404 | "version": 2 3405 | }, 3406 | "file_extension": ".py", 3407 | "mimetype": "text/x-python", 3408 | "name": "python", 3409 | "nbconvert_exporter": "python", 3410 | "pygments_lexer": "ipython2", 3411 | "version": "2.7.13" 3412 | } 3413 | }, 3414 | "nbformat": 4, 3415 | "nbformat_minor": 2 3416 | } 3417 | --------------------------------------------------------------------------------