├── Chapter 11 ├── backtesting platform.py └── trading platform prototype live tick data.py ├── Chapter 12 ├── AUDUSD_daily.csv ├── LMAX AUD_USD 1 Minute.7z ├── Trend following.py └── bar maker.py ├── Chapter 13 └── Trend following analysis.py ├── Chapter 14 ├── Stop and limit orders.py └── end of day continuation.py ├── Chapter 4 ├── FIX dictionary.py └── websocket connect.py ├── Chapter 5 ├── EURUSD 1 Tick.csv.zip ├── LMAX EUR_USD 1 Minute.7z.001 ├── LMAX EUR_USD 1 Minute.7z.002 ├── add sample.py ├── make bars from ticks.py ├── read compressed data.py └── universal data connector.py ├── Chapter 7 └── TA indicators using sliding window.py ├── Chapter 8 ├── barchart with pandas.py ├── basic price chart.py ├── live bar chart.py └── live tick chart.py ├── LICENSE └── README.md /Chapter 11/backtesting platform.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import threading 3 | import queue 4 | import time 5 | import matplotlib.pyplot as plt 6 | from datetime import datetime 7 | 8 | class tradingSystemMetadata: 9 | def __init__(self): 10 | self.initial_capital = 10000 11 | self.leverage = 30 12 | self.market_position = 0 13 | self.equity = 0 14 | self.last_price = 0 15 | self.equity_timeseries = [] 16 | self.F1, self.F2, self.F3 = threading.Event(), threading.Event(), threading.Event() 17 | 18 | 19 | bar_feed = queue.Queue() 20 | orders_stream = queue.Queue() 21 | 22 | System = tradingSystemMetadata() 23 | start_time = time.perf_counter() 24 | f = open("/Volumes/Storage HDD/Data/LMAX EUR_USD 1 Minute.txt") 25 | csvFile = csv.DictReader(f) 26 | all_data = list(csvFile) 27 | end_time = time.perf_counter() 28 | print(f'Data read in {round(end_time - start_time, 0)} second(s).') 29 | 30 | def getBar(): 31 | counter = 0 32 | for bar in all_data: 33 | bar['Open'] = float(bar['Open']) 34 | bar['High'] = float(bar['High']) 35 | bar['Low'] = float(bar['Low']) 36 | bar['Close'] = float(bar['Close']) 37 | bar_feed.put(bar) 38 | counter += 1 39 | if counter == 10: 40 | break 41 | System.F1.clear() 42 | System.F2.set() 43 | System.F1.wait() 44 | print('Finished reading data') 45 | 46 | def tradeLogic(): 47 | while True: 48 | try: 49 | bar = bar_feed.get(block=True, timeout=1) 50 | except: 51 | break 52 | #################################### 53 | # trade logic starts here # 54 | #################################### 55 | order = {} 56 | open = bar['Open'] 57 | close = bar['Close'] 58 | if close > open and System.market_position >= 0: 59 | 60 | order['Type'] = 'Market' 61 | order['Price'] = close 62 | order['Side'] = 'Sell' 63 | if System.market_position == 0: 64 | order['Size'] = 10000 65 | else: 66 | order['Size'] = 20000 67 | orders_stream.put(order) 68 | 69 | if close < open and System.market_position <= 0: 70 | order['Type'] = 'Market' 71 | order['Price'] = close 72 | order['Side'] = 'Buy' 73 | if System.market_position == 0: 74 | order['Size'] = 10000 75 | else: 76 | order['Size'] = 20000 77 | orders_stream.put(order) 78 | #################################### 79 | # trade logic ends here # 80 | #################################### 81 | bar_feed.put(bar) 82 | System.F2.clear() 83 | System.F3.set() 84 | System.F2.wait() 85 | 86 | 87 | def emulateBrokerExecution(bar, order): 88 | if order['Type'] == 'Market': 89 | order['Status'] = 'Executed' 90 | if order['Side'] == 'Buy': 91 | order['Executed Price'] = bar['Close'] 92 | if order['Side'] == 'Sell': 93 | order['Executed Price'] = bar['Close'] 94 | 95 | 96 | def processOrders(): 97 | while True: 98 | try: 99 | bar = bar_feed.get(block=True, timeout=1) 100 | except: 101 | break 102 | 103 | System.equity += (bar['Close'] - System.last_price) * System.market_position 104 | System.equity_timeseries.append(System.equity) 105 | System.last_price = bar['Close'] 106 | 107 | while True: 108 | try: 109 | order = orders_stream.get(block=False) 110 | emulateBrokerExecution(bar, order) 111 | if order['Status'] == 'Executed': 112 | System.last_price = order['Executed Price'] 113 | if order['Side'] == 'Buy': 114 | System.market_position = System.market_position + order['Size'] 115 | if order['Side'] == 'Sell': 116 | System.market_position = System.market_position - order['Size'] 117 | except: 118 | order = 'No order' 119 | break 120 | System.F3.clear() 121 | System.F1.set() 122 | System.F3.wait() 123 | 124 | start_time = time.perf_counter() 125 | incoming_price_thread = threading.Thread(target=getBar) 126 | trading_thread = threading.Thread(target=tradeLogic) 127 | ordering_thread = threading.Thread(target=processOrders) 128 | 129 | incoming_price_thread.start() 130 | trading_thread.start() 131 | ordering_thread.start() 132 | 133 | 134 | while True: 135 | if incoming_price_thread.is_alive(): 136 | time.sleep(1) 137 | else: 138 | end_time = time.perf_counter() 139 | print(f'Backtest complete in {round(end_time - start_time, 0)} second(s).') 140 | plt.plot(System.equity_timeseries) 141 | plt.show() 142 | break 143 | -------------------------------------------------------------------------------- /Chapter 11/trading platform prototype live tick data.py: -------------------------------------------------------------------------------- 1 | import json 2 | import threading 3 | import queue 4 | from datetime import datetime 5 | from websocket import create_connection 6 | 7 | class tradingSystemMetadata: 8 | def __init__(self): 9 | self.initial_capital = 10000 10 | self.leverage = 30 11 | self.market_position = 0 12 | self.equity = 0 13 | self.last_price = 0 14 | self.equity_timeseries = [] 15 | 16 | tick_feed_0 = queue.Queue() 17 | tick_feed_1 = queue.Queue() 18 | tick_feed_2 = queue.Queue() 19 | bar_feed = queue.Queue() 20 | orders_stream = queue.Queue() 21 | 22 | System = tradingSystemMetadata() 23 | 24 | url = "wss://public-data-api.london-demo.lmax.com/v1/web-socket" 25 | subscription_msg = '{"type": "SUBSCRIBE","channels": [{"name": "ORDER_BOOK","instruments": ["eur-usd"]}]}' 26 | data_resolution = 10 27 | 28 | def LMAX_connect(url, subscription_msg): 29 | ws = create_connection(url) 30 | ws.send(subscription_msg) 31 | while True: 32 | tick = json.loads(ws.recv()) 33 | if 'instrument_id' in tick.keys(): 34 | bid = float(tick['bids'][0]['price']) 35 | ask = float(tick['asks'][0]['price']) 36 | if ask - bid < 0.001: 37 | tick_feed_0.put(tick) 38 | 39 | def getBarRealtime(resolution): 40 | last_sample_ts = datetime.now() 41 | bar = {'Open': 0, 'High': 0, 'Low': 0, 'Close': 0} 42 | while True: 43 | tick = tick_feed_0.get(block=True) 44 | if 'instrument_id' in tick.keys(): 45 | ts = datetime.strptime(tick['timestamp'], "%Y-%m-%dT%H:%M:%S.%fZ") 46 | bid = float(tick['bids'][0]['price']) 47 | delta = ts - last_sample_ts 48 | bar['High'] = max([bar['High'], bid]) 49 | bar['Low'] = min([bar['Low'], bid]) 50 | bar['Close'] = bid # Note that we update price BEFORE checking the condition to start a new bar! 51 | if delta.seconds >= resolution - 1: 52 | if bar['Open'] != 0: 53 | bar_feed.put(bar) 54 | last_sample_ts = ts 55 | bar = {'Open': bid, 'High': bid, 'Low': bid, 'Close': bid} 56 | tick_feed_1.put(tick) 57 | 58 | 59 | def tradeLogic(): 60 | while True: 61 | tick = tick_feed_1.get() 62 | try: 63 | bar = bar_feed.get(block=False) 64 | print('Got bar: ', bar) 65 | #################################### 66 | # trade logic starts here # 67 | #################################### 68 | open = bar['Open'] 69 | close = bar['Close'] 70 | if close > open and System.market_position >= 0: 71 | order = {} 72 | order['Type'] = 'Market' 73 | order['Price'] = close 74 | order['Side'] = 'Sell' 75 | if System.market_position == 0: 76 | order['Size'] = 10000 77 | else: 78 | order['Size'] = 20000 79 | orders_stream.put(order) 80 | print(order) 81 | 82 | if close < open and System.market_position <= 0: 83 | order = {} 84 | order['Type'] = 'Market' 85 | order['Price'] = close 86 | order['Side'] = 'Buy' 87 | if System.market_position == 0: 88 | order['Size'] = 10000 89 | else: 90 | order['Size'] = 20000 91 | orders_stream.put(order) 92 | print(order) 93 | #################################### 94 | # trade logic ends here # 95 | #################################### 96 | except: 97 | pass 98 | tick_feed_2.put(tick) 99 | 100 | def emulateBrokerExecution(tick, order): 101 | if order['Type'] == 'Market': 102 | if order['Side'] == 'Buy': 103 | current_liquidity = float(tick['asks'][0]['quantity']) 104 | price = float(tick['asks'][0]['price']) 105 | if order['Size'] <= current_liquidity: 106 | order['Executed Price'] = price 107 | order['Status'] = 'Executed' 108 | else: 109 | order['Status'] = 'Rejected' 110 | if order['Side'] == 'Sell': 111 | current_liquidity = float(tick['bids'][0]['quantity']) 112 | price = float(tick['bids'][0]['price']) 113 | if order['Size'] <= current_liquidity: 114 | order['Executed Price'] = price 115 | order['Status'] = 'Executed' 116 | else: 117 | order['Status'] = 'Rejected' 118 | 119 | def processOrders(): # In production this should be called with every new tick, separate feed 120 | while True: 121 | tick = tick_feed_2.get(block = True) 122 | current_price = float(tick['bids'][0]['price']) 123 | 124 | System.equity += (current_price - System.last_price) * System.market_position 125 | System.equity_timeseries.append(System.equity) 126 | System.last_price = current_price 127 | print(tick['timestamp'], "Price:", current_price, "Equity:", System.equity) 128 | 129 | while True: 130 | try: 131 | order = orders_stream.get(block = False) 132 | available_funds = (System.initial_capital + System.equity) * System.leverage - System.market_position / System.leverage 133 | if order['Size'] < available_funds: 134 | emulateBrokerExecution(tick, order) 135 | if order['Status'] == 'Executed': 136 | System.last_price = order['Executed Price'] 137 | print('Executed at ', str(System.last_price), 'current price = ', str(current_price), 'order price = ', str(order['Executed Price'])) 138 | if order['Side'] == 'Buy': 139 | System.market_position = System.market_position + order['Size'] 140 | if order['Side'] == 'Sell': 141 | System.market_position = System.market_position - order['Size'] 142 | elif order['Status'] == 'Rejected': 143 | orders_stream.put(order) 144 | except: 145 | order = 'No order' 146 | break 147 | 148 | data_receiver_thread = threading.Thread(target = LMAX_connect, args = (url, subscription_msg)) 149 | incoming_price_thread = threading.Thread(target = getBarRealtime, args = (data_resolution,)) 150 | trading_thread = threading.Thread(target = tradeLogic) 151 | ordering_thread = threading.Thread(target = processOrders) 152 | 153 | data_receiver_thread.start() 154 | incoming_price_thread.start() 155 | trading_thread.start() 156 | ordering_thread.start() 157 | -------------------------------------------------------------------------------- /Chapter 12/AUDUSD_daily.csv: -------------------------------------------------------------------------------- 1 | Date,Time,Open,High,Low,Close 2 | 2020-01-01,00:00:00,0.70129,0.70159,0.70053,0.70066 3 | 2020-01-02,00:00:00,0.70104,0.70195,0.69785,0.69823 4 | 2020-01-03,17:00:00,0.69831,0.69863,0.69302,0.69549 5 | 2020-01-05,00:00:00,0.69415,0.69422,0.69354,0.69365 6 | 2020-01-06,00:00:00,0.69366,0.69576,0.69252,0.69385 7 | 2020-01-07,00:00:00,0.69383,0.69391,0.6859,0.68676 8 | 2020-01-08,00:00:00,0.68677,0.68849,0.6849,0.68653 9 | 2020-01-09,00:00:00,0.6865,0.68801,0.68502,0.68531 10 | 2020-01-10,17:00:00,0.68535,0.69067,0.68506,0.6905 11 | 2020-01-12,00:00:00,0.68977,0.68988,0.68947,0.68964 12 | 2020-01-13,00:00:00,0.68981,0.69197,0.68947,0.69011 13 | 2020-01-14,00:00:00,0.69006,0.69095,0.6885,0.68994 14 | 2020-01-15,00:00:00,0.69,0.69164,0.68773,0.69028 15 | 2020-01-16,00:00:00,0.69026,0.69333,0.6888,0.68971 16 | 2020-01-17,17:00:00,0.68972,0.69109,0.68721,0.68793 17 | 2020-01-19,00:00:00,0.68723,0.68762,0.68717,0.6876 18 | 2020-01-20,00:00:00,0.68763,0.68884,0.6855,0.68723 19 | 2020-01-21,00:00:00,0.68728,0.68804,0.68421,0.68423 20 | 2020-01-22,00:00:00,0.68426,0.68561,0.68272,0.68417 21 | 2020-01-23,00:00:00,0.68424,0.68785,0.68296,0.68417 22 | 2020-01-24,17:00:00,0.68427,0.6857,0.68193,0.68271 23 | 2020-01-26,00:00:00,0.68122,0.68182,0.68115,0.68153 24 | 2020-01-27,00:00:00,0.68152,0.68168,0.67524,0.6759 25 | 2020-01-28,00:00:00,0.67586,0.67647,0.6737,0.67592 26 | 2020-01-29,00:00:00,0.67592,0.67772,0.67355,0.67477 27 | 2020-01-30,00:00:00,0.67478,0.67548,0.67001,0.67176 28 | 2020-01-31,17:00:00,0.67177,0.67286,0.66828,0.66939 29 | 2020-02-02,00:00:00,0.66848,0.66872,0.66839,0.66841 30 | 2020-02-03,00:00:00,0.66841,0.67069,0.66835,0.66899 31 | 2020-02-04,00:00:00,0.66899,0.67413,0.66789,0.67399 32 | 2020-02-05,00:00:00,0.67392,0.6774,0.6724,0.67461 33 | 2020-02-06,00:00:00,0.67469,0.67649,0.67268,0.67318 34 | 2020-02-07,17:00:00,0.67315,0.67352,0.6662,0.6686 35 | 2020-02-09,00:00:00,0.66662,0.66733,0.66662,0.66733 36 | 2020-02-10,00:00:00,0.66733,0.67071,0.66664,0.66844 37 | 2020-02-11,00:00:00,0.66842,0.67364,0.66822,0.67149 38 | 2020-02-12,00:00:00,0.67149,0.67497,0.67125,0.67341 39 | 2020-02-13,00:00:00,0.67342,0.67449,0.67069,0.67163 40 | 2020-02-14,17:00:00,0.67162,0.67311,0.67098,0.67159 41 | 2020-02-16,00:00:00,0.67208,0.67208,0.67155,0.67183 42 | 2020-02-17,00:00:00,0.67184,0.67333,0.67114,0.67121 43 | 2020-02-18,00:00:00,0.67122,0.67136,0.66735,0.66866 44 | 2020-02-19,00:00:00,0.66865,0.67072,0.66651,0.66764 45 | 2020-02-20,00:00:00,0.66761,0.66927,0.66101,0.66117 46 | 2020-02-21,17:00:00,0.66114,0.66356,0.65858,0.66314 47 | 2020-02-23,00:00:00,0.65906,0.6605,0.65906,0.65941 48 | 2020-02-24,00:00:00,0.65967,0.66194,0.65872,0.65997 49 | 2020-02-25,00:00:00,0.66006,0.66222,0.65864,0.6599 50 | 2020-02-26,00:00:00,0.66,0.66066,0.6542,0.65473 51 | 2020-02-27,00:00:00,0.65474,0.65916,0.65433,0.65731 52 | 2020-02-28,17:00:00,0.6573,0.6585,0.64342,0.64568 53 | 2020-03-01,00:00:00,0.64768,0.64857,0.64722,0.6478 54 | 2020-03-02,00:00:00,0.6483,0.65677,0.64821,0.65335 55 | 2020-03-03,00:00:00,0.65374,0.66439,0.65096,0.65826 56 | 2020-03-04,00:00:00,0.65826,0.66273,0.6577,0.66196 57 | 2020-03-05,00:00:00,0.66196,0.66366,0.6584,0.66128 58 | 2020-03-06,17:00:00,0.66128,0.66569,0.65852,0.6629 59 | 2020-03-08,00:00:00,0.66016,0.66223,0.65936,0.6608 60 | 2020-03-09,00:00:00,0.66083,0.66843,0.632,0.66072 61 | 2020-03-10,00:00:00,0.66071,0.66074,0.64635,0.65066 62 | 2020-03-11,00:00:00,0.65067,0.65389,0.64727,0.64805 63 | 2020-03-12,00:00:00,0.64804,0.64864,0.62131,0.62856 64 | 2020-03-13,17:00:00,0.6286,0.63222,0.61506,0.61597 65 | 2020-03-15,00:00:00,0.62197,0.63031,0.61035,0.61659 66 | 2020-03-16,00:00:00,0.61659,0.62164,0.60793,0.61223 67 | 2020-03-17,00:00:00,0.61223,0.61473,0.59598,0.59861 68 | 2020-03-18,00:00:00,0.59862,0.60268,0.57031,0.57916 69 | 2020-03-19,00:00:00,0.57921,0.59608,0.55095,0.56699 70 | 2020-03-20,17:00:00,0.56676,0.59838,0.56676,0.58374 71 | 2020-03-22,00:00:00,0.58019,0.58244,0.57044,0.57115 72 | 2020-03-23,00:00:00,0.5715,0.58426,0.56996,0.58426 73 | 2020-03-24,00:00:00,0.58415,0.59885,0.58268,0.59769 74 | 2020-03-25,00:00:00,0.59771,0.60715,0.58939,0.58972 75 | 2020-03-26,00:00:00,0.59031,0.60866,0.58699,0.60359 76 | 2020-03-27,17:00:00,0.60365,0.61345,0.60235,0.61247 77 | 2020-03-29,00:00:00,0.6148,0.61541,0.61429,0.61516 78 | 2020-03-30,00:00:00,0.61508,0.61833,0.61122,0.61658 79 | 2020-03-31,00:00:00,0.61663,0.62125,0.60749,0.61564 80 | 2020-04-01,00:00:00,0.61558,0.61716,0.60394,0.60674 81 | 2020-04-02,00:00:00,0.60682,0.61185,0.60068,0.60554 82 | 2020-04-03,17:00:00,0.60574,0.6075,0.59801,0.60111 83 | 2020-04-05,00:00:00,0.60113,0.60117,0.59827,0.59974 84 | 2020-04-06,00:00:00,0.5997,0.61051,0.59911,0.60819 85 | 2020-04-07,00:00:00,0.60826,0.62075,0.6075,0.61681 86 | 2020-04-08,00:00:00,0.61659,0.6243,0.61154,0.62321 87 | 2020-04-09,00:00:00,0.62318,0.63562,0.61955,0.63321 88 | 2020-04-10,17:00:00,0.63325,0.63676,0.63121,0.63436 89 | 2020-04-12,00:00:00,0.63463,0.63516,0.63405,0.63516 90 | 2020-04-13,23:59:00,0.63517,0.64072,0.63265,0.63808 91 | 2020-04-14,00:00:00,0.63823,0.64444,0.63752,0.64409 92 | 2020-04-15,00:00:00,0.64412,0.64434,0.62842,0.63212 93 | 2020-04-16,00:00:00,0.63215,0.63678,0.62652,0.63578 94 | 2020-04-17,17:00:00,0.63555,0.63828,0.63148,0.63605 95 | 2020-04-19,00:00:00,0.63623,0.63623,0.63535,0.63594 96 | 2020-04-20,00:00:00,0.6362,0.63969,0.63295,0.63311 97 | 2020-04-21,00:00:00,0.63304,0.63466,0.62533,0.6285 98 | 2020-04-22,00:00:00,0.62853,0.6351,0.62769,0.63196 99 | 2020-04-23,23:59:00,0.6319,0.64043,0.6283,0.63716 100 | 2020-04-24,17:00:00,0.63715,0.63838,0.63373,0.63768 101 | 2020-04-26,00:00:00,0.63806,0.63893,0.63802,0.63865 102 | 2020-04-27,00:00:00,0.6387,0.64708,0.63824,0.64627 103 | 2020-04-28,00:00:00,0.64625,0.65136,0.64343,0.64887 104 | 2020-04-29,00:00:00,0.64888,0.65581,0.64888,0.65565 105 | 2020-04-30,00:00:00,0.65567,0.65696,0.64906,0.65025 106 | 2020-05-01,17:00:00,0.65024,0.6505,0.64262,0.64485 107 | 2020-05-03,00:00:00,0.64064,0.64066,0.64024,0.64053 108 | 2020-05-04,00:00:00,0.6404,0.64342,0.63725,0.6425 109 | 2020-05-05,00:00:00,0.64227,0.64758,0.6417,0.6429 110 | 2020-05-06,00:00:00,0.64272,0.64525,0.63935,0.63956 111 | 2020-05-07,23:58:00,0.63974,0.65051,0.63784,0.64934 112 | 2020-05-08,17:00:00,0.64931,0.65478,0.64931,0.65388 113 | 2020-05-10,00:00:00,0.65248,0.65317,0.65234,0.65234 114 | 2020-05-11,00:00:00,0.6522,0.65608,0.64568,0.64909 115 | 2020-05-12,00:00:00,0.649,0.65359,0.64326,0.64764 116 | 2020-05-13,00:00:00,0.64759,0.65239,0.64381,0.64543 117 | 2020-05-14,00:00:00,0.64541,0.6466,0.64037,0.64642 118 | 2020-05-15,17:00:00,0.64631,0.64735,0.64101,0.64132 119 | 2020-05-17,00:00:00,0.64186,0.64223,0.64119,0.64123 120 | 2020-05-18,00:00:00,0.64121,0.65269,0.64121,0.65165 121 | 2020-05-19,00:00:00,0.6516,0.65829,0.65102,0.65305 122 | 2020-05-20,00:00:00,0.65308,0.6616,0.65249,0.6596 123 | 2020-05-21,00:00:00,0.65937,0.6598,0.65488,0.6561 124 | 2020-05-22,17:00:00,0.65597,0.65721,0.65057,0.65232 125 | 2020-05-24,00:00:00,0.65319,0.65379,0.65308,0.65308 126 | 2020-05-25,23:59:00,0.65308,0.65492,0.652,0.65402 127 | 2020-05-26,00:00:00,0.65402,0.66749,0.65376,0.66472 128 | 2020-05-27,00:00:00,0.66471,0.66798,0.65675,0.66172 129 | 2020-05-28,00:00:00,0.66167,0.66671,0.65881,0.662 130 | 2020-05-29,17:00:00,0.662,0.66823,0.662,0.66382 131 | 2020-05-31,00:00:00,0.66559,0.66691,0.66559,0.66636 132 | 2020-06-01,00:00:00,0.66631,0.68129,0.66479,0.68018 133 | 2020-06-02,00:00:00,0.67993,0.68981,0.67748,0.68894 134 | 2020-06-03,00:00:00,0.68892,0.69828,0.68563,0.69223 135 | 2020-06-04,00:00:00,0.69209,0.69868,0.68826,0.694 136 | 2020-06-05,17:00:00,0.69389,0.70129,0.69307,0.69813 137 | 2020-06-07,00:00:00,0.69633,0.69742,0.69629,0.69685 138 | 2020-06-08,00:00:00,0.69696,0.70289,0.69619,0.70144 139 | 2020-06-09,00:00:00,0.70151,0.70409,0.68989,0.69561 140 | 2020-06-10,00:00:00,0.69535,0.70607,0.69326,0.69959 141 | 2020-06-11,00:00:00,0.6993,0.70036,0.68399,0.68438 142 | 2020-06-12,17:00:00,0.6841,0.69111,0.67995,0.68389 143 | 2020-06-14,00:00:00,0.6844,0.68445,0.68249,0.68257 144 | 2020-06-15,00:00:00,0.68236,0.69241,0.67765,0.69174 145 | 2020-06-16,00:00:00,0.69168,0.69747,0.68419,0.68804 146 | 2020-06-17,00:00:00,0.68805,0.69212,0.68521,0.68813 147 | 2020-06-18,00:00:00,0.68803,0.69016,0.68355,0.68472 148 | 2020-06-19,17:00:00,0.68454,0.6911,0.68411,0.68583 149 | 2020-06-21,00:00:00,0.68137,0.68226,0.68137,0.68192 150 | 2020-06-22,00:00:00,0.68183,0.69222,0.68109,0.69109 151 | 2020-06-23,23:58:00,0.69089,0.69742,0.68588,0.69276 152 | 2020-06-24,00:00:00,0.69273,0.69614,0.68624,0.68679 153 | 2020-06-25,00:00:00,0.68686,0.68923,0.68469,0.68872 154 | 2020-06-26,17:00:00,0.68843,0.68953,0.68405,0.6845 155 | 2020-06-28,00:00:00,0.68559,0.68611,0.68469,0.68501 156 | 2020-06-29,00:00:00,0.68484,0.68903,0.68415,0.68667 157 | 2020-06-30,00:00:00,0.68667,0.69113,0.68325,0.69014 158 | 2020-07-01,00:00:00,0.69016,0.69434,0.68772,0.69118 159 | 2020-07-02,00:00:00,0.69114,0.69511,0.69014,0.69229 160 | 2020-07-03,17:00:00,0.69221,0.69422,0.69138,0.69368 161 | 2020-07-05,00:00:00,0.6928,0.69333,0.69265,0.69289 162 | 2020-07-06,00:00:00,0.6929,0.69873,0.6929,0.69772 163 | 2020-07-07,00:00:00,0.69749,0.69974,0.6922,0.69448 164 | 2020-07-08,00:00:00,0.69442,0.6986,0.69273,0.69816 165 | 2020-07-09,00:00:00,0.69818,0.70007,0.69499,0.69592 166 | 2020-07-10,17:00:00,0.69598,0.69692,0.69237,0.69609 167 | 2020-07-12,00:00:00,0.69487,0.69554,0.69479,0.69527 168 | 2020-07-13,23:59:00,0.69504,0.69901,0.69378,0.6941 169 | 2020-07-14,00:00:00,0.69412,0.69783,0.69212,0.69754 170 | 2020-07-15,00:00:00,0.69755,0.70373,0.69755,0.70089 171 | 2020-07-16,00:00:00,0.7008,0.70121,0.69627,0.69691 172 | 2020-07-17,17:00:00,0.69671,0.69929,0.6967,0.6983 173 | 2020-07-19,00:00:00,0.69876,0.69934,0.69858,0.69891 174 | 2020-07-20,23:58:00,0.69887,0.70181,0.6973,0.70157 175 | 2020-07-21,23:58:00,0.70142,0.71467,0.70142,0.7132 176 | 2020-07-22,00:00:00,0.71314,0.71817,0.71121,0.71362 177 | 2020-07-23,00:00:00,0.71377,0.71609,0.70902,0.70948 178 | 2020-07-24,17:00:00,0.70964,0.71244,0.70637,0.70985 179 | 2020-07-26,00:00:00,0.70845,0.71047,0.70845,0.7095 180 | 2020-07-27,00:00:00,0.70953,0.71497,0.70875,0.71451 181 | 2020-07-28,00:00:00,0.71444,0.71761,0.71128,0.71554 182 | 2020-07-29,00:00:00,0.7157,0.71958,0.71488,0.7189 183 | 2020-07-30,00:00:00,0.7189,0.71973,0.71214,0.71882 184 | 2020-07-31,17:00:00,0.71893,0.72266,0.71609,0.71723 185 | 2020-08-02,00:00:00,0.71279,0.71342,0.71279,0.71311 186 | 2020-08-03,00:00:00,0.71309,0.71492,0.70762,0.71199 187 | 2020-08-04,00:00:00,0.71243,0.71664,0.71057,0.71572 188 | 2020-08-05,00:00:00,0.71571,0.72408,0.71536,0.71932 189 | 2020-08-06,00:00:00,0.71915,0.72392,0.71745,0.72306 190 | 2020-08-07,17:00:00,0.7231,0.72425,0.71583,0.71783 191 | 2020-08-09,00:00:00,0.71599,0.71647,0.71543,0.71555 192 | 2020-08-10,00:00:00,0.71555,0.71836,0.714,0.71503 193 | 2020-08-11,00:00:00,0.71483,0.71889,0.71348,0.71426 194 | 2020-08-12,00:00:00,0.71417,0.71754,0.71092,0.71599 195 | 2020-08-13,00:00:00,0.71595,0.71876,0.71356,0.71468 196 | 2020-08-14,17:00:00,0.71472,0.71733,0.7132,0.71711 197 | 2020-08-16,00:00:00,0.71619,0.71768,0.71614,0.71707 198 | 2020-08-17,23:58:00,0.71734,0.72271,0.71706,0.72135 199 | 2020-08-18,00:00:00,0.72136,0.72641,0.72088,0.72413 200 | 2020-08-19,00:00:00,0.72417,0.72753,0.71789,0.71836 201 | 2020-08-20,00:00:00,0.71825,0.72022,0.71356,0.71899 202 | 2020-08-21,17:00:00,0.71916,0.72156,0.71394,0.71552 203 | 2020-08-23,00:00:00,0.71405,0.71626,0.71405,0.71601 204 | 2020-08-24,00:00:00,0.71599,0.72037,0.71525,0.71633 205 | 2020-08-25,00:00:00,0.71622,0.71977,0.71508,0.71929 206 | 2020-08-26,00:00:00,0.71924,0.72392,0.71877,0.72317 207 | 2020-08-27,00:00:00,0.72311,0.72897,0.7218,0.72587 208 | 2020-08-28,17:00:00,0.72582,0.73562,0.7255,0.73458 209 | 2020-08-30,00:00:00,0.73563,0.7364,0.73563,0.73632 210 | 2020-08-31,00:00:00,0.73631,0.74011,0.73404,0.73743 211 | 2020-09-01,00:00:00,0.73743,0.74133,0.73594,0.73746 212 | 2020-09-02,23:53:00,0.73745,0.73813,0.73014,0.73356 213 | 2020-09-03,00:00:00,0.7335,0.73374,0.72651,0.72714 214 | 2020-09-04,17:00:00,0.72704,0.72962,0.72221,0.72445 215 | 2020-09-06,00:00:00,0.7282,0.7289,0.7282,0.72833 216 | 2020-09-07,23:59:00,0.72832,0.72976,0.72701,0.72756 217 | 2020-09-08,00:00:00,0.72766,0.73086,0.71982,0.7201 218 | 2020-09-09,00:00:00,0.71991,0.72876,0.71921,0.72812 219 | 2020-09-10,00:00:00,0.72809,0.73243,0.72479,0.72548 220 | 2020-09-11,17:00:00,0.72556,0.73055,0.72556,0.72749 221 | 2020-09-13,00:00:00,0.72736,0.72805,0.72736,0.72805 222 | 2020-09-14,00:00:00,0.7281,0.73033,0.72642,0.72907 223 | 2020-09-15,00:00:00,0.72897,0.73421,0.72667,0.72995 224 | 2020-09-16,00:00:00,0.73011,0.73444,0.72784,0.73009 225 | 2020-09-17,00:00:00,0.73024,0.73152,0.72543,0.73087 226 | 2020-09-18,17:00:00,0.73079,0.73336,0.72825,0.73059 227 | 2020-09-20,00:00:00,0.72996,0.72996,0.72879,0.72951 228 | 2020-09-21,00:00:00,0.72947,0.7324,0.71992,0.72237 229 | 2020-09-22,00:00:00,0.72236,0.72344,0.71543,0.71665 230 | 2020-09-23,00:00:00,0.71667,0.71768,0.70684,0.70731 231 | 2020-09-24,00:00:00,0.70731,0.70808,0.7016,0.70443 232 | 2020-09-25,17:00:00,0.70455,0.70862,0.70061,0.70161 233 | 2020-09-27,00:00:00,0.70288,0.70322,0.70263,0.70322 234 | 2020-09-28,00:00:00,0.70325,0.70742,0.70321,0.70716 235 | 2020-09-29,00:00:00,0.70708,0.71375,0.70684,0.7129 236 | 2020-09-30,00:00:00,0.71293,0.71752,0.71003,0.71606 237 | 2020-10-01,23:57:00,0.71626,0.72089,0.71549,0.7184 238 | 2020-10-02,17:00:00,0.71828,0.7188,0.7131,0.7164 239 | 2020-10-04,00:00:00,0.71646,0.71651,0.7157,0.71625 240 | 2020-10-05,00:00:00,0.71632,0.7193,0.71584,0.71783 241 | 2020-10-06,00:00:00,0.71778,0.72085,0.70964,0.71007 242 | 2020-10-07,00:00:00,0.71001,0.71514,0.70964,0.71382 243 | 2020-10-08,00:00:00,0.71385,0.71698,0.7123,0.7167 244 | 2020-10-09,17:00:00,0.71667,0.72321,0.71667,0.72276 245 | 2020-10-11,00:00:00,0.72239,0.72321,0.72222,0.72275 246 | 2020-10-12,00:00:00,0.72274,0.72347,0.72005,0.72064 247 | 2020-10-13,00:00:00,0.72068,0.72094,0.71504,0.71581 248 | 2020-10-14,00:00:00,0.71572,0.71906,0.71532,0.71652 249 | 2020-10-15,00:00:00,0.71636,0.71678,0.70562,0.70934 250 | 2020-10-16,17:00:00,0.70945,0.7096,0.70705,0.70815 251 | 2020-10-18,00:00:00,0.70762,0.70793,0.70723,0.70765 252 | 2020-10-19,00:00:00,0.70755,0.71146,0.70586,0.70636 253 | 2020-10-20,00:00:00,0.7063,0.70724,0.70206,0.70469 254 | 2020-10-21,00:00:00,0.70469,0.71365,0.70456,0.71119 255 | 2020-10-22,00:00:00,0.71141,0.7125,0.70849,0.71128 256 | 2020-10-23,17:00:00,0.71164,0.71577,0.71011,0.71026 257 | 2020-10-25,00:00:00,0.71301,0.71406,0.71156,0.71164 258 | 2020-10-26,00:00:00,0.71164,0.71463,0.7103,0.71192 259 | 2020-10-27,00:00:00,0.71189,0.71468,0.71129,0.71174 260 | 2020-10-28,00:00:00,0.71174,0.71571,0.70384,0.70509 261 | 2020-10-29,00:00:00,0.70511,0.70759,0.70034,0.70283 262 | 2020-10-30,17:00:00,0.70289,0.70719,0.70116,0.70221 263 | 2020-11-01,00:00:00,0.70218,0.70256,0.70158,0.70183 264 | 2020-11-02,00:00:00,0.70187,0.70573,0.6991,0.70494 265 | 2020-11-03,00:00:00,0.70494,0.71744,0.70278,0.71623 266 | 2020-11-04,00:00:00,0.71627,0.72187,0.70484,0.71678 267 | 2020-11-05,00:00:00,0.71668,0.72891,0.71452,0.72582 268 | 2020-11-06,17:00:00,0.7261,0.72871,0.72393,0.72664 269 | 2020-11-08,00:00:00,0.72764,0.72791,0.7272,0.7275 270 | 2020-11-09,00:00:00,0.7274,0.73395,0.72665,0.72701 271 | 2020-11-10,00:00:00,0.72694,0.72936,0.72523,0.72837 272 | 2020-11-11,00:00:00,0.7283,0.73176,0.72603,0.72763 273 | 2020-11-12,00:00:00,0.72766,0.72936,0.72236,0.72281 274 | 2020-11-13,17:00:00,0.72271,0.72637,0.72214,0.72471 275 | 2020-11-15,00:00:00,0.72631,0.72708,0.72631,0.72654 276 | 2020-11-16,00:00:00,0.72651,0.73252,0.72651,0.73135 277 | 2020-11-17,00:00:00,0.73131,0.73393,0.72887,0.72958 278 | 2020-11-18,00:00:00,0.72969,0.73305,0.7272,0.72994 279 | 2020-11-19,00:00:00,0.72994,0.73054,0.72548,0.72725 280 | 2020-11-20,17:00:00,0.72719,0.73237,0.7266,0.73107 281 | 2020-11-22,00:00:00,0.73009,0.73057,0.72996,0.7301 282 | 2020-11-23,00:00:00,0.73027,0.73371,0.72651,0.72844 283 | 2020-11-24,00:00:00,0.72845,0.73672,0.72845,0.73579 284 | 2020-11-25,00:00:00,0.7358,0.7373,0.73249,0.73624 285 | 2020-11-26,00:00:00,0.73623,0.73738,0.73536,0.73555 286 | 2020-11-27,17:00:00,0.73549,0.73983,0.73525,0.73954 287 | 2020-11-29,00:00:00,0.73833,0.73898,0.73833,0.73867 288 | 2020-11-30,00:00:00,0.73871,0.7407,0.73389,0.73443 289 | 2020-12-01,00:00:00,0.73457,0.7376,0.73421,0.73724 290 | 2020-12-02,00:00:00,0.73724,0.74195,0.73512,0.74126 291 | 2020-12-03,00:00:00,0.74141,0.74483,0.73979,0.74355 292 | 2020-12-04,17:00:00,0.74351,0.7443,0.741,0.74328 293 | 2020-12-06,00:00:00,0.74318,0.74327,0.74262,0.74296 294 | 2020-12-07,00:00:00,0.74305,0.74531,0.73722,0.74145 295 | 2020-12-08,00:00:00,0.74153,0.74349,0.73994,0.74112 296 | 2020-12-09,00:00:00,0.7408,0.74847,0.74045,0.74326 297 | 2020-12-10,00:00:00,0.74327,0.75398,0.74312,0.75324 298 | 2020-12-11,17:00:00,0.75332,0.75708,0.75202,0.75344 299 | 2020-12-13,00:00:00,0.75508,0.75562,0.75476,0.75477 300 | 2020-12-14,00:00:00,0.75468,0.75778,0.75248,0.75303 301 | 2020-12-15,00:00:00,0.75298,0.75712,0.7507,0.75501 302 | 2020-12-16,00:00:00,0.75507,0.75788,0.75389,0.75708 303 | 2020-12-17,00:00:00,0.75706,0.76393,0.75674,0.76201 304 | 2020-12-18,17:00:00,0.76211,0.76225,0.75828,0.76098 305 | 2020-12-20,00:00:00,0.75882,0.76032,0.75868,0.76001 306 | 2020-12-21,00:00:00,0.75987,0.76058,0.74619,0.75823 307 | 2020-12-22,00:00:00,0.75813,0.75908,0.75169,0.75222 308 | 2020-12-23,00:00:00,0.75217,0.75895,0.75216,0.75723 309 | 2020-12-24,22:58:00,0.75721,0.76063,0.75721,0.75866 310 | 2020-12-27,00:00:00,0.76005,0.76019,0.75865,0.75974 311 | 2020-12-28,00:00:00,0.75969,0.76223,0.75575,0.75774 312 | 2020-12-29,00:00:00,0.75774,0.76246,0.75774,0.76036 313 | 2020-12-30,00:00:00,0.76036,0.76862,0.76036,0.76835 314 | 2020-12-31,23:00:00,0.76841,0.77415,0.76832,0.76908 315 | 2021-01-03,00:00:00,0.76929,0.77038,0.76928,0.76941 316 | 2021-01-04,00:00:00,0.76981,0.77405,0.76429,0.76666 317 | 2021-01-05,00:00:00,0.76664,0.77773,0.76612,0.77534 318 | 2021-01-06,00:00:00,0.77538,0.78193,0.77331,0.78031 319 | 2021-01-07,00:00:00,0.78031,0.78171,0.77255,0.77609 320 | 2021-01-08,17:00:00,0.7761,0.7798,0.77399,0.77814 321 | 2021-01-10,00:00:00,0.77521,0.77627,0.77459,0.77544 322 | 2021-01-11,00:00:00,0.77559,0.77565,0.76666,0.76964 323 | 2021-01-12,00:00:00,0.76964,0.77771,0.76869,0.77688 324 | 2021-01-13,00:00:00,0.77703,0.77812,0.77218,0.77316 325 | 2021-01-14,00:00:00,0.77322,0.78049,0.77286,0.7776 326 | 2021-01-15,17:00:00,0.7776,0.77884,0.76814,0.77023 327 | 2021-01-17,00:00:00,0.77052,0.77071,0.77009,0.77038 328 | 2021-01-18,00:00:00,0.77038,0.77103,0.76589,0.76748 329 | 2021-01-19,00:00:00,0.76756,0.77247,0.76753,0.76942 330 | 2021-01-20,00:00:00,0.7694,0.77605,0.76918,0.77469 331 | 2021-01-21,00:00:00,0.77466,0.77816,0.77415,0.77632 332 | 2021-01-22,17:00:00,0.77632,0.7769,0.77023,0.77205 333 | 2021-01-24,00:00:00,0.77094,0.77104,0.77032,0.77057 334 | 2021-01-25,00:00:00,0.77079,0.77471,0.76829,0.77134 335 | 2021-01-26,00:00:00,0.77134,0.77539,0.7669,0.77438 336 | 2021-01-27,00:00:00,0.77438,0.77633,0.76437,0.76597 337 | 2021-01-28,00:00:00,0.76601,0.76974,0.75919,0.76753 338 | 2021-01-29,17:00:00,0.76749,0.77037,0.76356,0.76731 339 | 2021-01-31,00:00:00,0.76255,0.76275,0.76201,0.76255 340 | 2021-02-01,00:00:00,0.76268,0.76625,0.76058,0.76249 341 | 2021-02-02,00:00:00,0.76249,0.76614,0.75636,0.76063 342 | 2021-02-03,00:00:00,0.7606,0.76258,0.76015,0.76187 343 | 2021-02-04,00:00:00,0.76187,0.76474,0.75881,0.76009 344 | 2021-02-05,17:00:00,0.76004,0.76587,0.7583,0.76574 345 | 2021-02-07,00:00:00,0.76684,0.76737,0.76653,0.76698 346 | 2021-02-08,00:00:00,0.767,0.77145,0.76513,0.77027 347 | 2021-02-09,00:00:00,0.77027,0.77401,0.77016,0.77334 348 | 2021-02-10,00:00:00,0.77324,0.77555,0.77173,0.77218 349 | 2021-02-11,00:00:00,0.77218,0.77715,0.77126,0.77526 350 | 2021-02-12,17:00:00,0.77522,0.77553,0.77182,0.77496 351 | 2021-02-14,00:00:00,0.77605,0.77639,0.776,0.77606 352 | 2021-02-15,00:00:00,0.77579,0.77886,0.77577,0.77807 353 | 2021-02-16,00:00:00,0.77796,0.78047,0.77446,0.77488 354 | 2021-02-17,00:00:00,0.77487,0.7771,0.77241,0.77527 355 | 2021-02-18,00:00:00,0.77524,0.77892,0.77313,0.77667 356 | 2021-02-19,17:00:00,0.7767,0.78665,0.77574,0.78626 357 | 2021-02-21,00:00:00,0.78689,0.78746,0.78679,0.78714 358 | 2021-02-22,00:00:00,0.78699,0.79291,0.78553,0.79133 359 | 2021-02-23,00:00:00,0.79136,0.79344,0.78802,0.79107 360 | 2021-02-24,00:00:00,0.7911,0.79729,0.78955,0.7962 361 | 2021-02-25,00:00:00,0.79631,0.8007,0.78589,0.78755 362 | 2021-02-26,17:00:00,0.78756,0.78831,0.77309,0.77445 363 | 2021-02-28,00:00:00,0.77082,0.772,0.77063,0.77197 364 | 2021-03-01,00:00:00,0.77063,0.77865,0.77063,0.77682 365 | 2021-03-02,00:00:00,0.77682,0.78371,0.77359,0.78145 366 | 2021-03-03,00:00:00,0.78141,0.78375,0.77679,0.7775 367 | 2021-03-04,00:00:00,0.77743,0.78148,0.77089,0.77186 368 | 2021-03-05,17:00:00,0.7719,0.77264,0.76233,0.76617 369 | 2021-03-07,00:00:00,0.76916,0.76963,0.76908,0.76955 370 | 2021-03-08,00:00:00,0.76953,0.77212,0.7636,0.76434 371 | 2021-03-09,00:00:00,0.76412,0.7725,0.76212,0.77122 372 | 2021-03-10,00:00:00,0.7712,0.77447,0.76684,0.77308 373 | 2021-03-11,00:00:00,0.77309,0.77937,0.77234,0.77842 374 | 2021-03-12,17:00:00,0.77855,0.78003,0.77245,0.77488 375 | 2021-03-14,00:00:00,0.77497,0.7761,0.77467,0.77528 376 | 2021-03-15,00:00:00,0.77528,0.77749,0.77056,0.77436 377 | 2021-03-16,00:00:00,0.77436,0.77569,0.77111,0.77451 378 | 2021-03-17,00:00:00,0.77443,0.78112,0.76993,0.77998 379 | 2021-03-18,00:00:00,0.77993,0.78488,0.77493,0.77582 380 | 2021-03-19,17:00:00,0.77585,0.77718,0.77174,0.77442 381 | 2021-03-21,00:00:00,0.77085,0.77269,0.77085,0.77219 382 | 2021-03-22,00:00:00,0.77216,0.7756,0.77046,0.77365 383 | 2021-03-23,00:00:00,0.77365,0.77465,0.76174,0.76253 384 | 2021-03-24,00:00:00,0.76243,0.76278,0.75785,0.75821 385 | 2021-03-25,00:00:00,0.75826,0.76138,0.75629,0.75894 386 | 2021-03-26,17:00:00,0.75896,0.76374,0.75854,0.76261 387 | 2021-03-28,23:56:00,0.76325,0.76441,0.76307,0.76377 388 | 2021-03-29,00:00:00,0.76361,0.76551,0.76149,0.7633 389 | 2021-03-30,23:59:00,0.76315,0.76637,0.75846,0.75952 390 | 2021-03-31,00:00:00,0.75951,0.76362,0.75881,0.75942 391 | 2021-04-01,00:00:00,0.7594,0.76197,0.75321,0.76144 392 | 2021-04-02,17:00:00,0.76143,0.76363,0.75985,0.76033 393 | 2021-04-04,00:00:00,0.76024,0.76068,0.76023,0.76028 394 | 2021-04-05,00:00:00,0.76022,0.76602,0.75982,0.76513 395 | 2021-04-06,00:00:00,0.76493,0.76681,0.76057,0.76607 396 | 2021-04-07,00:00:00,0.76609,0.76767,0.76005,0.76081 397 | 2021-04-08,00:00:00,0.76086,0.76599,0.76028,0.76511 398 | 2021-04-09,17:00:00,0.76516,0.76606,0.75882,0.76269 399 | 2021-04-11,00:00:00,0.76144,0.76227,0.76121,0.76176 400 | 2021-04-12,00:00:00,0.76163,0.76352,0.7595,0.76209 401 | 2021-04-13,00:00:00,0.76209,0.76484,0.75851,0.76419 402 | 2021-04-14,00:00:00,0.7641,0.77374,0.76345,0.77213 403 | 2021-04-15,00:00:00,0.77213,0.77608,0.77056,0.77509 404 | 2021-04-16,17:00:00,0.77511,0.77584,0.77239,0.77355 405 | 2021-04-18,00:00:00,0.77272,0.77315,0.77253,0.77258 406 | 2021-04-19,00:00:00,0.77261,0.77844,0.7706,0.77531 407 | 2021-04-20,00:00:00,0.7755,0.78156,0.77089,0.77233 408 | 2021-04-21,23:56:00,0.77233,0.77617,0.76996,0.77511 409 | 2021-04-22,00:00:00,0.77513,0.77642,0.76903,0.77065 410 | 2021-04-23,17:00:00,0.77056,0.77448,0.76993,0.77268 411 | 2021-04-25,00:00:00,0.77406,0.77496,0.77401,0.77456 412 | 2021-04-26,00:00:00,0.77456,0.78133,0.77417,0.77992 413 | 2021-04-27,00:00:00,0.77995,0.78033,0.77615,0.77681 414 | 2021-04-28,00:00:00,0.77681,0.78005,0.7725,0.77893 415 | 2021-04-29,23:59:00,0.77885,0.78177,0.77503,0.7767 416 | 2021-04-30,17:00:00,0.77671,0.77838,0.77231,0.77248 417 | 2021-05-02,00:00:00,0.77144,0.77202,0.77139,0.77149 418 | 2021-05-03,00:00:00,0.77148,0.77664,0.77062,0.77585 419 | 2021-05-04,23:59:00,0.7759,0.77626,0.76751,0.77112 420 | 2021-05-05,00:00:00,0.77116,0.77543,0.77041,0.77442 421 | 2021-05-06,00:00:00,0.7743,0.77875,0.7701,0.778 422 | 2021-05-07,17:00:00,0.77818,0.78429,0.77609,0.78414 423 | 2021-05-09,23:59:00,0.78507,0.78534,0.78457,0.7848 424 | 2021-05-10,00:00:00,0.785,0.78906,0.78236,0.78304 425 | 2021-05-11,00:00:00,0.78281,0.78565,0.78203,0.78418 426 | 2021-05-12,00:00:00,0.78418,0.78424,0.77173,0.77276 427 | 2021-05-13,00:00:00,0.77262,0.77459,0.76882,0.77267 428 | 2021-05-14,17:00:00,0.77247,0.77809,0.77139,0.77692 429 | 2021-05-16,00:00:00,0.77724,0.77761,0.77685,0.77729 430 | 2021-05-17,00:00:00,0.77731,0.77835,0.77305,0.77667 431 | 2021-05-18,00:00:00,0.77662,0.78123,0.77641,0.77916 432 | 2021-05-19,00:00:00,0.77914,0.77973,0.77113,0.7722 433 | 2021-05-20,00:00:00,0.77226,0.77812,0.77175,0.77713 434 | 2021-05-21,17:00:00,0.77706,0.77821,0.77285,0.7736 435 | 2021-05-23,00:00:00,0.77282,0.77299,0.7724,0.77274 436 | 2021-05-24,00:00:00,0.77264,0.77575,0.77062,0.7751 437 | 2021-05-25,00:00:00,0.77511,0.77758,0.77329,0.77527 438 | 2021-05-26,23:59:00,0.7752,0.77957,0.7731,0.77419 439 | 2021-05-27,00:00:00,0.77418,0.77572,0.77232,0.77415 440 | 2021-05-28,17:00:00,0.77401,0.7747,0.76772,0.7709 441 | 2021-05-30,00:00:00,0.77111,0.77122,0.77052,0.77109 442 | 2021-05-31,00:00:00,0.77099,0.77412,0.77005,0.77342 443 | 2021-06-01,00:00:00,0.77348,0.77688,0.77307,0.77495 444 | 2021-06-02,00:00:00,0.77515,0.7772,0.77152,0.77495 445 | 2021-06-03,00:00:00,0.77503,0.77537,0.7646,0.76597 446 | 2021-06-04,17:00:00,0.76587,0.77412,0.7651,0.77332 447 | 2021-06-06,00:00:00,0.7731,0.7743,0.7731,0.77378 448 | 2021-06-07,00:00:00,0.77377,0.77654,0.77268,0.77546 449 | 2021-06-08,00:00:00,0.77546,0.77633,0.77321,0.77358 450 | 2021-06-09,00:00:00,0.77358,0.77619,0.77242,0.77316 451 | 2021-06-10,00:00:00,0.77299,0.77632,0.77189,0.77505 452 | 2021-06-11,17:00:00,0.77499,0.77753,0.76929,0.77014 453 | 2021-06-13,23:58:00,0.7704,0.77049,0.7704,0.77049 454 | 2021-06-14,00:00:00,0.77049,0.77255,0.76936,0.77128 455 | 2021-06-15,23:59:00,0.77118,0.77163,0.76742,0.76871 456 | 2021-06-16,00:00:00,0.76871,0.77156,0.75982,0.76092 457 | 2021-06-17,00:00:00,0.76092,0.76437,0.754,0.75513 458 | 2021-06-18,17:00:00,0.75502,0.75607,0.74801,0.74839 459 | 2021-06-20,00:00:00,0.74829,0.74846,0.74787,0.74831 460 | 2021-06-21,00:00:00,0.74821,0.75458,0.7478,0.75377 461 | 2021-06-22,00:00:00,0.75374,0.7564,0.74941,0.75506 462 | 2021-06-23,00:00:00,0.7552,0.75987,0.75379,0.7573 463 | 2021-06-24,23:58:00,0.75713,0.75913,0.75659,0.75821 464 | 2021-06-25,17:00:00,0.75818,0.76163,0.75798,0.76025 465 | 2021-06-27,23:55:00,0.75727,0.75866,0.75727,0.75829 466 | 2021-06-28,23:58:00,0.75895,0.76013,0.75546,0.75668 467 | 2021-06-29,00:00:00,0.75666,0.75703,0.75077,0.75116 468 | 2021-06-30,23:58:00,0.75088,0.75269,0.74919,0.74992 469 | 2021-07-01,23:56:00,0.74963,0.75073,0.74603,0.74675 470 | 2021-07-02,17:00:00,0.74667,0.74973,0.74463,0.74908 471 | 2021-07-04,23:59:00,0.75167,0.7525,0.75167,0.75238 472 | 2021-07-05,00:00:00,0.75232,0.7537,0.75088,0.75282 473 | 2021-07-06,23:59:00,0.75273,0.75986,0.74809,0.74933 474 | 2021-07-07,00:00:00,0.74941,0.75336,0.74633,0.74814 475 | 2021-07-08,00:00:00,0.74805,0.74884,0.74164,0.74249 476 | 2021-07-09,17:00:00,0.74249,0.74876,0.74098,0.7481 477 | 2021-07-11,00:00:00,0.74808,0.74897,0.74776,0.7487 478 | 2021-07-12,23:57:00,0.74844,0.74955,0.74483,0.74795 479 | 2021-07-13,23:59:00,0.74795,0.75025,0.74273,0.74439 480 | 2021-07-14,00:00:00,0.74439,0.74857,0.74316,0.74801 481 | 2021-07-15,00:00:00,0.74804,0.74869,0.74104,0.74204 482 | 2021-07-16,17:00:00,0.74204,0.74425,0.73986,0.74071 483 | 2021-07-18,00:00:00,0.74001,0.74016,0.73969,0.73993 484 | 2021-07-19,23:59:00,0.73939,0.7397,0.73219,0.73376 485 | 2021-07-20,23:57:00,0.7341,0.73564,0.73,0.73279 486 | 2021-07-21,00:00:00,0.73273,0.73623,0.72894,0.73559 487 | 2021-07-22,00:00:00,0.73564,0.73969,0.73419,0.73698 488 | 2021-07-23,17:00:00,0.73784,0.73895,0.73568,0.73597 489 | 2021-07-25,00:00:00,0.7365,0.73674,0.73581,0.73635 490 | 2021-07-26,00:00:00,0.73657,0.73904,0.73306,0.73799 491 | 2021-07-27,23:59:00,0.73787,0.73885,0.73371,0.73546 492 | 2021-07-28,00:00:00,0.73546,0.73808,0.73174,0.73744 493 | 2021-07-29,00:00:00,0.73724,0.7413,0.73592,0.7394 494 | 2021-07-30,17:00:00,0.73928,0.74043,0.73468,0.73507 495 | 2021-08-01,00:00:00,0.73274,0.7344,0.73274,0.73377 496 | 2021-08-02,00:00:00,0.73371,0.73817,0.73293,0.73637 497 | 2021-08-03,00:00:00,0.73601,0.74077,0.73571,0.73934 498 | 2021-08-04,23:58:00,0.73935,0.74261,0.73701,0.73778 499 | 2021-08-05,23:58:00,0.73793,0.74156,0.73765,0.74022 500 | 2021-08-06,17:00:00,0.74013,0.7406,0.7352,0.7354 501 | 2021-08-08,00:00:00,0.73482,0.73553,0.73479,0.73544 502 | 2021-08-09,00:00:00,0.73546,0.73636,0.73271,0.7328 503 | 2021-08-10,00:00:00,0.7328,0.73557,0.73159,0.73464 504 | 2021-08-11,23:59:00,0.73412,0.7388,0.7323,0.73725 505 | 2021-08-12,00:00:00,0.73701,0.73763,0.73262,0.73348 506 | 2021-08-13,17:00:00,0.73348,0.73764,0.7333,0.73746 507 | 2021-08-15,23:50:00,0.73616,0.73699,0.73616,0.7366 508 | 2021-08-16,00:00:00,0.7366,0.73727,0.73194,0.73367 509 | 2021-08-17,00:00:00,0.73362,0.73407,0.72422,0.72533 510 | 2021-08-18,00:00:00,0.72518,0.72691,0.72286,0.72358 511 | 2021-08-19,00:00:00,0.72325,0.72426,0.71425,0.71465 512 | 2021-08-20,17:00:00,0.7146,0.7156,0.71064,0.7126 513 | 2021-08-22,23:46:00,0.71326,0.7139,0.71287,0.71352 514 | 2021-08-23,23:59:00,0.71235,0.72174,0.71235,0.72096 515 | 2021-08-24,00:00:00,0.72111,0.72701,0.72007,0.72552 516 | 2021-08-25,00:00:00,0.72524,0.72799,0.72373,0.7273 517 | 2021-08-26,00:00:00,0.72709,0.72795,0.72331,0.72351 518 | 2021-08-27,17:00:00,0.72338,0.73064,0.7222,0.72961 519 | 2021-08-29,00:00:00,0.73023,0.73116,0.73023,0.73116 520 | 2021-08-30,23:51:00,0.73091,0.73181,0.72844,0.72936 521 | 2021-08-31,00:00:00,0.7293,0.73411,0.72881,0.73129 522 | 2021-09-01,00:00:00,0.73103,0.73835,0.73078,0.73672 523 | 2021-09-02,00:00:00,0.73672,0.74089,0.73556,0.74004 524 | 2021-09-03,17:00:00,0.73982,0.7477,0.73951,0.74446 525 | 2021-09-05,00:00:00,0.74558,0.74558,0.74484,0.74534 526 | 2021-09-06,00:00:00,0.7451,0.74546,0.74257,0.74361 527 | 2021-09-07,23:59:00,0.74361,0.74673,0.73746,0.73847 528 | 2021-09-08,00:00:00,0.73826,0.74037,0.73449,0.73654 529 | 2021-09-09,00:00:00,0.73646,0.73938,0.73467,0.7368 530 | 2021-09-10,17:00:00,0.73659,0.74092,0.73604,0.73768 531 | 2021-09-12,00:00:00,0.73558,0.73588,0.73474,0.73522 532 | 2021-09-13,23:59:00,0.73523,0.73754,0.73365,0.73686 533 | 2021-09-14,00:00:00,0.73681,0.73732,0.73133,0.73188 534 | 2021-09-15,23:59:00,0.73159,0.73385,0.73014,0.73306 535 | 2021-09-16,00:00:00,0.7329,0.73438,0.72739,0.72934 536 | 2021-09-17,17:00:00,0.72899,0.73214,0.72681,0.72737 537 | 2021-09-19,23:58:00,0.72617,0.72627,0.72599,0.72625 538 | 2021-09-20,23:59:00,0.72619,0.72682,0.72201,0.7252 539 | 2021-09-21,00:00:00,0.72498,0.72827,0.72232,0.72289 540 | 2021-09-22,23:59:00,0.72315,0.72946,0.72237,0.7239 541 | 2021-09-23,23:58:00,0.72363,0.73152,0.72229,0.72938 542 | 2021-09-24,17:00:00,0.72937,0.73157,0.72357,0.72456 543 | 2021-09-26,00:00:00,0.72516,0.72614,0.72475,0.72574 544 | 2021-09-27,00:00:00,0.72574,0.72935,0.72493,0.72839 545 | 2021-09-28,00:00:00,0.72829,0.73106,0.72256,0.72385 546 | 2021-09-29,00:00:00,0.72369,0.72639,0.71701,0.71765 547 | 2021-09-30,00:00:00,0.71749,0.72568,0.71748,0.7228 548 | 2021-10-01,17:00:00,0.72258,0.72738,0.71918,0.72572 549 | 2021-10-03,23:59:00,0.72599,0.72643,0.72599,0.72604 550 | 2021-10-04,00:00:00,0.7259,0.73036,0.7251,0.72889 551 | 2021-10-05,00:00:00,0.72874,0.73006,0.72491,0.72865 552 | 2021-10-06,00:00:00,0.72851,0.72931,0.7226,0.72693 553 | 2021-10-07,00:00:00,0.72669,0.7324,0.72669,0.73118 554 | 2021-10-08,17:00:00,0.73111,0.73375,0.72881,0.73125 555 | 2021-10-10,00:00:00,0.73058,0.73079,0.73024,0.73037 556 | 2021-10-11,00:00:00,0.73019,0.73725,0.72922,0.7347 557 | 2021-10-12,00:00:00,0.7347,0.73843,0.73322,0.73502 558 | 2021-10-13,00:00:00,0.73498,0.73815,0.73233,0.73796 559 | 2021-10-14,00:00:00,0.73784,0.74262,0.73719,0.74142 560 | 2021-10-15,17:00:00,0.74146,0.74395,0.74034,0.74241 561 | 2021-10-17,00:00:00,0.7412,0.74245,0.74106,0.74186 562 | 2021-10-18,00:00:00,0.7415,0.74368,0.73785,0.74096 563 | 2021-10-19,00:00:00,0.74099,0.74853,0.74075,0.7472 564 | 2021-10-20,00:00:00,0.74735,0.75225,0.74649,0.75143 565 | 2021-10-21,00:00:00,0.75155,0.75462,0.74587,0.74659 566 | 2021-10-22,17:00:00,0.74656,0.7512,0.74535,0.74875 567 | 2021-10-24,00:00:00,0.74647,0.74661,0.74641,0.74648 568 | 2021-10-25,00:00:00,0.74641,0.75049,0.74639,0.74878 569 | 2021-10-26,00:00:00,0.74878,0.75252,0.74842,0.74983 570 | 2021-10-27,00:00:00,0.74976,0.75359,0.74871,0.75134 571 | 2021-10-28,00:00:00,0.75134,0.75552,0.74794,0.75414 572 | 2021-10-29,17:00:00,0.75398,0.7555,0.7505,0.75098 573 | 2021-10-31,00:00:00,0.75086,0.75203,0.75071,0.7515 574 | 2021-11-01,00:00:00,0.75156,0.75358,0.7486,0.75215 575 | 2021-11-02,00:00:00,0.75213,0.75312,0.74203,0.74292 576 | 2021-11-03,00:00:00,0.74297,0.74603,0.74121,0.74556 577 | 2021-11-04,00:00:00,0.74551,0.74701,0.73829,0.74029 578 | 2021-11-05,17:00:00,0.74029,0.74105,0.73599,0.74065 579 | 2021-11-07,00:00:00,0.7394,0.74096,0.73932,0.73966 580 | 2021-11-08,00:00:00,0.73966,0.74309,0.7384,0.74201 581 | 2021-11-09,00:00:00,0.74203,0.74311,0.73609,0.73747 582 | 2021-11-10,00:00:00,0.73762,0.73931,0.73228,0.73272 583 | 2021-11-11,00:00:00,0.73262,0.73408,0.72859,0.72912 584 | 2021-11-12,17:00:00,0.729,0.73211,0.72764,0.73205 585 | 2021-11-14,00:00:00,0.73241,0.73313,0.73239,0.73283 586 | 2021-11-15,00:00:00,0.73284,0.73704,0.73231,0.73424 587 | 2021-11-16,00:00:00,0.73431,0.73675,0.72921,0.7299 588 | 2021-11-17,00:00:00,0.72993,0.73046,0.72586,0.72633 589 | 2021-11-18,00:00:00,0.72633,0.72927,0.72498,0.72743 590 | 2021-11-19,17:00:00,0.72746,0.72909,0.72269,0.72535 591 | 2021-11-21,00:00:00,0.72316,0.72333,0.72284,0.723 592 | 2021-11-22,00:00:00,0.72269,0.72729,0.72206,0.72238 593 | 2021-11-23,00:00:00,0.72235,0.72361,0.72066,0.72219 594 | 2021-11-24,00:00:00,0.72219,0.72273,0.71837,0.71937 595 | 2021-11-25,00:00:00,0.71934,0.72088,0.71777,0.71855 596 | 2021-11-26,17:00:00,0.71855,0.71898,0.71128,0.7126 597 | 2021-11-28,00:00:00,0.71257,0.71298,0.71148,0.71173 598 | 2021-11-29,00:00:00,0.71178,0.71593,0.71149,0.71373 599 | 2021-11-30,00:00:00,0.71366,0.717,0.70795,0.7123 600 | 2021-12-01,00:00:00,0.71244,0.71727,0.70946,0.7101 601 | 2021-12-02,00:00:00,0.70985,0.71192,0.70844,0.70897 602 | 2021-12-03,17:00:00,0.70889,0.70917,0.70133,0.7016 603 | 2021-12-05,00:00:00,0.69967,0.70055,0.69967,0.69989 604 | 2021-12-06,00:00:00,0.69979,0.7055,0.69979,0.70466 605 | 2021-12-07,00:00:00,0.7047,0.71226,0.70395,0.71149 606 | 2021-12-08,00:00:00,0.71148,0.71827,0.71148,0.71639 607 | 2021-12-09,00:00:00,0.7162,0.71865,0.71355,0.71422 608 | 2021-12-10,17:00:00,0.71433,0.71821,0.71324,0.71687 609 | 2021-12-12,00:00:00,0.71569,0.71673,0.71524,0.71578 610 | 2021-12-13,23:58:00,0.71524,0.71761,0.71108,0.71294 611 | 2021-12-14,00:00:00,0.71294,0.71352,0.70898,0.70989 612 | 2021-12-15,00:00:00,0.7099,0.71771,0.70922,0.71672 613 | 2021-12-16,00:00:00,0.71657,0.72233,0.71454,0.71776 614 | 2021-12-17,17:00:00,0.7177,0.71816,0.7136,0.71515 615 | 2021-12-19,00:00:00,0.71247,0.71317,0.71247,0.71278 616 | 2021-12-20,00:00:00,0.71279,0.71281,0.70822,0.71037 617 | 2021-12-21,00:00:00,0.7104,0.71557,0.70987,0.71467 618 | 2021-12-22,00:00:00,0.71459,0.722,0.71207,0.72035 619 | 2021-12-23,00:00:00,0.72015,0.72514,0.7196,0.72375 620 | 2021-12-24,17:00:00,0.72375,0.7243,0.72208,0.7221 621 | 2021-12-26,00:00:00,0.72246,0.72271,0.7219,0.72219 622 | 2021-12-27,00:00:00,0.72283,0.72447,0.72055,0.72351 623 | 2021-12-28,00:00:00,0.72344,0.72633,0.72192,0.72201 624 | 2021-12-29,00:00:00,0.72234,0.7272,0.72128,0.72434 625 | 2021-12-30,00:00:00,0.72434,0.72752,0.72431,0.72471 626 | 2021-12-31,17:00:00,0.72467,0.7274,0.72436,0.72698 627 | 2022-01-02,00:00:00,0.72621,0.72701,0.72621,0.72674 628 | 2022-01-03,00:00:00,0.72649,0.72768,0.71838,0.71866 629 | 2022-01-04,00:00:00,0.71846,0.72484,0.71846,0.72358 630 | 2022-01-05,00:00:00,0.72341,0.72719,0.72153,0.72188 631 | 2022-01-06,00:00:00,0.72188,0.72226,0.71455,0.71572 632 | 2022-01-07,17:00:00,0.71604,0.71772,0.71296,0.71642 633 | 2022-01-09,00:00:00,0.71705,0.71803,0.71705,0.71788 634 | 2022-01-10,18:58:00,0.7177,0.72022,0.71489,0.71673 635 | 2022-01-11,00:00:00,0.71851,0.72131,0.7155,0.72074 636 | 2022-01-12,00:00:00,0.72068,0.72923,0.72004,0.72823 637 | 2022-01-13,00:00:00,0.72818,0.7314,0.72732,0.72781 638 | 2022-01-14,17:00:00,0.72769,0.72931,0.72301,0.72321 639 | 2022-01-16,23:59:00,0.72163,0.72192,0.72083,0.72149 640 | 2022-01-17,00:00:00,0.72141,0.72291,0.71954,0.72066 641 | 2022-01-18,00:00:00,0.72067,0.72276,0.71698,0.71827 642 | 2022-01-19,00:00:00,0.71836,0.72376,0.71768,0.72093 643 | 2022-01-20,00:00:00,0.72062,0.72763,0.72062,0.7223 644 | 2022-01-21,17:00:00,0.72227,0.72273,0.71813,0.71974 645 | 2022-01-23,00:00:00,0.7171,0.71761,0.71696,0.71739 646 | 2022-01-24,00:00:00,0.71738,0.71873,0.70906,0.7143 647 | 2022-01-25,00:00:00,0.7143,0.71749,0.71213,0.71493 648 | 2022-01-26,23:58:00,0.71496,0.71807,0.70955,0.71166 649 | 2022-01-27,00:00:00,0.71152,0.71211,0.70236,0.70313 650 | 2022-01-28,17:00:00,0.70309,0.70453,0.69674,0.69955 651 | 2022-01-30,00:00:00,0.69869,0.69971,0.69869,0.69955 652 | 2022-01-31,00:00:00,0.69939,0.70765,0.6987,0.70647 653 | 2022-02-01,00:00:00,0.70653,0.71319,0.70334,0.71277 654 | 2022-02-02,00:00:00,0.7127,0.71585,0.7118,0.71324 655 | 2022-02-03,00:00:00,0.71322,0.71676,0.71095,0.71389 656 | 2022-02-04,17:00:00,0.71382,0.71514,0.70516,0.70581 657 | 2022-02-06,00:00:00,0.70752,0.7084,0.70735,0.70822 658 | 2022-02-07,00:00:00,0.70838,0.713,0.7065,0.7121 659 | 2022-02-08,00:00:00,0.71222,0.71467,0.71064,0.7143 660 | 2022-02-09,00:00:00,0.71427,0.71943,0.71416,0.71778 661 | 2022-02-10,00:00:00,0.71786,0.72484,0.71483,0.71641 662 | 2022-02-11,17:00:00,0.71636,0.71847,0.71087,0.71754 663 | 2022-02-13,00:00:00,0.71284,0.71326,0.71276,0.713 664 | 2022-02-14,00:00:00,0.71306,0.71501,0.70861,0.71239 665 | 2022-02-15,00:00:00,0.71253,0.71561,0.71018,0.71516 666 | 2022-02-16,00:00:00,0.71491,0.72046,0.71434,0.71948 667 | 2022-02-17,00:00:00,0.71948,0.72171,0.71498,0.71837 668 | 2022-02-18,17:00:00,0.7184,0.72275,0.71759,0.71768 669 | 2022-02-20,00:00:00,0.71709,0.71786,0.71709,0.71723 670 | 2022-02-21,00:00:00,0.71724,0.72222,0.71666,0.71838 671 | 2022-02-22,00:00:00,0.71839,0.7233,0.71717,0.72181 672 | 2022-02-23,00:00:00,0.72179,0.72836,0.72175,0.72275 673 | 2022-02-24,00:00:00,0.72278,0.72322,0.70943,0.7162 674 | 2022-02-25,17:00:00,0.71616,0.72369,0.71414,0.72243 675 | 2022-02-27,00:00:00,0.71764,0.71902,0.71713,0.7178 676 | 2022-02-28,00:00:00,0.71784,0.72653,0.71677,0.72593 677 | 2022-03-01,00:00:00,0.7261,0.72896,0.72385,0.72496 678 | 2022-03-02,00:00:00,0.72484,0.7306,0.72433,0.72931 679 | 2022-03-03,00:00:00,0.72912,0.73474,0.72761,0.73253 680 | 2022-03-04,17:00:00,0.7325,0.73741,0.73006,0.73485 681 | 2022-03-06,00:00:00,0.73714,0.73748,0.73679,0.73705 682 | 2022-03-07,23:56:00,0.73699,0.74392,0.73097,0.73137 683 | 2022-03-08,00:00:00,0.73129,0.73477,0.72455,0.7264 684 | 2022-03-09,00:00:00,0.72664,0.73368,0.72641,0.73168 685 | 2022-03-10,00:00:00,0.73168,0.73671,0.72873,0.73524 686 | 2022-03-11,17:00:00,0.73519,0.73669,0.73059,0.73196 687 | 2022-03-13,00:00:00,0.72863,0.7292,0.72839,0.72898 688 | 2022-03-14,00:00:00,0.72898,0.72985,0.71858,0.7202 689 | 2022-03-15,00:00:00,0.72025,0.7227,0.71651,0.71926 690 | 2022-03-16,00:00:00,0.71926,0.72969,0.71804,0.72875 691 | 2022-03-17,00:00:00,0.72895,0.73929,0.72837,0.73749 692 | 2022-03-18,17:00:00,0.73744,0.74115,0.73609,0.74025 693 | 2022-03-20,00:00:00,0.74069,0.74137,0.74016,0.74061 694 | 2022-03-21,00:00:00,0.74061,0.74244,0.73743,0.73989 695 | 2022-03-22,00:00:00,0.73992,0.74767,0.7376,0.7473 696 | 2022-03-23,00:00:00,0.74725,0.7507,0.74501,0.74863 697 | 2022-03-24,00:00:00,0.74874,0.75269,0.74664,0.75148 698 | 2022-03-25,17:00:00,0.75149,0.75362,0.74948,0.75 699 | 2022-03-27,00:00:00,0.75024,0.75155,0.75024,0.75103 700 | 2022-03-28,00:00:00,0.75082,0.75397,0.74665,0.74883 701 | 2022-03-29,23:59:00,0.74883,0.7518,0.74563,0.75093 702 | 2022-03-30,23:59:00,0.75093,0.75356,0.75023,0.75108 703 | 2022-03-31,00:00:00,0.75086,0.7525,0.74704,0.74833 704 | 2022-04-01,17:00:00,0.74826,0.75242,0.74725,0.74897 705 | 2022-04-03,00:00:00,0.74864,0.74949,0.74864,0.74905 706 | 2022-04-04,23:59:00,0.749,0.7556,0.74829,0.75408 707 | 2022-04-05,23:59:00,0.75406,0.76608,0.75359,0.75765 708 | 2022-04-06,00:00:00,0.75765,0.75928,0.74858,0.75081 709 | 2022-04-07,00:00:00,0.75086,0.75189,0.74668,0.74793 710 | 2022-04-08,17:00:00,0.74794,0.74925,0.74262,0.745 711 | 2022-04-10,23:59:00,0.74562,0.74608,0.7451,0.74599 712 | 2022-04-11,00:00:00,0.74601,0.74657,0.74123,0.74187 713 | 2022-04-12,00:00:00,0.74177,0.74931,0.73994,0.74518 714 | 2022-04-13,00:00:00,0.74509,0.74748,0.73919,0.7453 715 | 2022-04-14,00:00:00,0.74524,0.74682,0.73972,0.74145 716 | 2022-04-15,17:00:00,0.74145,0.74173,0.7396,0.73977 717 | 2022-04-17,00:00:00,0.73909,0.73928,0.73898,0.73926 718 | 2022-04-18,00:00:00,0.73924,0.74033,0.73425,0.73511 719 | 2022-04-19,00:00:00,0.73514,0.73996,0.73451,0.73756 720 | 2022-04-20,00:00:00,0.73744,0.74575,0.73726,0.74511 721 | 2022-04-21,00:00:00,0.74493,0.74573,0.73648,0.73725 722 | 2022-04-22,17:00:00,0.73727,0.73738,0.7249,0.72542 723 | 2022-04-24,00:00:00,0.7246,0.72499,0.7243,0.72499 724 | 2022-04-25,00:00:00,0.72486,0.72486,0.71349,0.71808 725 | 2022-04-26,23:53:00,0.7181,0.72285,0.71171,0.7119 726 | 2022-04-27,00:00:00,0.71187,0.71906,0.7101,0.71225 727 | 2022-04-28,00:00:00,0.71221,0.71621,0.70549,0.7099 728 | 2022-04-29,17:00:00,0.70987,0.71796,0.7095,0.71131 729 | 2022-05-01,00:00:00,0.70685,0.70695,0.70642,0.70656 730 | 2022-05-02,23:59:00,0.70633,0.70816,0.70299,0.70517 731 | 2022-05-03,00:00:00,0.70518,0.71474,0.70466,0.70952 732 | 2022-05-04,23:59:00,0.70954,0.72651,0.70884,0.72547 733 | 2022-05-05,00:00:00,0.72549,0.72657,0.7077,0.71104 734 | 2022-05-06,17:00:00,0.71102,0.71339,0.70584,0.71009 735 | 2022-05-08,00:00:00,0.70659,0.70713,0.70658,0.70678 736 | 2022-05-09,00:00:00,0.70671,0.70671,0.69442,0.69466 737 | 2022-05-10,00:00:00,0.69465,0.69858,0.69106,0.69365 738 | 2022-05-11,00:00:00,0.69356,0.70532,0.69275,0.69389 739 | 2022-05-12,00:00:00,0.69385,0.69527,0.68286,0.68535 740 | 2022-05-13,17:00:00,0.68521,0.69221,0.685,0.69102 741 | 2022-05-15,00:00:00,0.69287,0.69338,0.69265,0.6931 742 | 2022-05-16,00:00:00,0.69301,0.69823,0.68728,0.69708 743 | 2022-05-17,00:00:00,0.69708,0.70401,0.69678,0.70281 744 | 2022-05-18,00:00:00,0.7029,0.70462,0.69494,0.69542 745 | 2022-05-19,00:00:00,0.69522,0.70724,0.69522,0.70465 746 | 2022-05-20,17:00:00,0.7045,0.70732,0.7002,0.7028 747 | 2022-05-22,00:00:00,0.70453,0.70512,0.7037,0.70498 748 | 2022-05-23,00:00:00,0.7048,0.71267,0.70476,0.71064 749 | 2022-05-24,00:00:00,0.71053,0.71129,0.7057,0.71055 750 | 2022-05-25,23:59:00,0.71055,0.7119,0.70353,0.70867 751 | 2022-05-26,00:00:00,0.70852,0.71094,0.70569,0.7095 752 | 2022-05-27,17:00:00,0.7094,0.71666,0.70891,0.71507 753 | 2022-05-29,00:00:00,0.71574,0.71604,0.71518,0.71588 754 | 2022-05-30,00:00:00,0.71559,0.71999,0.71541,0.71955 755 | 2022-05-31,00:00:00,0.71937,0.72033,0.71495,0.7175 756 | 2022-06-01,00:00:00,0.71734,0.723,0.71555,0.71738 757 | 2022-06-02,23:54:00,0.71742,0.72694,0.71408,0.72637 758 | 2022-06-03,17:00:00,0.72634,0.72826,0.72171,0.72283 759 | 2022-06-05,23:59:00,0.72096,0.72112,0.72073,0.72091 760 | 2022-06-06,23:58:00,0.72092,0.72313,0.71866,0.71929 761 | 2022-06-07,23:59:00,0.71928,0.72454,0.71569,0.72296 762 | 2022-06-08,00:00:00,0.72305,0.72339,0.71754,0.71904 763 | 2022-06-09,00:00:00,0.71889,0.71971,0.70934,0.70966 764 | 2022-06-10,17:00:00,0.70969,0.71378,0.70372,0.70475 765 | 2022-06-12,00:00:00,0.70364,0.70504,0.70329,0.70378 766 | 2022-06-13,00:00:00,0.70333,0.70352,0.69116,0.69256 767 | 2022-06-14,00:00:00,0.69256,0.69701,0.68506,0.68739 768 | 2022-06-15,00:00:00,0.68737,0.70239,0.68706,0.70054 769 | 2022-06-16,00:00:00,0.70042,0.70689,0.69436,0.70469 770 | 2022-06-17,17:00:00,0.70468,0.7051,0.69009,0.69054 771 | 2022-06-19,00:00:00,0.6919,0.69344,0.69174,0.69329 772 | 2022-06-20,00:00:00,0.69323,0.69957,0.69265,0.69519 773 | 2022-06-21,00:00:00,0.69517,0.69934,0.69344,0.69675 774 | 2022-06-22,00:00:00,0.69678,0.69719,0.68812,0.69237 775 | 2022-06-23,00:00:00,0.69237,0.69276,0.68689,0.68964 776 | 2022-06-24,17:00:00,0.68978,0.69478,0.68885,0.69409 777 | 2022-06-26,00:00:00,0.69418,0.6943,0.69396,0.69413 778 | 2022-06-27,00:00:00,0.69402,0.69585,0.69069,0.69221 779 | 2022-06-28,00:00:00,0.69221,0.69639,0.69025,0.6905 780 | 2022-06-29,00:00:00,0.69052,0.69196,0.68616,0.68774 781 | 2022-06-30,23:59:00,0.68758,0.69189,0.68533,0.69006 782 | 2022-07-01,17:00:00,0.68997,0.6903,0.67638,0.67707 783 | 2022-07-03,23:59:00,0.68095,0.68146,0.68095,0.68124 784 | 2022-07-04,00:00:00,0.68101,0.68883,0.67935,0.68646 785 | 2022-07-05,00:00:00,0.68645,0.68946,0.67619,0.67967 786 | 2022-07-06,00:00:00,0.67956,0.68256,0.67617,0.67819 787 | 2022-07-07,00:00:00,0.67819,0.68482,0.67643,0.68383 788 | 2022-07-08,17:00:00,0.68371,0.68742,0.67916,0.68674 789 | 2022-07-10,00:00:00,0.68461,0.68538,0.68315,0.68515 790 | 2022-07-11,00:00:00,0.68522,0.68534,0.67144,0.67321 791 | 2022-07-12,23:59:00,0.67313,0.67786,0.67108,0.67552 792 | 2022-07-13,00:00:00,0.67538,0.68031,0.67253,0.67564 793 | 2022-07-14,00:00:00,0.67563,0.67874,0.66814,0.67454 794 | 2022-07-15,17:00:00,0.67421,0.68059,0.67189,0.67944 795 | 2022-07-17,00:00:00,0.67867,0.67901,0.67867,0.67897 796 | 2022-07-18,00:00:00,0.67894,0.68541,0.67882,0.68119 797 | 2022-07-19,00:00:00,0.68121,0.69123,0.68024,0.68979 798 | 2022-07-20,00:00:00,0.68971,0.693,0.68729,0.6886 799 | 2022-07-21,23:59:00,0.68844,0.69364,0.68589,0.69321 800 | 2022-07-22,17:00:00,0.69321,0.69768,0.68931,0.69604 801 | 2022-07-24,00:00:00,0.69245,0.6926,0.69225,0.69225 802 | 2022-07-25,00:00:00,0.69179,0.69651,0.68796,0.69553 803 | 2022-07-26,00:00:00,0.69551,0.69827,0.69218,0.69362 804 | 2022-07-27,23:55:00,0.69338,0.7012,0.69123,0.69908 805 | 2022-07-28,00:00:00,0.699,0.70134,0.69548,0.69883 806 | 2022-07-29,17:00:00,0.69865,0.70316,0.6911,0.69755 807 | 2022-07-31,00:00:00,0.69821,0.69871,0.69763,0.69829 808 | 2022-08-01,23:57:00,0.69834,0.70469,0.6968,0.70247 809 | 2022-08-02,00:00:00,0.70243,0.70319,0.69128,0.69177 810 | 2022-08-03,00:00:00,0.69174,0.69555,0.6886,0.69462 811 | 2022-08-04,23:56:00,0.6947,0.69896,0.69348,0.69649 812 | 2022-08-05,17:00:00,0.69634,0.69744,0.68697,0.69152 813 | 2022-08-07,00:00:00,0.69019,0.69112,0.69019,0.69069 814 | 2022-08-08,00:00:00,0.69069,0.70091,0.68977,0.69826 815 | 2022-08-09,00:00:00,0.69825,0.69942,0.69529,0.69633 816 | 2022-08-10,23:59:00,0.69632,0.7109,0.6947,0.70775 817 | 2022-08-11,23:59:00,0.70759,0.71364,0.7063,0.71025 818 | 2022-08-12,17:00:00,0.71,0.71277,0.70846,0.71016 819 | 2022-08-14,23:59:00,0.71134,0.71194,0.71122,0.71187 820 | 2022-08-15,00:00:00,0.71175,0.71247,0.7011,0.7021 821 | 2022-08-16,00:00:00,0.70207,0.70397,0.6991,0.70181 822 | 2022-08-17,23:59:00,0.70134,0.7026,0.69107,0.6933 823 | 2022-08-18,00:00:00,0.69318,0.69695,0.6899,0.69143 824 | 2022-08-19,17:00:00,0.69124,0.69195,0.68659,0.68677 825 | 2022-08-21,23:58:00,0.68678,0.68728,0.68668,0.68725 826 | 2022-08-22,00:00:00,0.68723,0.69282,0.68621,0.68731 827 | 2022-08-23,00:00:00,0.6873,0.69632,0.6856,0.69271 828 | 2022-08-24,00:00:00,0.69274,0.69309,0.6879,0.69069 829 | 2022-08-25,00:00:00,0.69068,0.6991,0.69022,0.69798 830 | 2022-08-26,17:00:00,0.69795,0.70088,0.6935,0.69387 831 | 2022-08-28,00:00:00,0.68781,0.68864,0.68763,0.6884 832 | 2022-08-29,00:00:00,0.6884,0.69258,0.68409,0.69004 833 | 2022-08-30,23:54:00,0.68999,0.69557,0.68457,0.68517 834 | 2022-08-31,00:00:00,0.68513,0.69038,0.68349,0.6841 835 | 2022-09-01,23:59:00,0.684,0.68454,0.6771,0.67829 836 | 2022-09-02,17:00:00,0.67823,0.68546,0.67792,0.68481 837 | 2022-09-04,00:00:00,0.67748,0.67909,0.67748,0.67851 838 | 2022-09-05,00:00:00,0.67814,0.68036,0.67725,0.67946 839 | 2022-09-06,00:00:00,0.67944,0.68321,0.67278,0.67349 840 | 2022-09-07,23:55:00,0.67346,0.67694,0.66988,0.67691 841 | 2022-09-08,00:00:00,0.67684,0.67735,0.67129,0.67468 842 | 2022-09-09,17:00:00,0.67469,0.68768,0.67468,0.68392 843 | 2022-09-11,00:00:00,0.68326,0.6838,0.68293,0.68368 844 | 2022-09-12,00:00:00,0.68364,0.68993,0.68239,0.68861 845 | 2022-09-13,00:00:00,0.68857,0.69157,0.67252,0.67365 846 | 2022-09-14,00:00:00,0.6736,0.676,0.67049,0.67475 847 | 2022-09-15,23:58:00,0.67486,0.67699,0.66959,0.6697 848 | 2022-09-16,17:00:00,0.66973,0.67239,0.66699,0.67044 849 | 2022-09-18,00:00:00,0.67132,0.67179,0.67126,0.67142 850 | 2022-09-19,00:00:00,0.67115,0.67335,0.66719,0.67272 851 | 2022-09-20,00:00:00,0.67269,0.6747,0.66763,0.66866 852 | 2022-09-21,00:00:00,0.66866,0.67046,0.66218,0.66305 853 | 2022-09-22,00:00:00,0.66312,0.66704,0.65739,0.66415 854 | 2022-09-23,17:00:00,0.66404,0.66554,0.6536,0.65362 855 | 2022-09-25,23:58:00,0.65142,0.65255,0.65142,0.65198 856 | 2022-09-26,00:00:00,0.652,0.65373,0.64374,0.64549 857 | 2022-09-27,00:00:00,0.64547,0.65127,0.64139,0.64315 858 | 2022-09-28,23:59:00,0.64313,0.65308,0.6363,0.65194 859 | 2022-09-29,00:00:00,0.65189,0.65208,0.64355,0.64996 860 | 2022-09-30,17:00:00,0.64994,0.65232,0.64246,0.64282 861 | 2022-10-02,00:00:00,0.63988,0.64112,0.63988,0.64033 862 | 2022-10-03,00:00:00,0.64027,0.65216,0.64003,0.65127 863 | 2022-10-04,00:00:00,0.65125,0.65471,0.64501,0.65004 864 | 2022-10-05,00:00:00,0.65005,0.65258,0.64164,0.64893 865 | 2022-10-06,00:00:00,0.6489,0.65405,0.6389,0.64107 866 | 2022-10-07,17:00:00,0.64104,0.64321,0.63702,0.6405 867 | 2022-10-09,00:00:00,0.63634,0.63676,0.63596,0.6366 868 | 2022-10-10,00:00:00,0.63662,0.63796,0.62747,0.62952 869 | 2022-10-11,00:00:00,0.62949,0.63456,0.62473,0.62708 870 | 2022-10-12,00:00:00,0.62708,0.62985,0.62355,0.62763 871 | 2022-10-13,23:59:00,0.62763,0.63159,0.61701,0.62964 872 | 2022-10-14,17:00:00,0.62959,0.63469,0.62253,0.62406 873 | 2022-10-16,23:59:00,0.62058,0.62077,0.62022,0.62044 874 | 2022-10-17,00:00:00,0.62067,0.63118,0.6205,0.62867 875 | 2022-10-18,00:00:00,0.62866,0.63394,0.62658,0.63107 876 | 2022-10-19,00:00:00,0.63076,0.63248,0.6251,0.62712 877 | 2022-10-20,00:00:00,0.6271,0.6356,0.62283,0.62818 878 | 2022-10-21,17:00:00,0.62796,0.63346,0.62099,0.63143 879 | 2022-10-23,00:00:00,0.63897,0.63988,0.63872,0.63979 880 | 2022-10-24,00:00:00,0.63979,0.64109,0.62723,0.63083 881 | 2022-10-25,00:00:00,0.63076,0.64119,0.63034,0.63906 882 | 2022-10-26,00:00:00,0.63906,0.65106,0.63721,0.64904 883 | 2022-10-27,00:00:00,0.64904,0.65218,0.64255,0.64509 884 | 2022-10-28,17:00:00,0.64519,0.64794,0.63955,0.6407 885 | 2022-10-30,00:00:00,0.63992,0.64077,0.63967,0.63988 886 | 2022-10-31,00:00:00,0.63989,0.64277,0.6368,0.6404 887 | 2022-11-01,00:00:00,0.64039,0.64636,0.63767,0.63939 888 | 2022-11-02,00:00:00,0.63938,0.64919,0.63453,0.63471 889 | 2022-11-03,00:00:00,0.6347,0.63717,0.6272,0.62908 890 | 2022-11-04,17:00:00,0.6291,0.64766,0.62848,0.64342 891 | 2022-11-06,00:00:00,0.64194,0.64284,0.6406,0.641 892 | 2022-11-07,00:00:00,0.64202,0.64905,0.64064,0.64708 893 | 2022-11-08,00:00:00,0.64708,0.65509,0.64441,0.65013 894 | 2022-11-09,00:00:00,0.65008,0.65218,0.64144,0.64265 895 | 2022-11-10,00:00:00,0.64263,0.66315,0.63864,0.65941 896 | 2022-11-11,17:00:00,0.65949,0.66991,0.65781,0.66984 897 | 2022-11-13,00:00:00,0.66988,0.67029,0.66676,0.66687 898 | 2022-11-14,00:00:00,0.66825,0.67235,0.66635,0.66989 899 | 2022-11-15,00:00:00,0.66987,0.67968,0.66854,0.67571 900 | 2022-11-16,00:00:00,0.67557,0.67924,0.67196,0.67353 901 | 2022-11-17,00:00:00,0.67354,0.67507,0.66341,0.66833 902 | 2022-11-18,17:00:00,0.66837,0.67301,0.6661,0.6692 903 | 2022-11-20,00:00:00,0.66654,0.66707,0.66624,0.66703 904 | 2022-11-21,00:00:00,0.66706,0.66825,0.65849,0.66035 905 | 2022-11-22,00:00:00,0.66038,0.66513,0.66024,0.66442 906 | 2022-11-23,00:00:00,0.66442,0.67386,0.66339,0.67286 907 | 2022-11-24,00:00:00,0.67288,0.67779,0.67279,0.67594 908 | 2022-11-25,17:00:00,0.67592,0.67804,0.67205,0.67482 909 | 2022-11-27,00:00:00,0.6719,0.67271,0.67164,0.67189 910 | 2022-11-28,00:00:00,0.67189,0.67249,0.66417,0.66487 911 | 2022-11-29,00:00:00,0.66495,0.67484,0.66402,0.66819 912 | 2022-11-30,00:00:00,0.66818,0.68007,0.667,0.67892 913 | 2022-12-01,00:00:00,0.67891,0.68421,0.67826,0.68069 914 | 2022-12-02,17:00:00,0.68069,0.68357,0.67419,0.67731 915 | 2022-12-04,00:00:00,0.67907,0.6793,0.67744,0.6788 916 | 2022-12-05,00:00:00,0.67879,0.68507,0.66868,0.66985 917 | 2022-12-06,00:00:00,0.66985,0.67441,0.66807,0.66866 918 | 2022-12-07,00:00:00,0.66871,0.67419,0.66685,0.67201 919 | 2022-12-08,00:00:00,0.67202,0.67803,0.66984,0.67684 920 | 2022-12-09,17:00:00,0.67684,0.67999,0.67427,0.67941 921 | 2022-12-11,00:00:00,0.67857,0.67974,0.67839,0.67963 922 | 2022-12-12,00:00:00,0.67948,0.67975,0.67287,0.67467 923 | 2022-12-13,00:00:00,0.67467,0.68927,0.674,0.68531 924 | -------------------------------------------------------------------------------- /Chapter 12/LMAX AUD_USD 1 Minute.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Getting-Started-with-Forex-Trading-Using-Python/9cee60d4e83f73e36899242b59e0f961db75df23/Chapter 12/LMAX AUD_USD 1 Minute.7z -------------------------------------------------------------------------------- /Chapter 12/Trend following.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import threading 3 | import queue 4 | import time 5 | import matplotlib.pyplot as plt 6 | from datetime import datetime 7 | 8 | class tradingSystemMetadata: 9 | def __init__(self): 10 | self.initial_capital = 10000 11 | self.leverage = 30 12 | self.market_position = 0 13 | self.equity = 0 14 | self.last_price = 0 15 | self.equity_timeseries = [] 16 | self.list_of_orders = [] 17 | self.F1, self.F2, self.F3 = threading.Event(), threading.Event(), threading.Event() 18 | 19 | class slidingWindow: 20 | def __init__(self, len): 21 | self.data = [0 for i in range(len)] 22 | def add(self, element): 23 | self.data.pop(0) 24 | self.data.append(element) 25 | def last(self): 26 | return self.data[-1] 27 | def previous(self): 28 | return self.data[-2] 29 | 30 | bar_feed = queue.Queue() 31 | orders_stream = queue.Queue() 32 | 33 | System = tradingSystemMetadata() 34 | data_window_small = slidingWindow(5) 35 | data_window_large = slidingWindow(20) 36 | start_time = time.perf_counter() 37 | 38 | f = open("/Users/Doctor/Documents/NextCloud/Trading/Books (work in progress)/FX trading with Python/Chapter 11/data/AUDUSD_daily.csv") 39 | csvFile = csv.DictReader(f) 40 | all_data = list(csvFile) 41 | end_time = time.perf_counter() 42 | print(f'Data read in {round(end_time - start_time, 0)} second(s).') 43 | 44 | def getBar(): 45 | counter = 0 46 | for bar in all_data: 47 | bar['Open'] = float(bar['Open']) 48 | bar['High'] = float(bar['High']) 49 | bar['Low'] = float(bar['Low']) 50 | bar['Close'] = float(bar['Close']) 51 | bar_feed.put(bar) 52 | counter += 1 53 | if counter == 100000: 54 | break 55 | if int(counter / 100000) == counter / 100000: 56 | print('Processed', counter, 'bars') 57 | System.F1.clear() 58 | System.F2.set() 59 | System.F1.wait() 60 | print('Finished reading data') 61 | 62 | def moving_average(data): 63 | return sum(data) / len(data) 64 | 65 | def tradeLogic(): 66 | while True: 67 | try: 68 | bar = bar_feed.get(block=True, timeout=1) 69 | except: 70 | print('Finished trading logic', datetime.now()) 71 | break 72 | #################################### 73 | # trade logic starts here # 74 | #################################### 75 | open = bar['Open'] 76 | close = bar['Close'] 77 | data_window_small.add(close) 78 | data_window_large.add(close) 79 | ma_small = moving_average(data_window_small.data) 80 | ma_large = moving_average(data_window_large.data) 81 | if close < ma_small and ma_small < ma_large and System.market_position >= 0: 82 | order = {} 83 | order['Type'] = 'Market' 84 | order['Price'] = close 85 | order['Side'] = 'Sell' 86 | if System.market_position == 0: 87 | order['Size'] = 10000 88 | else: 89 | order['Size'] = 20000 90 | orders_stream.put(order) 91 | 92 | if close > ma_small and ma_small > ma_large and System.market_position <= 0: 93 | order = {} 94 | order['Type'] = 'Market' 95 | order['Price'] = close 96 | order['Side'] = 'Buy' 97 | if System.market_position == 0: 98 | order['Size'] = 10000 99 | else: 100 | order['Size'] = 20000 101 | orders_stream.put(order) 102 | #################################### 103 | # trade logic ends here # 104 | #################################### 105 | bar_feed.put(bar) 106 | System.F2.clear() 107 | System.F3.set() 108 | System.F2.wait() 109 | 110 | def emulateBrokerExecution(bar, order): 111 | 112 | if order['Type'] == 'Market': 113 | # Here we actually receive order status from broker 114 | order['Status'] = 'Executed' 115 | 116 | # Emulating execution 117 | if order['Side'] == 'Buy': 118 | order['Executed Price'] = bar['Close'] + 0.00005 119 | if order['Side'] == 'Sell': 120 | order['Executed Price'] = bar['Close'] 121 | 122 | def processOrders(): 123 | while True: 124 | try: 125 | bar = bar_feed.get(block = True, timeout = 1) 126 | except: 127 | print('Finished processing orders at', datetime.now()) 128 | break 129 | System.equity += (bar['Close'] - System.last_price) * System.market_position 130 | System.equity_timeseries.append(System.equity) 131 | System.last_price = bar['Close'] 132 | 133 | while True: 134 | try: 135 | order = orders_stream.get(block = False) 136 | print('Received order', order) 137 | emulateBrokerExecution(bar, order) 138 | if order['Status'] == 'Executed': 139 | System.list_of_orders.append(order) 140 | print('Order executed', order) 141 | System.last_price = order['Executed Price'] 142 | if order['Side'] == 'Buy': 143 | System.market_position = System.market_position + order['Size'] 144 | if order['Side'] == 'Sell': 145 | System.market_position = System.market_position - order['Size'] 146 | except: 147 | order = 'No order' 148 | break 149 | 150 | System.F3.clear() 151 | System.F1.set() 152 | System.F3.wait() 153 | 154 | start_time = time.perf_counter() 155 | 156 | incoming_price_thread = threading.Thread(target = getBar) 157 | trading_thread = threading.Thread(target = tradeLogic) 158 | ordering_thread = threading.Thread(target = processOrders) 159 | 160 | incoming_price_thread.start() 161 | trading_thread.start() 162 | ordering_thread.start() 163 | 164 | while True: 165 | if incoming_price_thread.is_alive(): 166 | time.sleep(1) 167 | else: 168 | total_trades = len(System.list_of_orders) 169 | print("Total trades:", total_trades) 170 | print("Average trade:", System.equity / total_trades) 171 | end_time = time.perf_counter() 172 | print(f'Backtest complete in {round(end_time - start_time, 0)} second(s).') 173 | plt.plot(System.equity_timeseries) 174 | plt.show() 175 | break -------------------------------------------------------------------------------- /Chapter 12/bar maker.py: -------------------------------------------------------------------------------- 1 | import csv 2 | from datetime import datetime 3 | 4 | class slidingWindow: 5 | def __init__(self, len): 6 | self.data = [0 for i in range(len)] 7 | def add(self, element): 8 | self.data.pop(0) 9 | self.data.append(element) 10 | def last(self): 11 | return self.data[-1] 12 | def previous(self): 13 | return self.data[-2] 14 | 15 | source_file = open("/Volumes/Storage HDD/Data/LMAX AUD_USD 1 Minute.txt") 16 | dest_file = open("/Users/Doctor/Documents/NextCloud/Trading/Books (work in progress)/FX trading with Python/Chapter 11/data/AUDUSD_daily.csv", "w") 17 | csvFile = csv.DictReader(source_file) 18 | all_data = list(csvFile) 19 | dest_file.write(("Date,Time,Open,High,Low,Close\n")) 20 | 21 | timestamp = slidingWindow(2) 22 | 23 | bar = {'Open': 0, 'High': 0, 'Low': 0, 'Close': 0} 24 | 25 | for sample in all_data: 26 | open = float(sample[' ']) 27 | high = float(sample[' ']) 28 | low = float(sample[' ']) 29 | close = float(sample[' ']) 30 | ts = datetime.strptime(sample[''] + 'T' + sample['