├── .gitattributes ├── Algo S&T ├── Chen_Fu_algost.py ├── Chen_Fu_algost_conservative.py ├── algo_bot.py ├── example1.json ├── example2.json ├── example3.json ├── example_bot.py └── old │ ├── sample_0.json │ ├── sample_1.json │ └── sample_2.json ├── Barclays Options ├── Chen_Fu_options.py ├── example_bot.py ├── newsample.json ├── progressBar.py ├── sample_0.json └── sample_1.json ├── DayOf ├── __pycache__ │ └── mymodel.cpython-36.pyc ├── case_guidelines.pdf ├── dayof │ ├── __init__.py │ ├── __pycache__ │ │ └── __init__.cpython-36.pyc │ └── framework │ │ ├── __init__.py │ │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── loader.cpython-36.pyc │ │ ├── tester.cpython-36.pyc │ │ └── train_loaders.cpython-36.pyc │ │ ├── loader.py │ │ ├── tester.py │ │ └── train_loaders.py ├── mymodel.py ├── regression.py ├── run_allocate.py ├── submit_data │ ├── hard.csv │ ├── medium.csv │ └── simple.csv ├── test_allocate.py ├── test_data │ ├── hard.csv │ ├── medium.csv │ └── simple.csv ├── test_model.py ├── test_output.csv └── train_data │ ├── hard.csv │ ├── medium.csv │ └── simple.csv ├── LICENSE ├── Mangocore Binaries ├── mangocorelinuxamd64.x └── mangocoreosxamd64.x ├── README.md ├── Traders_MIT_Fall_2018.pdf └── test.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /Algo S&T/Chen_Fu_algost.py: -------------------------------------------------------------------------------- 1 | from tradersbot import TradersBot 2 | import sys 3 | from datetime import datetime, timedelta 4 | import random 5 | import numpy as np 6 | import pandas as pd 7 | 8 | C = 0.00004 # 1/25000 9 | CASE_LENGTH = 450 10 | CLOSE_OUT_MARGIN = 25 # when do we stop trading and balance our position 11 | CURRENCY = 'USD' 12 | DARK_TICKER = 'TRDRS.DARK' 13 | INITIAL_CASH = 100000 14 | ORDER_DELAY = 8 15 | ORDER_LIMIT = 1000 16 | ORDER_WAIT = 15 # how long to wait before evaluating the effect 17 | LIT_TICKER = 'TRDRS.LIT' 18 | MESSAGE_LIMIT = 25 19 | POSITION_LIMIT = 5000 20 | 21 | DARK_TRADING = True 22 | # DARK_TRADING = False 23 | POSITION_BALANCING = True 24 | CANCEL_TRADES = True 25 | # CANCEL_TRADES = False 26 | 27 | cash = 100000 28 | dark_advantage = 0.1 # ratio for DARK pricing 29 | dark_trading_history = [] # [(advantage, percentage)] 30 | first_time = None 31 | market_position_lit = 0 32 | market_position_dark = 0 33 | p0 = 200 34 | position_lit = 0 35 | position_dark = 0 36 | price = 200 37 | time_offset = 0 # for when it starts late 38 | 39 | # TODO: use a more sophisticated probability model 40 | # customers['Bob'] = {'full':0, 'half':5, 'random':1} 41 | # the values are the number of times each possibility occurs 42 | customers = {} 43 | # maps customer name to a list for the probability of being each person 44 | # 'Alice': ['random':p_r, 'half':p_h, 'full':p_f] 45 | customer_identities = {} 46 | pending_orders = [] 47 | # contains (ticker, trade_id, cancelled) = ('TRDRS.DARK', 0, False) 48 | cancelled_trades = set() 49 | recent_messages = [] 50 | 51 | def compute_valuation(): 52 | net_position = position_lit + position_dark 53 | asset_value = net_position * price 54 | total_value = asset_value + cash 55 | return total_value 56 | 57 | def update_probabilities(): 58 | # For simplicity, we'll assume there are only 3 customers. 59 | # TODO: Fix this for any number of customers. 60 | names = list(customers.keys()) 61 | probabilities = {} 62 | for key in customers: 63 | record = customers[key] 64 | total = record['random'] + record['half'] + record['full'] 65 | if total == 0: 66 | probabilities[key] = [1/3, 1/3, 1/3] 67 | else: 68 | probabilities[key] = [record['random'] / total, record['half'] / total, record['full'] / total] 69 | p = probabilities; a = names[0]; b = names[1]; c = names[2]; r = 0; h = 1; f = 2 70 | customer_identities[a]['random'] = p[a][r] * (p[b][h]*p[c][f] + p[b][f]*p[c][h]) 71 | customer_identities[a]['half'] = p[a][h] * (p[b][r]*p[c][f] + p[b][f]*p[c][r]) 72 | customer_identities[a]['full'] = p[a][f] * (p[b][r]*p[c][h] + p[b][h]*p[c][r]) 73 | customer_identities[b]['random'] = p[b][r] * (p[a][h]*p[c][f] + p[a][f]*p[c][h]) 74 | customer_identities[b]['half'] = p[b][h] * (p[a][r]*p[c][f] + p[a][f]*p[c][r]) 75 | customer_identities[b]['full'] = p[b][f] * (p[a][r]*p[c][h] + p[a][h]*p[c][r]) 76 | customer_identities[c]['random'] = p[c][r] * (p[b][h]*p[a][f] + p[b][f]*p[a][h]) 77 | customer_identities[c]['half'] = p[c][h] * (p[b][r]*p[a][f] + p[b][f]*p[a][r]) 78 | customer_identities[c]['full'] = p[c][f] * (p[b][r]*p[a][h] + p[b][h]*p[a][r]) 79 | 80 | 81 | def ready_to_send(): 82 | global recent_messages 83 | time_limit = get_time() - 1 84 | for i in range(len(recent_messages)): 85 | if recent_messages[i] >= time_limit: 86 | recent_messages = recent_messages[i:] 87 | break 88 | if len(recent_messages) < MESSAGE_LIMIT: 89 | recent_messages.append(get_time()) 90 | return True 91 | return False 92 | 93 | def get_time(): 94 | if first_time is None: 95 | return time_offset 96 | delta = datetime.now() - first_time 97 | return delta.total_seconds() + time_offset 98 | 99 | def process_orders(order): 100 | for pending in pending_orders: 101 | process_order(pending, order) 102 | 103 | def process_order(pending_order, order): 104 | if not pending_order['sold'] and not is_closing_time(): 105 | handle_pre_sale(pending_order, order) 106 | check_sold(pending_order) 107 | elif not pending_order['done'] and not is_closing_time(): 108 | handle_post_sale(pending_order, order) 109 | check_done(pending_order) 110 | else: 111 | handle_clean_up(pending_order, order) 112 | 113 | def handle_pre_sale(pending_order, order): 114 | reach_target_position(pending_order['target'], order) 115 | pending_order['dark_at_news'] = position_dark 116 | if DARK_TRADING: 117 | time_remaining = pending_order['sale_time'] - get_time() 118 | expected_position_lit = -position_dark + pending_order['size'] 119 | market_price_guess = p0 - C*expected_position_lit 120 | # If customers are buying, increase the price 121 | # If customers are selling, decrease the price 122 | advantage_price = dark_advantage if pending_order['buy'] else -dark_advantage 123 | advantage_price *= price 124 | advantage_price += price 125 | if len(pending_order['orders']) != 0: 126 | pass 127 | # TODO: Check and reguess if you were wrong. 128 | elif pending_order['quantity'] != 0: 129 | attempted_price = advantage_price 130 | result = make_trade(pending_order['quantity'], order, ticker=DARK_TICKER, price=attempted_price) 131 | # [quantity, price, [list of ids]] 132 | if result[0] > 0: 133 | pending_order['orders'].append(result + [[]]) 134 | pending_order['dark_advantage'] = dark_advantage 135 | 136 | 137 | def check_sold(pending_order): 138 | if get_time() > pending_order['sale_time']: 139 | pending_order['p0_at_sale'] = p0 140 | pending_order['dark_at_eval'] = position_dark 141 | pending_order['sold'] = True 142 | 143 | def handle_post_sale(pending_order, order): 144 | change_in_p0 = p0 - pending_order['p0_at_news'] 145 | full = C * pending_order['size'] 146 | half = full / 2 147 | margin = abs(full / 4) 148 | name = pending_order['source'] 149 | if abs(change_in_p0 - full) <= margin: 150 | customers[name]['full'] += 1 151 | pending_order['p0_at_eval'] = p0 152 | pending_order['dark_at_eval'] = position_dark 153 | adjust_dark_advantage(pending_order) 154 | elif abs(change_in_p0 - half) <= margin: 155 | customers[name]['half'] += 1 156 | pending_order['p0_at_eval'] = p0 157 | pending_order['dark_at_eval'] = position_dark 158 | adjust_dark_advantage(pending_order) 159 | elif abs(change_in_p0) <= margin: 160 | if get_time() > pending_order['eval_time']: 161 | customers[name]['random'] += 1 162 | pending_order['p0_at_eval'] = p0 163 | pending_order['dark_at_eval'] = position_dark 164 | adjust_dark_advantage(pending_order) 165 | elif get_time() > pending_order['eval_time']: 166 | pending_order['p0_at_eval'] = p0 167 | pending_order['dark_at_eval'] = position_dark 168 | adjust_dark_advantage(pending_order) 169 | else: 170 | reach_target_position(pending_order['target'], order) 171 | 172 | def adjust_dark_advantage(pending_order): 173 | global dark_advantage 174 | percentage = pending_order['dark_at_eval'] - pending_order['dark_at_news'] 175 | percentage /= pending_order['quantity'] 176 | percentage = abs(percentage) 177 | dark_trading_history.append((dark_advantage, percentage)) 178 | step = 0.1 # 10% step 179 | step *= dark_advantage 180 | margin = step / 2 181 | increase = dark_advantage + step 182 | decrease = dark_advantage - step 183 | up = [pair[1] for pair in dark_trading_history if abs(pair[0] - increase) <= margin] 184 | stay = [pair[1] for pair in dark_trading_history if abs(pair[0] - dark_advantage) <= margin] 185 | down = [pair[1] for pair in dark_trading_history if abs(pair[0] - dark_advantage) <= margin] 186 | # If we're not selling everything, move 187 | if len(up) == 0: 188 | if sum(down) == 0 and sum(stay) == 0: 189 | dark_advantage *= 0.81 190 | return 191 | if random.random() < 0.05: 192 | dark_advantage *= 1.1 193 | return 194 | else: 195 | up = [0] 196 | if len(down) == 0: 197 | if random.random() < 0.25: 198 | dark_advantage *= 0.9 199 | return 200 | else: 201 | down = [0] 202 | up = sum(up) / len(up) 203 | stay = sum(stay) / len(stay) 204 | down = sum(down) / len(down) 205 | up *= 1.1 206 | down *- 0.9 207 | best = max(up, stay, down) 208 | if up == best: 209 | dark_advantage *= 1.1 210 | elif down == best: 211 | dark_advantage *= 0.9 212 | 213 | def check_done(pending_order): 214 | pending_order['done'] = pending_order['p0_at_eval'] is not None 215 | 216 | def handle_clean_up(pending_order, order): 217 | if not CANCEL_TRADES: 218 | pending_orders.remove(pending_order) 219 | return 220 | for i in reversed(range(len(pending_order['orders']))): 221 | batch = pending_order['orders'][i] 222 | for j in reversed(range(len(batch[2]))): 223 | if ready_to_send(): 224 | order.addCancel(DARK_TICKER, batch[2][j]) 225 | batch[2].pop(j) 226 | if len(batch[2]) == 0: 227 | pending_order['orders'].pop(i) 228 | if len(pending_order['orders']) == 0: 229 | pending_orders.remove(pending_order) 230 | 231 | 232 | def reach_target_position(target, order, ticker=LIT_TICKER, price=None): 233 | net_position = position_lit + position_dark 234 | if net_position != target: 235 | make_trade(target - net_position, order) 236 | 237 | # Signed quantity, positive for buy, negative for sell 238 | def make_trade(quantity, order, ticker=LIT_TICKER, price=None): 239 | magnitude = abs(quantity) 240 | num_orders = (magnitude // ORDER_LIMIT) 241 | if magnitude != num_orders*ORDER_LIMIT: 242 | num_orders += 1 243 | buy = quantity > 0 244 | quantity = int(magnitude / num_orders) 245 | successes = 0 246 | if buy: 247 | for i in range(int(num_orders)): 248 | if ready_to_send(): 249 | if price is None: 250 | order.addBuy(ticker, quantity) 251 | else: 252 | order.addBuy(ticker, quantity, price=price) 253 | successes += 1 254 | else: 255 | for i in range(int(num_orders)): 256 | if ready_to_send(): 257 | if price is None: 258 | order.addSell(ticker, quantity) 259 | else: 260 | order.addSell(ticker, quantity, price=price) 261 | successes += 1 262 | return [quantity * successes * (1 if buy else -1), price] 263 | 264 | def is_closing_time(): 265 | return CASE_LENGTH - get_time() < CLOSE_OUT_MARGIN 266 | 267 | def close_out(order): 268 | if is_closing_time(): 269 | reach_target_position(0, order) 270 | 271 | def onAckRegister(msg, order): 272 | global POSITION_LIMIT, CURRENCY, CASE_LENGTH, INITIAL_CASH 273 | global time_offset, p0 274 | if 'TRDRS' in msg['case_meta']['underlyings']: 275 | POSITION_LIMIT = msg['case_meta']['underlyings']['TRDRS']['limit'] 276 | else: 277 | POSITION_LIMIT = msg['case_meta']['underlyings']['TRDRS.LIT']['limit'] 278 | CURRENCY = msg['case_meta']['default_currency'] 279 | CASE_LENGTH = msg['case_meta']['case_length'] 280 | p0 = msg['case_meta']['securities']['TRDRS.LIT']['starting_price'] 281 | time_offset = msg['elapsed_time'] 282 | if time_offset == 0: 283 | INITIAL_CASH = msg['trader_state']['cash'][CURRENCY] 284 | for name in msg['case_meta']['news_sources']: 285 | customers[name] = {'full': 0, 'half': 0, 'random': 0} 286 | customer_identities[name] = {'full': 1/3, 'half': 1/3, 'random': 1/3} 287 | onTraderUpdate(msg, order) 288 | 289 | def onMarketUpdate(msg, order): 290 | global first_time 291 | if first_time is None: 292 | first_time = datetime.now() 293 | state = msg['market_state'] 294 | if state['ticker'] == 'TRDRS.LIT': 295 | global market_position_lit, price, p0 296 | price = state['last_price'] 297 | delta = 0 298 | bids = [state['bids'][p] for p in state['bids'] if float(p) >= price] 299 | asks = [state['asks'][p] for p in state['asks'] if float(p) <= price] 300 | delta = sum(bids) - sum(asks) 301 | market_position_lit -= delta 302 | p0 = price + C * market_position_lit 303 | else: 304 | if len(state['bids']) != 0: 305 | print('Bids', state['bids']) 306 | if len(state['asks']) != 0: 307 | print('Asks', state['asks']) 308 | process_orders(order) 309 | close_out(order) 310 | 311 | def onTraderUpdate(msg, order): 312 | global cash, position_lit, position_dark, cancelled_trades 313 | state = msg['trader_state'] 314 | cash = state['cash'][CURRENCY] 315 | position_lit = state['positions']['TRDRS.LIT'] 316 | position_dark = state['positions']['TRDRS.DARK'] 317 | open_order_ids = {int(state['open_orders'][order]['order_id']) for order in state['open_orders']} 318 | cancelled_trades = cancelled_trades & open_order_ids 319 | # for i in reversed(range(len(cancelled_trades))): 320 | # if cancelled_trades[i][1] not in state['open_orders']: 321 | # cancelled_trades.pop(i) 322 | for pending_order in pending_orders: 323 | for i in reversed(range(len(pending_order['orders']))): 324 | batch = pending_order['orders'][i] 325 | for j in reversed(range(len(batch[2]))): 326 | if batch[2][j] not in state['open_orders']: 327 | batch[2].pop(j) 328 | pnl = (position_lit + position_dark) * price + cash - INITIAL_CASH 329 | time = int(get_time()) 330 | print('\rLIT:{:<7} DARK:{:<7} CASH:{:<11.2f} PNL:{:<10.2f} T:{:<3} DA:{:<1.4f}'.format(position_lit, position_dark, cash, pnl, time, dark_advantage), end='\r') 331 | # print('\rLIT:\t%i\tDARK:\t%i\tCASH:\t%1.2f\tPNL:\t%1.2f' % (position_lit, position_dark, cash, pnl), end='\r') 332 | 333 | def onTrade(msg, order): 334 | trades = set() 335 | for trade in msg['trades']: 336 | if trade['ticker'] == DARK_TICKER: 337 | trades.add(trade['trade_id']) 338 | for pending_order in pending_orders: 339 | for i in reversed(range(len(pending_order['orders']))): 340 | batch = pending_order['orders'][i] 341 | for j in reversed(range(len(batch[2]))): 342 | if batch[2][j] in trades: 343 | batch[2].pop(j) 344 | 345 | def onAckModifyOrders(msg, order): 346 | if 'cancels' in msg and CANCEL_TRADES: 347 | for trade_id in msg['cancels']: 348 | # remove successful cancels 349 | if not msg['cancels'][trade_id] and trade_id not in cancelled_trades: 350 | order.addCancel(DARK_TICKER, trade_id) 351 | cancelled_trades.add(int(trade_id)) 352 | # trade = (DARK_TICKER, trade_id, False) 353 | # if trade not in cancelled_trades: 354 | # trade = (LIT_TICKER, trade_id, False) 355 | # if trade not in cancelled_trades: 356 | # trade = (DARK_TICKER, trade_id, True) 357 | # if trade not in cancelled_trades: 358 | # trade = (LIT_TICKER, trade_id, True) 359 | # if trade not in cancelled_trades: 360 | # continue 361 | # pending_trades.remove(trade) 362 | # if not msg['cancels'][trade_id]: 363 | # # add back failed cancels 364 | # pending_trades.add((trade[0], trade[1], False)) 365 | 366 | for trade in msg['orders']: 367 | if trade['ticker'] == DARK_TICKER: 368 | price = trade['price'] 369 | for pending_order in reversed(pending_orders): 370 | for batch in reversed(pending_order['orders']): 371 | if price == batch[1]: 372 | batch[2].append(str(trade['order_id'])) 373 | break 374 | else: 375 | continue 376 | break 377 | 378 | def onNews(msg, order): 379 | try: 380 | news = msg['news'] 381 | headline = news['headline'] 382 | buy = 'buy' in headline 383 | sell = 'sell' in headline 384 | source = news['source'] 385 | news_time = news['time'] 386 | size = news['body'] 387 | if (not buy and not sell) or str(size) not in headline: 388 | print('Unable to parse headline: No buy or sell') 389 | return 390 | size = int(size) if buy else -int(size) 391 | target_position = POSITION_LIMIT if buy else -POSITION_LIMIT 392 | quantity = -2*POSITION_LIMIT if buy else 2*POSITION_LIMIT 393 | new_order = {'source': source, 394 | 'buy': buy, 395 | 'size': size, 396 | 'target': target_position, 397 | 'quantity': quantity, 398 | 'news_time': news_time, 399 | 'sale_time': news_time + ORDER_DELAY, 400 | 'eval_time': news_time + ORDER_WAIT, 401 | 'p0_at_news': p0, 402 | 'p0_at_sale': None, 403 | 'p0_at_eval': None, 404 | 'orders': [], 405 | 'sold': False, 406 | 'done': False, 407 | 'dark_at_news': None, 408 | 'dark_at_eval': None, 409 | 'dark_advantage': None} 410 | pending_orders.append(new_order) 411 | except: 412 | print('Unable to parse headline: Unknown error') 413 | 414 | DEBUG = True 415 | algo_bot = None 416 | if len(sys.argv) >= 4: 417 | algo_bot = TradersBot(host=sys.argv[1], id=sys.argv[2], password=sys.argv[3]) 418 | # DEBUG = False 419 | CANCEL_TRADES = False 420 | else: 421 | algo_bot = TradersBot('127.0.0.1', 'trader0', 'trader0') 422 | algo_bot.onAckRegister = onAckRegister 423 | algo_bot.onMarketUpdate = onMarketUpdate 424 | algo_bot.onTraderUpdate = onTraderUpdate 425 | algo_bot.onTrade = onTrade 426 | algo_bot.onAckModifyOrders = onAckModifyOrders 427 | algo_bot.onNews = onNews 428 | 429 | if not DEBUG: 430 | def f(*args): 431 | return None 432 | print = f 433 | 434 | algo_bot.run() -------------------------------------------------------------------------------- /Algo S&T/Chen_Fu_algost_conservative.py: -------------------------------------------------------------------------------- 1 | from tradersbot import TradersBot 2 | import sys 3 | from datetime import datetime, timedelta 4 | import random 5 | import numpy as np 6 | import pandas as pd 7 | 8 | C = 0.00004 # 1/25000 9 | CASE_LENGTH = 450 10 | CLOSE_OUT_MARGIN = 25 # when do we stop trading and balance our position 11 | CURRENCY = 'USD' 12 | DARK_TICKER = 'TRDRS.DARK' 13 | INITIAL_CASH = 100000 14 | ORDER_DELAY = 8 15 | ORDER_LIMIT = 1000 16 | ORDER_WAIT = 15 # how long to wait before evaluating the effect 17 | LIT_TICKER = 'TRDRS.LIT' 18 | MESSAGE_LIMIT = 25 19 | POSITION_LIMIT = 5000 20 | 21 | # DARK_TRADING = True 22 | DARK_TRADING = False 23 | POSITION_BALANCING = True 24 | CANCEL_TRADES = True 25 | # CANCEL_TRADES = False 26 | 27 | cash = 100000 28 | dark_advantage = 0.1 # ratio for DARK pricing 29 | dark_trading_history = [] # [(advantage, percentage)] 30 | first_time = None 31 | market_position_lit = 0 32 | market_position_dark = 0 33 | p0 = 200 34 | position_lit = 0 35 | position_dark = 0 36 | price = 200 37 | time_offset = 0 # for when it starts late 38 | 39 | # TODO: use a more sophisticated probability model 40 | # customers['Bob'] = {'full':0, 'half':5, 'random':1} 41 | # the values are the number of times each possibility occurs 42 | customers = {} 43 | # maps customer name to a list for the probability of being each person 44 | # 'Alice': ['random':p_r, 'half':p_h, 'full':p_f] 45 | customer_identities = {} 46 | pending_orders = [] 47 | # contains (ticker, trade_id, cancelled) = ('TRDRS.DARK', 0, False) 48 | cancelled_trades = set() 49 | recent_messages = [] 50 | 51 | def compute_valuation(): 52 | net_position = position_lit + position_dark 53 | asset_value = net_position * price 54 | total_value = asset_value + cash 55 | return total_value 56 | 57 | def update_probabilities(): 58 | # For simplicity, we'll assume there are only 3 customers. 59 | # TODO: Fix this for any number of customers. 60 | names = list(customers.keys()) 61 | probabilities = {} 62 | for key in customers: 63 | record = customers[key] 64 | total = record['random'] + record['half'] + record['full'] 65 | if total == 0: 66 | probabilities[key] = [1/3, 1/3, 1/3] 67 | else: 68 | probabilities[key] = [record['random'] / total, record['half'] / total, record['full'] / total] 69 | p = probabilities; a = names[0]; b = names[1]; c = names[2]; r = 0; h = 1; f = 2 70 | customer_identities[a]['random'] = p[a][r] * (p[b][h]*p[c][f] + p[b][f]*p[c][h]) 71 | customer_identities[a]['half'] = p[a][h] * (p[b][r]*p[c][f] + p[b][f]*p[c][r]) 72 | customer_identities[a]['full'] = p[a][f] * (p[b][r]*p[c][h] + p[b][h]*p[c][r]) 73 | customer_identities[b]['random'] = p[b][r] * (p[a][h]*p[c][f] + p[a][f]*p[c][h]) 74 | customer_identities[b]['half'] = p[b][h] * (p[a][r]*p[c][f] + p[a][f]*p[c][r]) 75 | customer_identities[b]['full'] = p[b][f] * (p[a][r]*p[c][h] + p[a][h]*p[c][r]) 76 | customer_identities[c]['random'] = p[c][r] * (p[b][h]*p[a][f] + p[b][f]*p[a][h]) 77 | customer_identities[c]['half'] = p[c][h] * (p[b][r]*p[a][f] + p[b][f]*p[a][r]) 78 | customer_identities[c]['full'] = p[c][f] * (p[b][r]*p[a][h] + p[b][h]*p[a][r]) 79 | 80 | 81 | def ready_to_send(): 82 | global recent_messages 83 | time_limit = get_time() - 1 84 | for i in range(len(recent_messages)): 85 | if recent_messages[i] >= time_limit: 86 | recent_messages = recent_messages[i:] 87 | break 88 | if len(recent_messages) < MESSAGE_LIMIT: 89 | recent_messages.append(get_time()) 90 | return True 91 | return False 92 | 93 | def get_time(): 94 | if first_time is None: 95 | return time_offset 96 | delta = datetime.now() - first_time 97 | return delta.total_seconds() + time_offset 98 | 99 | def process_orders(order): 100 | for pending in pending_orders: 101 | process_order(pending, order) 102 | 103 | def process_order(pending_order, order): 104 | if not pending_order['sold'] and not is_closing_time(): 105 | handle_pre_sale(pending_order, order) 106 | check_sold(pending_order) 107 | elif not pending_order['done'] and not is_closing_time(): 108 | handle_post_sale(pending_order, order) 109 | check_done(pending_order) 110 | else: 111 | handle_clean_up(pending_order, order) 112 | 113 | def handle_pre_sale(pending_order, order): 114 | reach_target_position(pending_order['target'], order) 115 | pending_order['dark_at_news'] = position_dark 116 | if DARK_TRADING: 117 | time_remaining = pending_order['sale_time'] - get_time() 118 | expected_position_lit = -position_dark + pending_order['size'] 119 | market_price_guess = p0 - C*expected_position_lit 120 | # If customers are buying, increase the price 121 | # If customers are selling, decrease the price 122 | advantage_price = dark_advantage if pending_order['buy'] else -dark_advantage 123 | advantage_price *= price 124 | advantage_price += price 125 | if len(pending_order['orders']) != 0: 126 | pass 127 | # TODO: Check and reguess if you were wrong. 128 | elif pending_order['quantity'] != 0: 129 | attempted_price = advantage_price 130 | result = make_trade(pending_order['quantity'], order, ticker=DARK_TICKER, price=attempted_price) 131 | # [quantity, price, [list of ids]] 132 | if result[0] > 0: 133 | pending_order['orders'].append(result + [[]]) 134 | pending_order['dark_advantage'] = dark_advantage 135 | 136 | 137 | def check_sold(pending_order): 138 | if get_time() > pending_order['sale_time']: 139 | pending_order['p0_at_sale'] = p0 140 | pending_order['dark_at_eval'] = position_dark 141 | pending_order['sold'] = True 142 | 143 | def handle_post_sale(pending_order, order): 144 | change_in_p0 = p0 - pending_order['p0_at_news'] 145 | full = C * pending_order['size'] 146 | half = full / 2 147 | margin = abs(full / 4) 148 | name = pending_order['source'] 149 | if abs(change_in_p0 - full) <= margin: 150 | customers[name]['full'] += 1 151 | pending_order['p0_at_eval'] = p0 152 | pending_order['dark_at_eval'] = position_dark 153 | adjust_dark_advantage(pending_order) 154 | elif abs(change_in_p0 - half) <= margin: 155 | customers[name]['half'] += 1 156 | pending_order['p0_at_eval'] = p0 157 | pending_order['dark_at_eval'] = position_dark 158 | adjust_dark_advantage(pending_order) 159 | elif abs(change_in_p0) <= margin: 160 | if get_time() > pending_order['eval_time']: 161 | customers[name]['random'] += 1 162 | pending_order['p0_at_eval'] = p0 163 | pending_order['dark_at_eval'] = position_dark 164 | adjust_dark_advantage(pending_order) 165 | elif get_time() > pending_order['eval_time']: 166 | pending_order['p0_at_eval'] = p0 167 | pending_order['dark_at_eval'] = position_dark 168 | adjust_dark_advantage(pending_order) 169 | else: 170 | reach_target_position(pending_order['target'], order) 171 | 172 | def adjust_dark_advantage(pending_order): 173 | global dark_advantage 174 | percentage = pending_order['dark_at_eval'] - pending_order['dark_at_news'] 175 | percentage /= pending_order['quantity'] 176 | percentage = abs(percentage) 177 | dark_trading_history.append((dark_advantage, percentage)) 178 | step = 0.1 # 10% step 179 | step *= dark_advantage 180 | margin = step / 2 181 | increase = dark_advantage + step 182 | decrease = dark_advantage - step 183 | up = [pair[1] for pair in dark_trading_history if abs(pair[0] - increase) <= margin] 184 | stay = [pair[1] for pair in dark_trading_history if abs(pair[0] - dark_advantage) <= margin] 185 | down = [pair[1] for pair in dark_trading_history if abs(pair[0] - dark_advantage) <= margin] 186 | # If we're not selling everything, move 187 | if len(up) == 0: 188 | if random.random() < 0.25: 189 | dark_advantage *= 1.1 190 | return 191 | else: 192 | up = [0] 193 | if len(down) == 0: 194 | if random.random() < 0.25: 195 | dark_advantage *= 0.9 196 | return 197 | else: 198 | down = [0] 199 | up = sum(up) / len(up) 200 | stay = sum(stay) / len(stay) 201 | down = sum(down) / len(down) 202 | up *= 1.1 203 | down *- 0.9 204 | best = max(up, stay, down) 205 | if up == best: 206 | dark_advantage *= 1.1 207 | elif down == best: 208 | dark_advantage *= 0.9 209 | 210 | def check_done(pending_order): 211 | pending_order['done'] = pending_order['p0_at_eval'] is not None 212 | 213 | def handle_clean_up(pending_order, order): 214 | if not CANCEL_TRADES: 215 | pending_orders.remove(pending_order) 216 | return 217 | for i in reversed(range(len(pending_order['orders']))): 218 | batch = pending_order['orders'][i] 219 | for j in reversed(range(len(batch[2]))): 220 | if ready_to_send(): 221 | order.addCancel(DARK_TICKER, batch[2][j]) 222 | batch[2].pop(j) 223 | if len(batch[2]) == 0: 224 | pending_order['orders'].pop(i) 225 | if len(pending_order['orders']) == 0: 226 | pending_orders.remove(pending_order) 227 | 228 | 229 | def reach_target_position(target, order, ticker=LIT_TICKER, price=None): 230 | net_position = position_lit + position_dark 231 | if net_position != target: 232 | make_trade(target - net_position, order) 233 | 234 | # Signed quantity, positive for buy, negative for sell 235 | def make_trade(quantity, order, ticker=LIT_TICKER, price=None): 236 | magnitude = abs(quantity) 237 | num_orders = (magnitude // ORDER_LIMIT) 238 | if magnitude != num_orders*ORDER_LIMIT: 239 | num_orders += 1 240 | buy = quantity > 0 241 | quantity = int(magnitude / num_orders) 242 | successes = 0 243 | if buy: 244 | for i in range(int(num_orders)): 245 | if ready_to_send(): 246 | if price is None: 247 | order.addBuy(ticker, quantity) 248 | else: 249 | order.addBuy(ticker, quantity, price=price) 250 | successes += 1 251 | else: 252 | for i in range(int(num_orders)): 253 | if ready_to_send(): 254 | if price is None: 255 | order.addSell(ticker, quantity) 256 | else: 257 | order.addSell(ticker, quantity, price=price) 258 | successes += 1 259 | return [quantity * successes * (1 if buy else -1), price] 260 | 261 | def is_closing_time(): 262 | return CASE_LENGTH - get_time() < CLOSE_OUT_MARGIN 263 | 264 | def close_out(order): 265 | if is_closing_time(): 266 | reach_target_position(0, order) 267 | 268 | def onAckRegister(msg, order): 269 | global POSITION_LIMIT, CURRENCY, CASE_LENGTH, INITIAL_CASH 270 | global time_offset, p0 271 | if 'TRDRS' in msg['case_meta']['underlyings']: 272 | POSITION_LIMIT = msg['case_meta']['underlyings']['TRDRS']['limit'] 273 | else: 274 | POSITION_LIMIT = msg['case_meta']['underlyings']['TRDRS.LIT']['limit'] 275 | CURRENCY = msg['case_meta']['default_currency'] 276 | CASE_LENGTH = msg['case_meta']['case_length'] 277 | p0 = msg['case_meta']['securities']['TRDRS.LIT']['starting_price'] 278 | time_offset = msg['elapsed_time'] 279 | if time_offset == 0: 280 | INITIAL_CASH = msg['trader_state']['cash'][CURRENCY] 281 | for name in msg['case_meta']['news_sources']: 282 | customers[name] = {'full': 0, 'half': 0, 'random': 0} 283 | customer_identities[name] = {'full': 1/3, 'half': 1/3, 'random': 1/3} 284 | onTraderUpdate(msg, order) 285 | 286 | def onMarketUpdate(msg, order): 287 | global first_time 288 | if first_time is None: 289 | first_time = datetime.now() 290 | state = msg['market_state'] 291 | if state['ticker'] == 'TRDRS.LIT': 292 | global market_position_lit, price, p0 293 | price = state['last_price'] 294 | delta = 0 295 | bids = [state['bids'][p] for p in state['bids'] if float(p) >= price] 296 | asks = [state['asks'][p] for p in state['asks'] if float(p) <= price] 297 | delta = sum(bids) - sum(asks) 298 | market_position_lit -= delta 299 | p0 = price + C * market_position_lit 300 | else: 301 | if len(state['bids']) != 0: 302 | print('Bids', state['bids']) 303 | if len(state['asks']) != 0: 304 | print('Asks', state['asks']) 305 | process_orders(order) 306 | close_out(order) 307 | 308 | def onTraderUpdate(msg, order): 309 | global cash, position_lit, position_dark, cancelled_trades 310 | state = msg['trader_state'] 311 | cash = state['cash'][CURRENCY] 312 | position_lit = state['positions']['TRDRS.LIT'] 313 | position_dark = state['positions']['TRDRS.DARK'] 314 | open_order_ids = {int(state['open_orders'][order]['order_id']) for order in state['open_orders']} 315 | cancelled_trades = cancelled_trades & open_order_ids 316 | # for i in reversed(range(len(cancelled_trades))): 317 | # if cancelled_trades[i][1] not in state['open_orders']: 318 | # cancelled_trades.pop(i) 319 | for pending_order in pending_orders: 320 | for i in reversed(range(len(pending_order['orders']))): 321 | batch = pending_order['orders'][i] 322 | for j in reversed(range(len(batch[2]))): 323 | if batch[2][j] not in state['open_orders']: 324 | batch[2].pop(j) 325 | pnl = (position_lit + position_dark) * price + cash - INITIAL_CASH 326 | time = int(get_time()) 327 | print('\rLIT:{:<7} DARK:{:<7} CASH:{:<11.2f} PNL:{:<10.2f} T:{:<3}'.format(position_lit, position_dark, cash, pnl, time), end='\r') 328 | # print('\rLIT:\t%i\tDARK:\t%i\tCASH:\t%1.2f\tPNL:\t%1.2f' % (position_lit, position_dark, cash, pnl), end='\r') 329 | 330 | def onTrade(msg, order): 331 | trades = set() 332 | for trade in msg['trades']: 333 | if trade['ticker'] == DARK_TICKER: 334 | trades.add(trade['trade_id']) 335 | for pending_order in pending_orders: 336 | for i in reversed(range(len(pending_order['orders']))): 337 | batch = pending_order['orders'][i] 338 | for j in reversed(range(len(batch[2]))): 339 | if batch[2][j] in trades: 340 | batch[2].pop(j) 341 | 342 | def onAckModifyOrders(msg, order): 343 | if 'cancels' in msg and CANCEL_TRADES: 344 | for trade_id in msg['cancels']: 345 | # remove successful cancels 346 | if not msg['cancels'][trade_id] and trade_id not in cancelled_trades: 347 | order.addCancel(DARK_TICKER, trade_id) 348 | cancelled_trades.add(int(trade_id)) 349 | # trade = (DARK_TICKER, trade_id, False) 350 | # if trade not in cancelled_trades: 351 | # trade = (LIT_TICKER, trade_id, False) 352 | # if trade not in cancelled_trades: 353 | # trade = (DARK_TICKER, trade_id, True) 354 | # if trade not in cancelled_trades: 355 | # trade = (LIT_TICKER, trade_id, True) 356 | # if trade not in cancelled_trades: 357 | # continue 358 | # pending_trades.remove(trade) 359 | # if not msg['cancels'][trade_id]: 360 | # # add back failed cancels 361 | # pending_trades.add((trade[0], trade[1], False)) 362 | 363 | for trade in msg['orders']: 364 | if trade['ticker'] == DARK_TICKER: 365 | price = trade['price'] 366 | for pending_order in reversed(pending_orders): 367 | for batch in reversed(pending_order['orders']): 368 | if price == batch[1]: 369 | batch[2].append(str(trade['order_id'])) 370 | break 371 | else: 372 | continue 373 | break 374 | 375 | def onNews(msg, order): 376 | try: 377 | news = msg['news'] 378 | headline = news['headline'] 379 | buy = 'buy' in headline 380 | sell = 'sell' in headline 381 | source = news['source'] 382 | news_time = news['time'] 383 | size = news['body'] 384 | if (not buy and not sell) or str(size) not in headline: 385 | print('Unable to parse headline: No buy or sell') 386 | return 387 | size = int(size) if buy else -int(size) 388 | target_position = POSITION_LIMIT if buy else -POSITION_LIMIT 389 | quantity = -2*POSITION_LIMIT if buy else 2*POSITION_LIMIT 390 | new_order = {'source': source, 391 | 'buy': buy, 392 | 'size': size, 393 | 'target': target_position, 394 | 'quantity': quantity, 395 | 'news_time': news_time, 396 | 'sale_time': news_time + ORDER_DELAY, 397 | 'eval_time': news_time + ORDER_WAIT, 398 | 'p0_at_news': p0, 399 | 'p0_at_sale': None, 400 | 'p0_at_eval': None, 401 | 'orders': [], 402 | 'sold': False, 403 | 'done': False, 404 | 'dark_at_news': None, 405 | 'dark_at_eval': None, 406 | 'dark_advantage': None} 407 | pending_orders.append(new_order) 408 | except: 409 | print('Unable to parse headline: Unknown error') 410 | 411 | DEBUG = True 412 | algo_bot = None 413 | if len(sys.argv) >= 4: 414 | algo_bot = TradersBot(host=sys.argv[1], id=sys.argv[2], password=sys.argv[3]) 415 | # DEBUG = False 416 | CANCEL_TRADES = False 417 | else: 418 | algo_bot = TradersBot('127.0.0.1', 'trader0', 'trader0') 419 | algo_bot.onAckRegister = onAckRegister 420 | algo_bot.onMarketUpdate = onMarketUpdate 421 | algo_bot.onTraderUpdate = onTraderUpdate 422 | algo_bot.onTrade = onTrade 423 | algo_bot.onAckModifyOrders = onAckModifyOrders 424 | algo_bot.onNews = onNews 425 | 426 | if not DEBUG: 427 | def f(*args): 428 | return None 429 | print = f 430 | 431 | algo_bot.run() -------------------------------------------------------------------------------- /Algo S&T/algo_bot.py: -------------------------------------------------------------------------------- 1 | from tradersbot import TradersBot 2 | import sys 3 | from datetime import datetime, timedelta 4 | import numpy as np 5 | import pandas as pd 6 | 7 | class AlgoBot(TradersBot): 8 | #Initialize variables: positions, expectations, future customer orders, etc 9 | POSITION_LIMIT = 5000 10 | CASE_LENGTH = 450 11 | CURRENCY = 'USD' 12 | ORDER_DELAY = 8 13 | 14 | cash = 0 15 | market_position_lit = 0 16 | market_position_dark = 0 17 | position_lit = 0 18 | position_dark = 0 19 | first_time = None 20 | time = 0 21 | topBid = 0 22 | topAsk = 0 23 | c = 0.00004 24 | customers = {} 25 | # contains (price, time) where price is an estimate for p_0 26 | lit_price_history = [] 27 | pending_order = None 28 | existing_trades = [] 29 | 30 | def onAckRegister(self, msg, order): 31 | print('reg') 32 | self.POSITION_LIMIT = msg['case_meta']['underlyings']['TRDRS']['limit'] 33 | self.CURRENCY = msg['case_meta']['default_currency'] 34 | self.CASE_LENGTH = msg['case_meta']['case_length'] 35 | self.cash = msg['trader_state']['cash'][self.CURRENCY] 36 | self.time = msg['elapsed_time'] 37 | customers = {name for name in msg['case_meta']['news_sources']} 38 | position_lit = msg['trader_state']['positions']['TRDRS.LIT'] 39 | position_dark = msg['trader_state']['positions']['TRDRS.DARK'] 40 | 41 | def onMarketUpdate(self, msg, order): 42 | print('market') 43 | if self.first_time is None: 44 | self.first_time = datetime.now() 45 | delta = datetime.now() - self.first_time 46 | self.time = delta.total_seconds() 47 | print(time) 48 | lit_price = msg['market_state']['last_price'] 49 | 50 | def onTraderUpdate(self, msg, order): 51 | # Looks like this never runs 52 | print(msg) 53 | order.addBuy('TRDRS.LIT', quantity=100) 54 | state = msg['trader_state'] 55 | self.cash = state['cash'][self.CURRENCY] 56 | print(msg) 57 | # self.position_lit = state['positions'] 58 | 59 | def onTrade(self, msg, order): 60 | order.addBuy('TRDRS.LIT', quantity=100) 61 | for trade in msg['trades']: 62 | if trade['ticker'] == 'TRDRS.LIT': 63 | self.market_position_lit += trade['quantity'] * (-1 if trade['buy'] else 1) 64 | else: 65 | self.market_position_dark += trade['quantity'] * (-1 if trade['buy'] else 1) 66 | 67 | def onAckModifyOrders(self, msg, order): 68 | pass 69 | 70 | def onNews(self, msg, order): 71 | try: 72 | news = msg['news'] 73 | headline = news['headline'] 74 | buy = 'buy' in headline 75 | sell = 'sell' in headline 76 | source = news['source'] 77 | news_time = news['time'] 78 | quantity = news['body'] 79 | if (not buy and not sell) or str(quantity) not in headline: 80 | print('Unable to parse headline') 81 | return 82 | quantity = int(quantity) 83 | new_order = {'source': source, 84 | 'buy': buy, 85 | 'news_time': news_time} 86 | except: 87 | print('Unable to parse headline') 88 | #etc etc 89 | {'message_type': 'ACK REGISTER', 90 | 'case_meta': 91 | {'case_length': 450, 92 | 'speedup': 1, 93 | 'default_currency':'USD', 94 | 'securities': { 95 | 'TRDRS.LIT': { 96 | 'dark': False, 97 | 'tradeable': True, 98 | 'invisible': False, 99 | 'starting_price': 200, 100 | 'underlyings': {'TRDRS': 1}, 101 | 'precision': 2}, 102 | 'TRDRS.DARK': { 103 | 'dark': True, 104 | 'tradeable': True, 105 | 'invisible': False, 106 | 'starting_price': 200, 107 | 'underlyings': {'TRDRS': 1}, 108 | 'precision': 2}}, 109 | 'underlyings': { 110 | 'TRDRS': { 111 | 'name': 'TRDRS', 112 | 'limit': 5000}}, 113 | 'news_sources': 114 | {'Carol': { 115 | 'paid': False, 116 | 'can_unsubscribe': False}, 117 | 'Alice': { 118 | 'paid': False, 119 | 'can_unsubscribe': False}, 120 | 'Bob': { 121 | 'paid': False, 122 | 'can_unsubscribe': False}}, 123 | 'currencies': { 124 | 'USD': {'name': 'USD', 'limit': 0}}}, 125 | 'elapsed_time': 3, 126 | 'market_states': { 127 | 'TRDRS.LIT': { 128 | 'ticker': 'TRDRS.LIT', 129 | 'bids': {'199.80': 365, '199.85': 268, '199.83': 329, '199.82': 347, '199.86': 190}, 130 | 'asks': {'200.03': 199, '200.04': 303, '200.02': 222, '200.01': 108, '200.05': 329, '200.06': 347, '200.08': 365, '200.07': 359}, 131 | 'last_price': 199.86, 132 | 'time': '2018-11-05T20:39:00.053214849-05:00'}, 133 | 'TRDRS.DARK': {'ticker': 'TRDRS.DARK', 'bids': {}, 'asks': {}, 'last_price': 200, 'time': '2018-11-05T20:39:00.053215656-05:00'}}, 134 | 'trader_state': { 135 | 'trader_id': 'trader0', 136 | 'cash': {'USD': 100000}, 137 | 'positions': {'TRDRS.LIT': 0, 'TRDRS.DARK': 0}, 138 | 'open_orders': {}, 139 | 'pnl': {'USD': 0}, 'default_pnl': 0, 'time': '2018-11-05T20:39:00.053197152-05:00', 'total_fees': 0, 'total_fines': 0, 'total_rebates': 0, 'subscriptions': {}}} 140 | 141 | algo_bot = None 142 | if len(sys.argv) >= 4: 143 | algo_bot = AlgoBot(host=sys.argv[1], id=sys.argv[2], password=sys.argv[3]) 144 | else: 145 | algo_bot = AlgoBot('127.0.0.1', 'trader0', 'trader0') 146 | algo_bot.run() -------------------------------------------------------------------------------- /Algo S&T/example1.json: -------------------------------------------------------------------------------- 1 | {"securities": {"TRDRS.LIT": {"starting_price": 200, "minimum_order_size": 1, "self_trading_fine_amount": 0.008, "security_type": "etf", "rebate_amount": 0.0, "maximum_decimal_digits": 2, "fee_amount": 0.0001, "underlyings": {"TRDRS": 1}, "maximum_order_size": 1000, "base_currency": "USD", "ticker": "TRDRS.LIT", "tradeable": true, "dark": false, "price_reaction": 25000, "pricepath": {"volume": [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100], "price": [200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.56, 201.12, 201.68, 202.24, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 203.12, 203.44, 203.76, 204.08, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 204.4, 203.68, 202.96, 202.24, 201.52, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.0, 199.2, 198.4, 197.6, 196.8, 196.8, 196.8, 196.8, 196.8, 196.8, 196.8, 196.8, 196.8, 196.8, 196.8, 196.24, 195.68, 195.12, 194.56, 194.0, 194.0, 194.0, 194.0, 194.0, 194.0, 194.0, 194.0, 194.0, 194.0, 194.0, 194.72, 195.44, 196.16, 196.88, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 196.96, 196.32, 195.68, 195.04, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 193.6, 192.8, 192.0, 191.2, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.4, 190.2, 190.0, 189.8, 189.6, 189.4, 189.4, 189.4, 189.4, 189.4, 189.4, 189.4, 189.4, 189.4, 189.4, 189.4, 189.08, 188.76, 188.44, 188.12, 187.8, 187.8, 187.8, 187.8, 187.8, 187.8, 187.8, 187.8, 187.8, 187.8, 187.8, 188.04, 188.28, 188.52, 188.76, 189.0, 189.0, 189.0, 189.0, 189.0, 189.0, 189.0, 189.0, 189.0, 189.0, 189.0, 189.8, 190.6, 191.4, 192.2, 193.0, 193.0, 193.0, 193.0, 193.0, 193.0, 193.0, 193.0, 193.0, 193.0, 193.0, 192.68, 192.36, 192.04, 191.72, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.12, 190.84, 190.56, 190.28, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.0, 190.28, 190.56, 190.84, 191.12, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.6, 191.8, 192.0, 192.2, 192.4, 192.4, 192.4, 192.4, 192.4, 192.4, 192.4, 192.4, 192.4, 192.4, 192.4, 193.2, 194.0, 194.8, 195.6, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 197.04, 197.68, 198.32, 198.96, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.6, 199.84, 200.08, 200.32, 200.56, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8], "spread": [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05], "strictness": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 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 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]}}, "TRDRS.DARK": {"starting_price": 200, "minimum_order_size": 1000, "self_trading_fine_amount": 0.008, "security_type": "etf", "rebate_amount": 0.0, "maximum_decimal_digits": 2, "fee_amount": 0.0001, "underlyings": {"TRDRS": 1}, "maximum_order_size": 10000, "base_currency": "USD", "ticker": "TRDRS.DARK", "tradeable": true, "dark": true, "price_reaction": 0, "pricepath": {"volume": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "price": [200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0], "spread": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}}}, "news": [{"headline": "Bob is buying 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 2}, {"headline": "Alice is buying 80000 shares of TRDRS!", "source": "Alice", "body": "80000", "time": 17}, {"headline": "Carol is selling 50000 shares of TRDRS!", "source": "Carol", "body": "50000", "time": 32}, {"headline": "Bob is selling 90000 shares of TRDRS!", "source": "Bob", "body": "90000", "time": 47}, {"headline": "Bob is selling 100000 shares of TRDRS!", "source": "Bob", "body": "100000", "time": 62}, {"headline": "Bob is selling 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 77}, {"headline": "Bob is buying 90000 shares of TRDRS!", "source": "Bob", "body": "90000", "time": 92}, {"headline": "Carol is selling 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 107}, {"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 122}, {"headline": "Bob is selling 80000 shares of TRDRS!", "source": "Bob", "body": "80000", "time": 137}, {"headline": "Bob is selling 100000 shares of TRDRS!", "source": "Bob", "body": "100000", "time": 152}, {"headline": "Carol is buying 100000 shares of TRDRS!", "source": "Carol", "body": "100000", "time": 167}, {"headline": "Carol is selling 90000 shares of TRDRS!", "source": "Carol", "body": "90000", "time": 182}, {"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 197}, {"headline": "Alice is selling 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 212}, {"headline": "Alice is selling 80000 shares of TRDRS!", "source": "Alice", "body": "80000", "time": 227}, {"headline": "Alice is buying 60000 shares of TRDRS!", "source": "Alice", "body": "60000", "time": 242}, {"headline": "Bob is buying 100000 shares of TRDRS!", "source": "Bob", "body": "100000", "time": 257}, {"headline": "Alice is selling 80000 shares of TRDRS!", "source": "Alice", "body": "80000", "time": 272}, {"headline": "Alice is selling 70000 shares of TRDRS!", "source": "Alice", "body": "70000", "time": 287}, {"headline": "Carol is selling 80000 shares of TRDRS!", "source": "Carol", "body": "80000", "time": 302}, {"headline": "Alice is buying 70000 shares of TRDRS!", "source": "Alice", "body": "70000", "time": 317}, {"headline": "Carol is selling 90000 shares of TRDRS!", "source": "Carol", "body": "90000", "time": 332}, {"headline": "Alice is buying 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 347}, {"headline": "Bob is buying 100000 shares of TRDRS!", "source": "Bob", "body": "100000", "time": 362}, {"headline": "Carol is buying 80000 shares of TRDRS!", "source": "Carol", "body": "80000", "time": 377}, {"headline": "Bob is buying 80000 shares of TRDRS!", "source": "Bob", "body": "80000", "time": 392}, {"headline": "Carol is selling 50000 shares of TRDRS!", "source": "Carol", "body": "50000", "time": 407}, {"headline": "Alice is buying 60000 shares of TRDRS!", "source": "Alice", "body": "60000", "time": 422}], "news_sources": {"Carol": {"paid": false, "can_unsubscribe": false}, "Alice": {"paid": false, "can_unsubscribe": false}, "Bob": {"paid": false, "can_unsubscribe": false}}, "underlyings": {"TRDRS": {"limit": 5000, "name": "TRDRS"}}, "meta": {"case_length": 450, "max_open_orders": 100, "interest_rate": {"USD": 0.0}, "loss_limit": -1000000, "endowment": {"USD": 100000}, "default_currency": "USD", "price_reaction": true}, "custom_orders": [{"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 10, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 25, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 40, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 55, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 70, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 85, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 100, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 115, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 130, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 145, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 160, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 175, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 190, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 205, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 220, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 235, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 250, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 265, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 280, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 295, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 310, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 325, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 340, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 355, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 370, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 385, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 400, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 415, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 430, "duration": 2, "quantity": 60000}]} 2 | -------------------------------------------------------------------------------- /Algo S&T/example2.json: -------------------------------------------------------------------------------- 1 | {"securities": {"TRDRS.LIT": {"starting_price": 200, "minimum_order_size": 1, "self_trading_fine_amount": 0.008, "security_type": "etf", "rebate_amount": 0.0, "maximum_decimal_digits": 2, "fee_amount": 0.0001, "underlyings": {"TRDRS": 1}, "maximum_order_size": 1000, "base_currency": "USD", "ticker": "TRDRS.LIT", "tradeable": true, "dark": false, "price_reaction": 25000, "pricepath": {"volume": [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100], "price": [200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.64, 201.28, 201.92, 202.56, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.76, 204.32, 204.88, 205.44, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 205.72, 205.44, 205.16, 204.88, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.24, 203.88, 203.52, 203.16, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.56, 202.32, 202.08, 201.84, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.96, 202.32, 202.68, 203.04, 203.4, 203.4, 203.4, 203.4, 203.4, 203.4, 203.4, 203.4, 203.4, 203.4, 203.4, 203.0, 202.6, 202.2, 201.8, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.4, 201.12, 200.84, 200.56, 200.28, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 199.52, 199.04, 198.56, 198.08, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 197.6, 198.24, 198.88, 199.52, 200.16, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.24, 199.68, 199.12, 198.56, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.56, 199.12, 199.68, 200.24, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 200.8, 201.44, 202.08, 202.72, 203.36, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.0, 204.48, 204.96, 205.44, 205.92, 206.4, 206.4, 206.4, 206.4, 206.4, 206.4, 206.4, 206.4, 206.4, 206.4, 206.4, 206.64, 206.88, 207.12, 207.36, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 207.6, 208.0, 208.4, 208.8, 209.2, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.88, 210.16, 210.44, 210.72, 211.0, 211.0, 211.0, 211.0, 211.0, 211.0, 211.0, 211.0, 211.0, 211.0, 211.0, 211.56, 212.12, 212.68, 213.24, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 214.04, 214.28, 214.52, 214.76, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.28, 215.56, 215.84, 216.12, 216.4, 216.4, 216.4, 216.4, 216.4, 216.4, 216.4, 216.4, 216.4, 216.4, 216.4, 216.4, 216.4, 216.4, 216.4], "spread": [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05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.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]}}, "TRDRS.DARK": {"starting_price": 200, "minimum_order_size": 1000, "self_trading_fine_amount": 0.008, "security_type": "etf", "rebate_amount": 0.0, "maximum_decimal_digits": 2, "fee_amount": 0.0001, "underlyings": {"TRDRS": 1}, "maximum_order_size": 10000, "base_currency": "USD", "ticker": "TRDRS.DARK", "tradeable": true, "dark": true, "price_reaction": 0, "pricepath": {"volume": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0], "spread": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}}}, "news": [{"headline": "Carol is buying 80000 shares of TRDRS!", "source": "Carol", "body": "80000", "time": 2}, {"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 17}, {"headline": "Bob is selling 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 32}, {"headline": "Bob is selling 90000 shares of TRDRS!", "source": "Bob", "body": "90000", "time": 47}, {"headline": "Bob is selling 60000 shares of TRDRS!", "source": "Bob", "body": "60000", "time": 62}, {"headline": "Bob is buying 90000 shares of TRDRS!", "source": "Bob", "body": "90000", "time": 77}, {"headline": "Carol is selling 50000 shares of TRDRS!", "source": "Carol", "body": "50000", "time": 92}, {"headline": "Alice is buying 100000 shares of TRDRS!", "source": "Alice", "body": "100000", "time": 107}, {"headline": "Bob is selling 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 122}, {"headline": "Carol is selling 60000 shares of TRDRS!", "source": "Carol", "body": "60000", "time": 137}, {"headline": "Alice is buying 80000 shares of TRDRS!", "source": "Alice", "body": "80000", "time": 152}, {"headline": "Alice is selling 70000 shares of TRDRS!", "source": "Alice", "body": "70000", "time": 167}, {"headline": "Carol is buying 80000 shares of TRDRS!", "source": "Carol", "body": "80000", "time": 182}, {"headline": "Carol is selling 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 197}, {"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 212}, {"headline": "Carol is buying 80000 shares of TRDRS!", "source": "Carol", "body": "80000", "time": 227}, {"headline": "Alice is buying 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 242}, {"headline": "Alice is selling 100000 shares of TRDRS!", "source": "Alice", "body": "100000", "time": 257}, {"headline": "Alice is selling 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 272}, {"headline": "Carol is buying 60000 shares of TRDRS!", "source": "Carol", "body": "60000", "time": 287}, {"headline": "Bob is buying 60000 shares of TRDRS!", "source": "Bob", "body": "60000", "time": 302}, {"headline": "Alice is buying 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 317}, {"headline": "Bob is buying 100000 shares of TRDRS!", "source": "Bob", "body": "100000", "time": 332}, {"headline": "Bob is buying 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 347}, {"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 362}, {"headline": "Bob is buying 60000 shares of TRDRS!", "source": "Bob", "body": "60000", "time": 377}, {"headline": "Alice is selling 90000 shares of TRDRS!", "source": "Alice", "body": "90000", "time": 392}, {"headline": "Alice is selling 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 407}, {"headline": "Bob is buying 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 422}], "news_sources": {"Alice": {"paid": false, "can_unsubscribe": false}, "Bob": {"paid": false, "can_unsubscribe": false}, "Carol": {"paid": false, "can_unsubscribe": false}}, "underlyings": {"TRDRS": {"limit": 5000, "name": "TRDRS"}}, "meta": {"case_length": 450, "max_open_orders": 100, "interest_rate": {"USD": 0.0}, "loss_limit": -1000000, "endowment": {"USD": 100000}, "default_currency": "USD", "price_reaction": true}, "custom_orders": [{"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 10, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 25, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 40, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 55, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 70, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 85, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 100, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 115, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 130, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 145, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 160, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 175, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 190, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 205, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 220, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 235, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 250, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 265, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 280, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 295, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 310, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 325, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 340, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 355, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 370, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 385, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 400, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 415, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 430, "duration": 2, "quantity": 70000}]} 2 | -------------------------------------------------------------------------------- /Algo S&T/example3.json: -------------------------------------------------------------------------------- 1 | {"securities": {"TRDRS.LIT": {"starting_price": 200, "minimum_order_size": 1, "self_trading_fine_amount": 0.008, "security_type": "etf", "rebate_amount": 0.0, "maximum_decimal_digits": 2, "fee_amount": 0.0001, "underlyings": {"TRDRS": 1}, "maximum_order_size": 1000, "base_currency": "USD", "ticker": "TRDRS.LIT", "tradeable": true, "dark": false, "price_reaction": 25000, "pricepath": {"volume": [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100], "price": [200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 199.6, 199.2, 198.8, 198.4, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 197.28, 196.56, 195.84, 195.12, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.4, 194.68, 194.96, 195.24, 195.52, 195.8, 195.8, 195.8, 195.8, 195.8, 195.8, 195.8, 195.8, 195.8, 195.8, 195.8, 195.4, 195.0, 194.6, 194.2, 193.8, 193.8, 193.8, 193.8, 193.8, 193.8, 193.8, 193.8, 193.8, 193.8, 193.8, 193.32, 192.84, 192.36, 191.88, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.4, 191.08, 190.76, 190.44, 190.12, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.0, 188.2, 187.4, 186.6, 185.8, 185.8, 185.8, 185.8, 185.8, 185.8, 185.8, 185.8, 185.8, 185.8, 185.8, 185.0, 184.2, 183.4, 182.6, 181.8, 181.8, 181.8, 181.8, 181.8, 181.8, 181.8, 181.8, 181.8, 181.8, 181.8, 181.52, 181.24, 180.96, 180.68, 180.4, 180.4, 180.4, 180.4, 180.4, 180.4, 180.4, 180.4, 180.4, 180.4, 180.4, 180.12, 179.84, 179.56, 179.28, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 179.0, 178.64, 178.28, 177.92, 177.56, 177.2, 177.2, 177.2, 177.2, 177.2, 177.2, 177.2, 177.2, 177.2, 177.2, 177.2, 176.96, 176.72, 176.48, 176.24, 176.0, 176.0, 176.0, 176.0, 176.0, 176.0, 176.0, 176.0, 176.0, 176.0, 176.0, 176.36, 176.72, 177.08, 177.44, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 177.8, 178.12, 178.44, 178.76, 179.08, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 179.4, 178.76, 178.12, 177.48, 176.84, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.2, 176.6, 177.0, 177.4, 177.8, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 178.2, 177.48, 176.76, 176.04, 175.32, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.6, 174.96, 175.32, 175.68, 176.04, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 176.4, 177.12, 177.84, 178.56, 179.28, 180.0, 180.0, 180.0, 180.0, 180.0, 180.0, 180.0, 180.0, 180.0, 180.0, 180.0, 180.0, 180.0, 180.0, 180.0], "spread": [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05], "strictness": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 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 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]}}, "TRDRS.DARK": {"starting_price": 200, "minimum_order_size": 1000, "self_trading_fine_amount": 0.008, "security_type": "etf", "rebate_amount": 0.0, "maximum_decimal_digits": 2, "fee_amount": 0.0001, "underlyings": {"TRDRS": 1}, "maximum_order_size": 10000, "base_currency": "USD", "ticker": "TRDRS.DARK", "tradeable": true, "dark": true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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "price": [200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0], "spread": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}}}, "news": [{"headline": "Alice is selling 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 2}, {"headline": "Alice is selling 90000 shares of TRDRS!", "source": "Alice", "body": "90000", "time": 17}, {"headline": "Carol is selling 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 32}, {"headline": "Bob is buying 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 47}, {"headline": "Alice is selling 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 62}, {"headline": "Alice is selling 60000 shares of TRDRS!", "source": "Alice", "body": "60000", "time": 77}, {"headline": "Bob is selling 80000 shares of TRDRS!", "source": "Bob", "body": "80000", "time": 92}, {"headline": "Alice is selling 100000 shares of TRDRS!", "source": "Alice", "body": "100000", "time": 107}, {"headline": "Alice is selling 100000 shares of TRDRS!", "source": "Alice", "body": "100000", "time": 122}, {"headline": "Bob is selling 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 137}, {"headline": "Bob is selling 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 152}, {"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 167}, {"headline": "Bob is selling 90000 shares of TRDRS!", "source": "Bob", "body": "90000", "time": 182}, {"headline": "Bob is selling 60000 shares of TRDRS!", "source": "Bob", "body": "60000", "time": 197}, {"headline": "Bob is buying 90000 shares of TRDRS!", "source": "Bob", "body": "90000", "time": 212}, {"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 227}, {"headline": "Bob is buying 80000 shares of TRDRS!", "source": "Bob", "body": "80000", "time": 242}, {"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 257}, {"headline": "Alice is selling 80000 shares of TRDRS!", "source": "Alice", "body": "80000", "time": 272}, {"headline": "Carol is selling 60000 shares of TRDRS!", "source": "Carol", "body": "60000", "time": 287}, {"headline": "Bob is buying 100000 shares of TRDRS!", "source": "Bob", "body": "100000", "time": 302}, {"headline": "Carol is selling 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 317}, {"headline": "Carol is buying 60000 shares of TRDRS!", "source": "Carol", "body": "60000", "time": 332}, {"headline": "Alice is selling 90000 shares of TRDRS!", "source": "Alice", "body": "90000", "time": 347}, {"headline": "Carol is buying 50000 shares of TRDRS!", "source": "Carol", "body": "50000", "time": 362}, {"headline": "Bob is buying 90000 shares of TRDRS!", "source": "Bob", "body": "90000", "time": 377}, {"headline": "Carol is selling 60000 shares of TRDRS!", "source": "Carol", "body": "60000", "time": 392}, {"headline": "Carol is buying 100000 shares of TRDRS!", "source": "Carol", "body": "100000", "time": 407}, {"headline": "Alice is buying 90000 shares of TRDRS!", "source": "Alice", "body": "90000", "time": 422}], "news_sources": {"Carol": {"paid": false, "can_unsubscribe": false}, "Bob": {"paid": false, "can_unsubscribe": false}, "Alice": {"paid": false, "can_unsubscribe": false}}, "underlyings": {"TRDRS": {"limit": 5000, "name": "TRDRS"}}, "meta": {"case_length": 450, "max_open_orders": 100, "interest_rate": {"USD": 0.0}, "loss_limit": -1000000, "endowment": {"USD": 100000}, "default_currency": "USD", "price_reaction": true}, "custom_orders": [{"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 10, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 25, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 40, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 55, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 70, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 85, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 100, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 115, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 130, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 145, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 160, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 175, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 190, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 205, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 220, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 235, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 250, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 265, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 280, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 295, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 310, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 325, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 340, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 355, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 370, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 385, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 400, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 415, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 430, "duration": 2, "quantity": 90000}]} 2 | -------------------------------------------------------------------------------- /Algo S&T/example_bot.py: -------------------------------------------------------------------------------- 1 | # ---------- OLD ------------- 2 | from tradersbot import TradersBot 3 | import sys 4 | from datetime import datetime, timedelta 5 | import numpy as np 6 | import pandas as pd 7 | 8 | #Initialize variables: positions, expectations, future customer orders, etc 9 | POSITION_LIMIT = 5000 10 | CASE_LENGTH = 450 11 | CURRENCY = 'USD' 12 | ORDER_DELAY = 8 13 | ORDER_WAIT = 15 # how long to wait before evaluating the effect 14 | C = 0.00004 15 | MESSAGE_LIMIT = 25 16 | 17 | p0 = 200 18 | cash = 100000 19 | price = 200 20 | market_position_lit = 0 21 | market_position_dark = 0 22 | position_lit = 0 23 | position_dark = 0 24 | first_time = None 25 | time = 0 26 | time_offset = 0 # for when it starts late 27 | topBid = 0 28 | topAsk = 0 29 | # TODO: use a more sophisticated probability model 30 | # customers['Bob'] = {'full':0, 'half':5, 'random':1} 31 | # the values are the number of times each possibility occurs 32 | customers = {} 33 | pending_orders = [] 34 | # contains (ticker, trade_id, cancelled) = ('TRDRS.DARK', 0, False) 35 | pending_trades = set() 36 | recent_messages = [] 37 | 38 | def readyToSend(): 39 | print('Ready Start') 40 | global MESSAGE_LIMIT, recent_messages, time 41 | updateTime() 42 | time_limit = time - 1 43 | for i in range(len(recent_messages)): 44 | if recent_messages[i] >= time_limit: 45 | recent_messages = recent_messages[i:] 46 | if len(recent_messages) < MESSAGE_LIMIT: 47 | recent_messages.append(time) 48 | print('Ready End') 49 | return True 50 | print('Ready End') 51 | return False 52 | 53 | def updateTime(): 54 | print('Time Start') 55 | global first_time, time, time_offset 56 | if first_time is None: 57 | first_time = datetime.now() 58 | delta = datetime.now() - first_time 59 | time = delta.total_seconds() + time_offset 60 | print('Time End') 61 | 62 | def processOrders(order): 63 | print('Orders Start') 64 | global pending_orders 65 | for pending in pending_orders: 66 | processOrder(pending, order) 67 | print('Orders End') 68 | 69 | def processOrder(pending_order, order): 70 | print('Order Start') 71 | global time, p0, customers 72 | if pending_order is None: 73 | return 74 | if pending_order['p0_at_sale'] is None: 75 | if time >= pending_order['sale_time']: 76 | global market_position_dark 77 | market_position_dark += pending_order['quantity'] 78 | pending_order['p0_at_sale'] = p0 79 | elif len(pending_trades) == 0: 80 | # TODO: Add support for using multiple trades of DARK 81 | # You'll need to track how much you already sent and what you expect to reach 82 | global customers 83 | customer = customers[pending_order['source']] 84 | trustworthiness = customer['full'] + customer['half'] - customer['random'] 85 | # TODO: consider adding equality 86 | if trustworthiness >= 0: 87 | global POSITION_LIMIT 88 | global position_lit, position_dark, cash, price 89 | quantity = pending_order['quantity'] 90 | # follow your guess 91 | if pending_order['buy']: 92 | # p0 might go up 93 | # buy LIT, sell DARK 94 | buy_quantity = POSITION_LIMIT - position_lit - position_dark 95 | affordable = cash / price 96 | buy_quantity = int(min(quantity, buy_quantity, affordable)) 97 | sell_quantity = int(position_lit + position_dark) 98 | buy_quantity = 1000 99 | sell_quantity = 1000 100 | difference = 0 101 | if buy_quantity >= 100 and readyToSend(): 102 | difference = max(buy_quantity - 1000, 0) 103 | order.addBuy('TRDRS.LIT', buy_quantity - difference) 104 | sell_quantity = int(buy_quantity + position_lit + position_dark) 105 | # TODO: guess the price in a better way 106 | if sell_quantity >= 1000 and readyToSend(): 107 | order.addSell('TRDRS.DARK', sell_quantity - difference, price=price) 108 | else: 109 | # expecting p0 to go down 110 | # sell LIT, buy DARK 111 | sell_quantity = int(position_lit + position_dark) 112 | buy_quantity = POSITION_LIMIT - position_lit - position_dark 113 | affordable = cash / price 114 | # TODO: compute price in a better way 115 | buy_quantity = int(min(abs(quantity), affordable, buy_quantity)) 116 | buy_quantity = 1000 117 | sell_quantity = 1000 118 | difference = 0 119 | if sell_quantity >= 100 and readyToSend(): 120 | difference = max(sell_quantity - 1000, 0) 121 | order.addSell('TRDRS.LIT', sell_quantity - difference) 122 | if buy_quantity >= 1000 and readyToSend(): 123 | order.addBuy('TRDRS.DARK', buy_quantity - difference, price=price) 124 | else: 125 | # we think it's random 126 | pass 127 | elif pending_order['p0_at_eval'] is None and time >= pending_order['eval_time']: 128 | global pending_orders, C 129 | pending_order['p0_at_eval'] = p0 130 | change_in_p0 = p0 - pending_order['p0_at_news'] 131 | full = C * pending_order['quantity'] 132 | half = full / 2 133 | margin = full / 4 134 | name = pending_order['source'] 135 | if abs(change_in_p0 - full) <= margin: 136 | customers[name]['full'] += 1 137 | elif abs(change_in_p0 - half) <= margin: 138 | customers[name]['half'] += 1 139 | else: 140 | customers[name]['random'] += 1 141 | cancelTrades(order) 142 | pending_orders = pending_orders[1:] 143 | print('Order End') 144 | 145 | def cancelTrades(order): 146 | print('Cancel Start') 147 | global pending_trades 148 | for pending in pending_trades: 149 | if not pending[2] and readyToSend(): 150 | order.addCancel(pending[0], pending[1]) 151 | pending_trades.remove(pending) 152 | pending_trades.add((pending[0], pending[1], True)) 153 | print('Cancel End') 154 | 155 | def onAckRegister(msg, order): 156 | print('Reg Start') 157 | global POSITION_LIMIT, CURRENCY, CASE_LENGTH 158 | global time, p0 159 | POSITION_LIMIT = msg['case_meta']['underlyings']['TRDRS']['limit'] 160 | CURRENCY = msg['case_meta']['default_currency'] 161 | CASE_LENGTH = msg['case_meta']['case_length'] 162 | p0 = msg['case_meta']['securities']['TRDRS.LIT']['starting_price'] 163 | time = msg['elapsed_time'] 164 | if time != 0: 165 | global time_offset 166 | time_offset = msg['elapsed_time'] 167 | first_time = datetime.now() - timedelta(seconds=time) 168 | for name in msg['case_meta']['news_sources']: 169 | customers[name] = {'full': 0, 'half': 0, 'random': 0} 170 | onTraderUpdate(msg, order) 171 | print('Reg End') 172 | 173 | def onMarketUpdate(msg, order): 174 | print('Mark Start') 175 | updateTime() 176 | state = msg['market_state'] 177 | if state['ticker'] == 'TRDRS.LIT': 178 | global market_position_lit, price, p0, C 179 | price = state['last_price'] 180 | delta = 0 181 | bids = [state['bids'][p] for p in state['bids'] if float(p) >= price] 182 | asks = [state['asks'][p] for p in state['asks'] if float(p) <= price] 183 | delta = sum(bids) - sum(asks) 184 | market_position_lit -= delta 185 | p0 = price + C * market_position_lit 186 | else: 187 | if len(state['bids']) != 0: 188 | print('Bids', state['bids']) 189 | if len(state['asks']) != 0: 190 | print('Asks', state['asks']) 191 | processOrders(order) 192 | print('Mark End') 193 | 194 | def onTraderUpdate(msg, order): 195 | print('Trader Start') 196 | global CURRENCY 197 | global cash, position_lit, position_dark 198 | state = msg['trader_state'] 199 | cash = state['cash'][CURRENCY] 200 | position_lit = state['positions']['TRDRS.LIT'] 201 | position_dark = state['positions']['TRDRS.DARK'] 202 | # print(state['open_orders']) 203 | # print('PNL:', state['pnl'][CURRENCY]) 204 | print('Trader End') 205 | 206 | def onTrade(msg, order): 207 | print('Trade Start') 208 | global pending_trades 209 | for trade in msg['trades']: 210 | pending_trades.discard((trade['ticker'], trade['trade_id'], False)) 211 | print('Trade End') 212 | 213 | def onAckModifyOrders(msg, order): 214 | print('Mod Start') 215 | global pending_trades 216 | if 'cancels' in msg: 217 | for trade_id in msg['cancels']: 218 | # remove successful cancels 219 | trade = ('TRDRS.DARK', trade_id, True) 220 | if ('TRDRS.DARK', trade_id, True) not in pending_trades: 221 | trade = ('TRDRS.LIT', trade_id, True) 222 | pending_trades.remove(trade) 223 | if not msg['cancels'][trade_id]: 224 | # add back failed cancels 225 | pending_trades.add((trade[0], trade[1], False)) 226 | 227 | for trade in msg['orders']: 228 | order = (trade['ticker'], str(trade['order_id']), False) 229 | # add orders we just sent in 230 | pending_trades.add(order) 231 | print('Mod End') 232 | 233 | def onNews(msg, order): 234 | print('News Start') 235 | try: 236 | news = msg['news'] 237 | headline = news['headline'] 238 | buy = 'buy' in headline 239 | sell = 'sell' in headline 240 | source = news['source'] 241 | news_time = news['time'] 242 | quantity = news['body'] 243 | if (not buy and not sell) or str(quantity) not in headline: 244 | print('Unable to parse headline') 245 | return 246 | quantity = int(quantity) * (1 if buy else -1) 247 | global ORDER_DELAY 248 | global pending_orders, p0 249 | new_order = {'source': source, 250 | 'buy': buy, 251 | 'quantity': quantity, 252 | 'news_time': news_time, 253 | 'sale_time': news_time + ORDER_DELAY, 254 | 'eval_time': news_time + ORDER_WAIT, 255 | 'p0_at_news': p0, 256 | 'p0_at_sale': None, 257 | 'p0_at_eval': None} 258 | pending_orders.append(new_order) 259 | except: 260 | print('Unable to parse headline') 261 | print('News End') 262 | 263 | DEBUG = False 264 | algo_bot = None 265 | if len(sys.argv) >= 4: 266 | algo_bot = TradersBot(host=sys.argv[1], id=sys.argv[2], password=sys.argv[3]) 267 | DEBUG = False 268 | else: 269 | algo_bot = TradersBot('127.0.0.1', 'trader0', 'trader0') 270 | algo_bot.onAckRegister = onAckRegister 271 | algo_bot.onMarketUpdate = onMarketUpdate 272 | algo_bot.onTraderUpdate = onTraderUpdate 273 | algo_bot.onTrade = onTrade 274 | algo_bot.onAckModifyOrders = onAckModifyOrders 275 | algo_bot.onNews = onNews 276 | 277 | if not DEBUG: 278 | def f(*args): 279 | return None 280 | print = f 281 | 282 | algo_bot.run() -------------------------------------------------------------------------------- /Algo S&T/old/sample_0.json: -------------------------------------------------------------------------------- 1 | {"securities": {"TRDRS.LIT": {"starting_price": 200, "minimum_order_size": 1, "self_trading_fine_amount": 0.008, "security_type": "etf", "rebate_amount": 0.0, "maximum_decimal_digits": 2, "fee_amount": 0.0001, "underlyings": {"TRDRS": 1}, "maximum_order_size": 1000, "base_currency": "USD", "ticker": "TRDRS.LIT", "tradeable": true, "dark": false, "price_reaction": 25000, "pricepath": {"volume": [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100], "price": [200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.56, 201.12, 201.68, 202.24, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.8, 202.56, 202.32, 202.08, 201.84, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.6, 201.8, 202.0, 202.2, 202.4, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 202.6, 203.24, 203.88, 204.52, 205.16, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 205.8, 206.52, 207.24, 207.96, 208.68, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.4, 209.8, 210.2, 210.6, 211.0, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.68, 211.96, 212.24, 212.52, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.8, 212.48, 212.16, 211.84, 211.52, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.2, 211.4, 211.6, 211.8, 212.0, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.2, 212.76, 213.32, 213.88, 214.44, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.0, 215.2, 215.4, 215.6, 215.8, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 216.0, 215.2, 214.4, 213.6, 212.8, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 212.0, 211.52, 211.04, 210.56, 210.08, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 209.6, 210.0, 210.4, 210.8, 211.2, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.6, 211.88, 212.16, 212.44, 212.72, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 213.0, 212.68, 212.36, 212.04, 211.72, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.4, 211.88, 212.36, 212.84, 213.32, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 213.8, 214.2, 214.6, 215.0, 215.4, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 215.8, 216.36, 216.92, 217.48, 218.04, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.6, 218.2, 217.8, 217.4, 217.0, 216.6, 216.6, 216.6, 216.6, 216.6, 216.6, 216.6, 216.6, 216.6, 216.6, 216.6], "spread": [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05], "strictness": [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0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0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]}}, "TRDRS.DARK": {"starting_price": 200, "minimum_order_size": 1000, "self_trading_fine_amount": 0.008, "security_type": "etf", "rebate_amount": 0.0, "maximum_decimal_digits": 2, "fee_amount": 0.0001, "underlyings": {"TRDRS": 1}, "maximum_order_size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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "price": [200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0], "spread": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}}}, "news": [{"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 5}, {"headline": "Alice is selling 60000 shares of TRDRS!", "source": "Alice", "body": "60000", "time": 20}, {"headline": "Alice is buying 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 35}, {"headline": "Bob is buying 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 50}, {"headline": "Carol is buying 80000 shares of TRDRS!", "source": "Carol", "body": "80000", "time": 65}, {"headline": "Carol is buying 90000 shares of TRDRS!", "source": "Carol", "body": "90000", "time": 80}, {"headline": "Carol is buying 50000 shares of TRDRS!", "source": "Carol", "body": "50000", "time": 95}, {"headline": "Alice is buying 70000 shares of TRDRS!", "source": "Alice", "body": "70000", "time": 110}, {"headline": "Bob is selling 60000 shares of TRDRS!", "source": "Bob", "body": "60000", "time": 125}, {"headline": "Alice is selling 80000 shares of TRDRS!", "source": "Alice", "body": "80000", "time": 140}, {"headline": "Alice is buying 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 155}, {"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 170}, {"headline": "Bob is selling 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 185}, {"headline": "Alice is buying 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 200}, {"headline": "Bob is buying 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 215}, {"headline": "Bob is selling 80000 shares of TRDRS!", "source": "Bob", "body": "80000", "time": 230}, {"headline": "Carol is selling 100000 shares of TRDRS!", "source": "Carol", "body": "100000", "time": 245}, {"headline": "Bob is buying 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 260}, {"headline": "Carol is selling 60000 shares of TRDRS!", "source": "Carol", "body": "60000", "time": 275}, {"headline": "Alice is buying 100000 shares of TRDRS!", "source": "Alice", "body": "100000", "time": 290}, {"headline": "Alice is buying 70000 shares of TRDRS!", "source": "Alice", "body": "70000", "time": 305}, {"headline": "Alice is selling 80000 shares of TRDRS!", "source": "Alice", "body": "80000", "time": 320}, {"headline": "Bob is selling 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 335}, {"headline": "Bob is selling 60000 shares of TRDRS!", "source": "Bob", "body": "60000", "time": 350}, {"headline": "Bob is buying 90000 shares of TRDRS!", "source": "Bob", "body": "90000", "time": 365}, {"headline": "Carol is buying 60000 shares of TRDRS!", "source": "Carol", "body": "60000", "time": 380}, {"headline": "Carol is buying 50000 shares of TRDRS!", "source": "Carol", "body": "50000", "time": 395}, {"headline": "Bob is buying 70000 shares of TRDRS!", "source": "Bob", "body": "70000", "time": 410}, {"headline": "Carol is buying 70000 shares of TRDRS!", "source": "Carol", "body": "70000", "time": 425}, {"headline": "Alice is selling 100000 shares of TRDRS!", "source": "Alice", "body": "100000", "time": 440}], "news_sources": {"Bob": {"paid": false, "can_unsubscribe": false}, "Alice": {"paid": false, "can_unsubscribe": false}, "Carol": {"paid": false, "can_unsubscribe": false}}, "underlyings": {"TRDRS": {"limit": 5000, "name": "TRDRS"}}, "meta": {"case_length": 450, "max_open_orders": 100, "interest_rate": {"USD": 0.0}, "loss_limit": -1000000, "endowment": {"USD": 100000}, "default_currency": "USD", "price_reaction": true}, "custom_orders": [{"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 10, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 25, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 40, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 55, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 70, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 85, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 100, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 115, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 130, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 145, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 160, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 175, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 190, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 205, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 220, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 235, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 250, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 265, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 280, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 295, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 310, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 325, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 340, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 355, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 370, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 385, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 400, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 415, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 430, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 445, "duration": 2, "quantity": 100000}]} -------------------------------------------------------------------------------- /Algo S&T/old/sample_2.json: -------------------------------------------------------------------------------- 1 | {"securities": {"TRDRS.LIT": {"starting_price": 200, "minimum_order_size": 1, "self_trading_fine_amount": 0.008, "security_type": "etf", "rebate_amount": 0.0, "maximum_decimal_digits": 2, "fee_amount": 0.0001, "underlyings": {"TRDRS": 1}, "maximum_order_size": 1000, "base_currency": "USD", "ticker": "TRDRS.LIT", "tradeable": true, "dark": false, "price_reaction": 25000, "pricepath": {"volume": [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100], "price": [200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.64, 201.28, 201.92, 202.56, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.2, 203.48, 203.76, 204.04, 204.32, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.6, 204.28, 203.96, 203.64, 203.32, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.0, 203.4, 203.8, 204.2, 204.6, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.0, 205.2, 205.4, 205.6, 205.8, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 206.0, 205.2, 204.4, 203.6, 202.8, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 202.0, 201.6, 201.2, 200.8, 200.4, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 199.6, 199.2, 198.8, 198.4, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 198.0, 197.6, 197.2, 196.8, 196.4, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 196.0, 195.76, 195.52, 195.28, 195.04, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.4, 194.0, 193.6, 193.2, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.8, 192.0, 191.2, 190.4, 189.6, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 188.8, 189.0, 189.2, 189.4, 189.6, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.8, 189.52, 189.24, 188.96, 188.68, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 188.4, 189.04, 189.68, 190.32, 190.96, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.2, 190.8, 190.4, 190.0, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.6, 189.28, 188.96, 188.64, 188.32, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.0, 188.72, 189.44, 190.16, 190.88, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 191.6, 192.24, 192.88, 193.52, 194.16, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 194.8, 195.12, 195.44, 195.76, 196.08, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4, 196.4], "spread": [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05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.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]}}, "TRDRS.DARK": {"starting_price": 200, "minimum_order_size": 1000, "self_trading_fine_amount": 0.008, "security_type": "etf", "rebate_amount": 0.0, "maximum_decimal_digits": 2, "fee_amount": 0.0001, "underlyings": {"TRDRS": 1}, "maximum_order_size": 1000, "base_currency": "USD", "ticker": "TRDRS.DARK", "tradeable": true, "dark": true, "price_reaction": 0, "pricepath": {"volume": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "price": [200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}}}, "news": [{"headline": "Bob is buying 80000 shares of TRDRS!", "source": "Bob", "body": "80000", "time": 5}, {"headline": "Alice is buying 70000 shares of TRDRS!", "source": "Alice", "body": "70000", "time": 20}, {"headline": "Alice is selling 80000 shares of TRDRS!", "source": "Alice", "body": "80000", "time": 35}, {"headline": "Bob is buying 50000 shares of TRDRS!", "source": "Bob", "body": "50000", "time": 50}, {"headline": "Alice is buying 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 65}, {"headline": "Carol is selling 80000 shares of TRDRS!", "source": "Carol", "body": "80000", "time": 80}, {"headline": "Bob is selling 100000 shares of TRDRS!", "source": "Bob", "body": "100000", "time": 95}, {"headline": "Carol is buying 100000 shares of TRDRS!", "source": "Carol", "body": "100000", "time": 110}, {"headline": "Alice is selling 100000 shares of TRDRS!", "source": "Alice", "body": "100000", "time": 125}, {"headline": "Carol is buying 50000 shares of TRDRS!", "source": "Carol", "body": "50000", "time": 140}, {"headline": "Bob is selling 50000 shares of TRDRS!", "source": "Bob", "body": "50000", "time": 155}, {"headline": "Carol is buying 90000 shares of TRDRS!", "source": "Carol", "body": "90000", "time": 170}, {"headline": "Carol is selling 50000 shares of TRDRS!", "source": "Carol", "body": "50000", "time": 185}, {"headline": "Bob is selling 50000 shares of TRDRS!", "source": "Bob", "body": "50000", "time": 200}, {"headline": "Carol is buying 100000 shares of TRDRS!", "source": "Carol", "body": "100000", "time": 215}, {"headline": "Alice is selling 60000 shares of TRDRS!", "source": "Alice", "body": "60000", "time": 230}, {"headline": "Alice is selling 100000 shares of TRDRS!", "source": "Alice", "body": "100000", "time": 245}, {"headline": "Bob is selling 100000 shares of TRDRS!", "source": "Bob", "body": "100000", "time": 260}, {"headline": "Alice is buying 50000 shares of TRDRS!", "source": "Alice", "body": "50000", "time": 275}, {"headline": "Alice is selling 70000 shares of TRDRS!", "source": "Alice", "body": "70000", "time": 290}, {"headline": "Carol is selling 60000 shares of TRDRS!", "source": "Carol", "body": "60000", "time": 305}, {"headline": "Carol is selling 60000 shares of TRDRS!", "source": "Carol", "body": "60000", "time": 320}, {"headline": "Carol is selling 60000 shares of TRDRS!", "source": "Carol", "body": "60000", "time": 335}, {"headline": "Bob is buying 80000 shares of TRDRS!", "source": "Bob", "body": "80000", "time": 350}, {"headline": "Bob is selling 50000 shares of TRDRS!", "source": "Bob", "body": "50000", "time": 365}, {"headline": "Alice is selling 80000 shares of TRDRS!", "source": "Alice", "body": "80000", "time": 380}, {"headline": "Bob is buying 90000 shares of TRDRS!", "source": "Bob", "body": "90000", "time": 395}, {"headline": "Bob is buying 80000 shares of TRDRS!", "source": "Bob", "body": "80000", "time": 410}, {"headline": "Carol is selling 100000 shares of TRDRS!", "source": "Carol", "body": "100000", "time": 425}, {"headline": "Alice is buying 80000 shares of TRDRS!", "source": "Alice", "body": "80000", "time": 440}], "news_sources": {"Carol": {"paid": false, "can_unsubscribe": false}, "Alice": {"paid": false, "can_unsubscribe": false}, "Bob": {"paid": false, "can_unsubscribe": false}}, "underlyings": {"TRDRS": {"limit": 5000, "name": "TRDRS"}}, "meta": {"case_length": 450, "max_open_orders": 100, "interest_rate": {"USD": 0.0}, "loss_limit": -1000000, "endowment": {"USD": 100000}, "default_currency": "USD", "price_reaction": true}, "custom_orders": [{"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 10, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 25, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 40, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 55, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 70, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 85, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 100, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 115, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 130, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 145, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 160, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 175, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 190, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 205, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 220, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 235, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 250, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 265, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 280, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 295, "duration": 2, "quantity": 70000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 310, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 325, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 340, "duration": 2, "quantity": 60000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 355, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 370, "duration": 2, "quantity": 50000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 385, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 400, "duration": 2, "quantity": 90000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 415, "duration": 2, "quantity": 80000}, {"ticker": "TRDRS.DARK", "buy": false, "price": 1, "time": 430, "duration": 2, "quantity": 100000}, {"ticker": "TRDRS.DARK", "buy": true, "price": 400, "time": 445, "duration": 2, "quantity": 80000}]} -------------------------------------------------------------------------------- /Barclays Options/Chen_Fu_options.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 1. Exploit inconsistencies in implied volatility across different strike prices 3 | 2. Market make when spreads are large, without becoming overly exposed to risk 4 | 3. Hedge positions to reduce risk 5 | 6 | TODO: Make sure 4000 position limit is not exceeded. 7 | Check if profit is actually made. 8 | If options automatically expire, do they still retain their value? 9 | ''' 10 | import tradersbot as tt 11 | import numpy as np 12 | import datetime 13 | from scipy import stats 14 | import sys 15 | import warnings 16 | 17 | 18 | warnings.simplefilter('ignore', np.RankWarning) 19 | #t = tt.TradersBot(host='127.0.0.1', id='trader0', password='trader0') 20 | t = tt.TradersBot(host=sys.argv[1], id=sys.argv[2], password=sys.argv[3]) 21 | 22 | # Keeps track of prices 23 | SECURITIES = {} 24 | # Keep track of time 25 | startTime = "" 26 | # Keep track of IV 27 | IV_dict= {} 28 | 29 | # Initializes the prices 30 | def ack_register_method(msg, order): 31 | global SECURITIES 32 | global startTime 33 | security_dict = msg['case_meta']['securities'] 34 | for security in security_dict.keys(): 35 | if not(security_dict[security]['tradeable']): 36 | continue 37 | SECURITIES[security] = security_dict[security]['starting_price'] 38 | if startTime == "": 39 | startTime = datetime.datetime.now() 40 | # Updates latest price 41 | def market_update_method(msg, order): 42 | global SECURITIES 43 | SECURITIES[msg['market_state']['ticker']] = msg['market_state']['last_price'] 44 | 45 | # Buys or sells in a random quantity every time it gets an update 46 | # You do not need to buy/sell here 47 | def trader_update_method(msg, order): 48 | global SECURITIES 49 | global startTime 50 | global IV_dict 51 | orderLimit = 0 52 | positions = msg['trader_state']['positions'] 53 | for security in positions.keys(): 54 | if security[-1] == 'C' or security[-1] == 'P': 55 | if security not in IV_dict: 56 | IV_dict[security] = {} 57 | IV_dict[security]['IV'] = [] 58 | IV_dict[security]['time'] = [] 59 | time_difference = datetime.datetime.now() - startTime 60 | time_until_expiration = (7.5*60 - time_difference.total_seconds())/3600/24/365 # total of 7.5 minutes per round 61 | current_underlying_price = SECURITIES['TMXFUT'] 62 | current_option_price = SECURITIES[security] 63 | if security[-1] == 'C': 64 | IV = implied_vol('c', current_option_price, current_underlying_price, int(security[1:-1]), 0, time_until_expiration) 65 | else: 66 | IV = implied_vol('p', current_option_price, current_underlying_price, int(security[1:-1]), 0, time_until_expiration) 67 | IV_dict[security]['IV'].append(IV) 68 | IV_dict[security]['time'].append(time_until_expiration) 69 | predicted_IV = predict_IV(IV_dict[security]['time'], IV_dict[security]['IV']) 70 | if security[-1] == 'C': 71 | predicted_price = bsm_price('c', predicted_IV, current_underlying_price, int(security[1:-1]), 0, time_until_expiration) 72 | else: 73 | predicted_price = bsm_price('p', predicted_IV, current_underlying_price, int(security[1:-1]), 0, time_until_expiration) 74 | if predicted_price > current_option_price: 75 | if totalPositions(msg) < 4950: 76 | order.addBuy(security, quantity=10, price=SECURITIES[security]) 77 | else: 78 | order.addBuy(security,quantity=int(positions[security]*-1/2), price=SECURITIES[security]) 79 | orderLimit += 1 80 | else: 81 | if totalPositions(msg) < 4950: 82 | order.addSell(security, quantity=10, price=SECURITIES[security]) 83 | else: 84 | order.addSell(security,quantity=int(positions[security]*-1/2), price=SECURITIES[security]) 85 | orderLimit += 1 86 | # 80 goes over the limit some how 87 | if orderLimit > 37: 88 | break 89 | if totalPositions(msg) < 4950: 90 | continue 91 | print(str(totalValueInPortfolio(msg)+msg['trader_state']['cash']['USD']-1000000)+'\t'+str(totalPositions(msg))) 92 | 93 | # Assumes that msg contains every single option's update 94 | def totalValueInPortfolio(msg): 95 | global SECURITIES 96 | global IV_dict 97 | totalValue = 0 98 | positions = msg['trader_state']['positions'] 99 | 100 | for key, value in positions.items(): 101 | totalValue += value * SECURITIES[key] 102 | 103 | return totalValue 104 | 105 | def totalPositions(msg): 106 | global SECURITIES 107 | global IV_dict 108 | totalPosition = 0 109 | positions = msg['trader_state']['positions'] 110 | for key, value in positions.items(): 111 | totalPosition += abs(value) 112 | return totalPosition 113 | 114 | # Predicts IV 3 seconds into the future 115 | # Z returns [A, B, C] of Ax^2 + Bx + C 116 | def predict_IV(time_list, IV_List): 117 | x = np.array(time_list) 118 | y = np.array(IV_List) 119 | z = np.polyfit(x, y, 2) 120 | future_time = time_list[-1] - 2.0/3600/24/365 121 | return z[0]*future_time*future_time + z[1]*future_time + z[2] 122 | 123 | # Black-Scholes formula. 124 | # Current price of the underlying (the spot price) S 125 | # Strike price K 126 | # Risk-free interest rate r = 0 127 | # Volatility sigma 128 | # expiration time T - current time t = t 129 | # https://www.quantconnect.com/tutorials/introduction-to-options/historical-volatility-and-implied-volatility 130 | 131 | def bsm_price(option_type, sigma, s, k, r, T): 132 | # calculate the bsm price of European call and put options 133 | sigma = float(sigma) 134 | d1 = (np.log(s / k) + (r + sigma ** 2 * 0.5) * T) / (sigma * np.sqrt(T)) 135 | d2 = d1 - sigma * np.sqrt(T) 136 | if option_type == 'c': 137 | price = np.exp(-r*T) * (s * np.exp(r*T) * stats.norm.cdf(d1) - k * stats.norm.cdf(d2)) 138 | return price 139 | elif option_type == 'p': 140 | price = np.exp(-r*T) * (k * stats.norm.cdf(-d2) - s * np.exp(r*T) * stats.norm.cdf(-d1)) 141 | return price 142 | 143 | def implied_vol(option_type, option_price, s, k, r, T): 144 | # apply bisection method to get the implied volatility by solving the BSM function 145 | precision = 0.00001 146 | upper_vol = 500.0 147 | max_vol = 500.0 148 | min_vol = 0.0001 149 | lower_vol = 0.0001 150 | iteration = 0 151 | 152 | while 1: 153 | iteration +=1 154 | mid_vol = (upper_vol + lower_vol)/2.0 155 | price = bsm_price(option_type, mid_vol, s, k, r, T) 156 | if option_type == 'c': 157 | lower_price = bsm_price(option_type, lower_vol, s, k, r, T) 158 | if (lower_price - option_price) * (price - option_price) > 0: 159 | lower_vol = mid_vol 160 | else: 161 | upper_vol = mid_vol 162 | if abs(price - option_price) < precision: 163 | break 164 | if mid_vol > max_vol - 5 : 165 | mid_vol = 0.000001 166 | break 167 | 168 | elif option_type == 'p': 169 | upper_price = bsm_price(option_type, upper_vol, s, k, r, T) 170 | if (upper_price - option_price) * (price - option_price) > 0: 171 | upper_vol = mid_vol 172 | else: 173 | lower_vol = mid_vol 174 | if abs(price - option_price) < precision: 175 | break 176 | if iteration > 50: 177 | break 178 | return mid_vol 179 | 180 | 181 | t.onAckRegister = ack_register_method 182 | t.onMarketUpdate = market_update_method 183 | t.onTraderUpdate = trader_update_method 184 | #t.onTrade = trade_method 185 | #t.onAckModifyOrders = ack_modify_orders_method 186 | #t.onNews = news_method 187 | t.run() -------------------------------------------------------------------------------- /Barclays Options/example_bot.py: -------------------------------------------------------------------------------- 1 | import tradersbot as tt 2 | import random 3 | 4 | t = tt.TradersBot(host='127.0.0.1', id='trader0', password='trader0') 5 | 6 | # Keeps track of prices 7 | SECURITIES = {} 8 | 9 | # Initializes the prices 10 | def ack_register_method(msg, order): 11 | global SECURITIES 12 | security_dict = msg['case_meta']['securities'] 13 | for security in security_dict.keys(): 14 | if not(security_dict[security]['tradeable']): 15 | continue 16 | SECURITIES[security] = security_dict[security]['starting_price'] 17 | 18 | # Updates latest price 19 | def market_update_method(msg, order): 20 | global SECURITIES 21 | SECURITIES[msg['market_state']['ticker']] = msg['market_state']['last_price'] 22 | 23 | # Buys or sells in a random quantity every time it gets an update 24 | # You do not need to buy/sell here 25 | def trader_update_method(msg, order): 26 | global SECURITIES 27 | 28 | positions = msg['trader_state']['positions'] 29 | for security in positions.keys(): 30 | if random.random() < 0.5: 31 | quant = 10*random.randint(1, 10) 32 | order.addBuy(security, quantity=quant,price=SECURITIES[security]) 33 | else: 34 | quant = 10*random.randint(1, 10) 35 | order.addSell(security, quantity=quant,price=SECURITIES[security]) 36 | 37 | ############################################### 38 | #### You can add more of these if you want #### 39 | ############################################### 40 | 41 | t.onAckRegister = ack_register_method 42 | t.onMarketUpdate = market_update_method 43 | t.onTraderUpdate = trader_update_method 44 | #t.onTrade = trade_method 45 | #t.onAckModifyOrders = ack_modify_orders_method 46 | #t.onNews = news_method 47 | t.run() -------------------------------------------------------------------------------- /Barclays Options/progressBar.py: -------------------------------------------------------------------------------- 1 | def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█'): 2 | """ 3 | Call in a loop to create terminal progress bar 4 | @params: 5 | iteration - Required : current iteration (Int) 6 | total - Required : total iterations (Int) 7 | prefix - Optional : prefix string (Str) 8 | suffix - Optional : suffix string (Str) 9 | decimals - Optional : positive number of decimals in percent complete (Int) 10 | length - Optional : character length of bar (Int) 11 | fill - Optional : bar fill character (Str) 12 | """ 13 | percent = ("{0:." + str(decimals) + "f}").format(100 * (iteration / float(total))) 14 | filledLength = int(length * iteration // total) 15 | bar = fill * filledLength + '-' * (length - filledLength) 16 | print('\r%s |%s| %s%% %s' % (prefix, bar, percent, suffix), end = '\r') 17 | # Print New Line on Complete 18 | if iteration == total: 19 | print() 20 | 21 | # 22 | # Sample Usage 23 | # 24 | 25 | from time import sleep 26 | 27 | # A List of Items 28 | items = list(range(0, 57)) 29 | l = len(items) 30 | 31 | # Initial call to print 0% progress 32 | printProgressBar(0, l, prefix = 'Progress:', suffix = 'Complete', length = 50) 33 | for i, item in enumerate(items): 34 | # Do stuff... 35 | sleep(0.1) 36 | # Update Progress Bar 37 | printProgressBar(i + 1, l, prefix = 'Progress:', suffix = 'Complete', length = 50) -------------------------------------------------------------------------------- /DayOf/__pycache__/mymodel.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/DayOf/__pycache__/mymodel.cpython-36.pyc -------------------------------------------------------------------------------- /DayOf/case_guidelines.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/DayOf/case_guidelines.pdf -------------------------------------------------------------------------------- /DayOf/dayof/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/DayOf/dayof/__init__.py -------------------------------------------------------------------------------- /DayOf/dayof/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/DayOf/dayof/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /DayOf/dayof/framework/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/DayOf/dayof/framework/__init__.py -------------------------------------------------------------------------------- /DayOf/dayof/framework/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/DayOf/dayof/framework/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /DayOf/dayof/framework/__pycache__/loader.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/DayOf/dayof/framework/__pycache__/loader.cpython-36.pyc -------------------------------------------------------------------------------- /DayOf/dayof/framework/__pycache__/tester.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/DayOf/dayof/framework/__pycache__/tester.cpython-36.pyc -------------------------------------------------------------------------------- /DayOf/dayof/framework/__pycache__/train_loaders.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/DayOf/dayof/framework/__pycache__/train_loaders.cpython-36.pyc -------------------------------------------------------------------------------- /DayOf/dayof/framework/loader.py: -------------------------------------------------------------------------------- 1 | import os 2 | try: 3 | import numpy as np 4 | import pandas as pd 5 | except ImportError as e: 6 | print("Error: Please install numpy and pandas on your system for our loaders to work correctly on your system") 7 | raise e 8 | 9 | def mean_squared_error(yhat, y): 10 | return 1 / len(y) * (yhat - y).dot(yhat - y) 11 | 12 | class Grader (object): 13 | def __init__(self, train_dir='train_data'): 14 | self.data_dir = train_dir 15 | self.simplef = os.path.join(train_dir, 'simple.csv') 16 | self.mediumf = os.path.join(train_dir, 'medium.csv') 17 | self.hardf = os.path.join(train_dir, 'hard.csv') 18 | self.simpledf = self.load_train_simple() 19 | self.mediumdf = self.load_train_medium() 20 | self.harddf = self.load_train_hard() 21 | 22 | def simple_answers(self): 23 | return (self.simpledf.p.values) 24 | 25 | def medium_answers(self): 26 | return (self.mediumdf.p.values) 27 | 28 | def hard_answers(self): 29 | return (self.harddf.p.values) 30 | 31 | def simple_args(self): 32 | return (self.simpledf.prev_price.values, self.simpledf.x1.values, self.simpledf.x2.values, self.simpledf.p.values) 33 | 34 | def medium_args(self): 35 | return (self.mediumdf.prev_price.values, self.mediumdf.x1.values, self.mediumdf.x2.values, self.mediumdf.x3.values, self.mediumdf.p.values) 36 | 37 | def hard_args(self): 38 | return (self.harddf.prev_price.values, 39 | self.harddf.x1.values, 40 | self.harddf.x2.values, 41 | self.harddf.x3.values, 42 | self.harddf.p.values) 43 | 44 | def load_train_simple(self): 45 | return pd.read_csv(self.simplef) 46 | 47 | def load_train_medium(self): 48 | return pd.read_csv(self.mediumf) 49 | 50 | def load_train_hard(self): 51 | return pd.read_csv(self.hardf) 52 | -------------------------------------------------------------------------------- /DayOf/dayof/framework/tester.py: -------------------------------------------------------------------------------- 1 | import os 2 | from collections import OrderedDict 3 | try: 4 | import mymodel 5 | if not hasattr(mymodel, 'allocate'): 6 | print('Module mymodel must implement function allocate()') 7 | except ImportError as e: 8 | print('Error: please implement allocate in file tester.py') 9 | raise e 10 | 11 | try: 12 | import numpy as np 13 | import pandas as pd 14 | except ImportError as e: 15 | print("Error: Please install numpy and pandas on your system for our loaders to work correctly on your system") 16 | raise e 17 | 18 | 19 | class Tester(object): 20 | def __init__(self, allocate_func, test_dir='test_data', output='output.csv'): 21 | self.allocate_func = allocate_func 22 | self.data_dir = test_dir 23 | self.output = output 24 | self.simple_fname = os.path.join(test_dir, 'simple.csv') 25 | self.medium_fname = os.path.join(test_dir, 'medium.csv') 26 | self.hard_fname = os.path.join(test_dir, 'hard.csv') 27 | self.simple_df = pd.read_csv(self.simple_fname) 28 | self.medium_df = pd.read_csv(self.medium_fname) 29 | self.hard_df = pd.read_csv(self.hard_fname) 30 | self.timesteps = len(self.simple_df) 31 | self.total = 100000000 32 | 33 | def test(self): 34 | total = self.total 35 | a1 = np.empty(self.timesteps, dtype=np.float64) 36 | a2 = np.empty(self.timesteps, dtype=np.float64) 37 | a3 = np.empty(self.timesteps, dtype=np.float64) 38 | for i in range(self.timesteps): 39 | price_history = np.array([np.float64(s) for s in self.hard_df.price_history[i].split()]) 40 | args = [ 41 | (self.simple_df.prev_price.values[i], self.simple_df.x1.values[i], self.simple_df.x2.values[i]), 42 | (self.medium_df.prev_price.values[i], self.medium_df.x1.values[i], self.medium_df.x2.values[i], self.medium_df.x3.values[i]), 43 | (price_history, 44 | self.hard_df.x1.values[i], 45 | self.hard_df.x2.values[i], 46 | self.hard_df.x3.values[i])] 47 | x1, x2, x3 = self.allocate_func(*args) 48 | p1 = self.simple_df.prev_price.values[i] 49 | p2 = self.medium_df.prev_price.values[i] 50 | p3 = price_history[-1] 51 | if (x1 < 0 or x2 < 0 or x3 < 0): 52 | raise ValueError("Can't spend negative money") 53 | if (p1 * x1 + p2 * x2 + p3 * x3 > total): 54 | raise ValueError("Trying to spend more money than you have") 55 | a1[i] = x1 56 | a2[i] = x2 57 | a3[i] = x3 58 | 59 | result = pd.DataFrame.from_dict(OrderedDict([ 60 | ('a1', a1), 61 | ('a2', a2), 62 | ('a3', a3) 63 | ])) 64 | result.to_csv(self.output, index=False) 65 | 66 | @staticmethod 67 | def quantity_func(n): 68 | alpha = .0002 69 | return 2 / alpha * (np.sqrt(1 + alpha * n) - 1) 70 | 71 | def grade(self): 72 | total = self.total 73 | odf = pd.read_csv(self.output) 74 | r1, r2, r3 = self.simple_df, self.medium_df, self.hard_df 75 | a1 = odf.a1.values 76 | a2 = odf.a2.values 77 | a3 = odf.a3.values 78 | prev1, prev2 = r1.prev_price.values, r2.prev_price.values 79 | prev3 = np.empty((len(prev1),), dtype=np.float64) 80 | for i in range(len(prev1)): 81 | price_history = np.array([np.float64(s) for s in r3.price_history[i].split()]) 82 | prev3[i] = price_history[-1] 83 | next1, next2, next3 = r1.p.values, r2.p.values, r3.p.values 84 | ret = 0 85 | for i in range(len(prev1)): 86 | if (prev1[i] * a1[i] + prev2[i] * a2[i] + prev3[i] * a3[i] > total): 87 | print('Trying to spend more than you have: trade not executed') 88 | elif (a1[i] < 0 or a2[i] < 0 or a3[i] < 0): 89 | print('Trying to spend negative money: trade not executed') 90 | else: 91 | d1, d2, d3 = next1[i] - prev1[i], next2[i] - prev2[i], next3[i] - prev3[i] 92 | qa1, qa2, qa3 = self.quantity_func(a1[i]), self.quantity_func(a2[i]), self.quantity_func(a3[i]) 93 | ret += qa1 * d1 + qa2 * d2 + qa3 * d3 94 | 95 | print('Total Return: ' + str(ret)) 96 | print('Average Return: ' + str(ret / len(prev1))) 97 | return ret -------------------------------------------------------------------------------- /DayOf/dayof/framework/train_loaders.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pandas as pd 3 | 4 | train_dir = 'train_data' 5 | def load_simple(data_dir=train_dir): 6 | """ 7 | returns a tuple with columns 8 | timesteps: ndarray representing timesteps 9 | prev_price: ndarray price right now you use for predictions 10 | x1: ndarray representing a feature 11 | x2: ndarray representing a feature 12 | next_price: ndarray price at next timestep you are trying to predict 13 | """ 14 | df = pd.read_csv(os.path.join(data_dir, 'simple.csv')) 15 | return (df.prev_price.values, df.x1.values, df.x2.values, df.p.values) 16 | 17 | 18 | def load_medium(data_dir=train_dir): 19 | """ 20 | returns a tuple with columns 21 | timesteps: ndarray representing timesteps 22 | prev_price: ndarray price right now you use for predictions 23 | x1: ndarray representing a feature 24 | x2: ndarray representing a feature 25 | x3: ndarray representing a feature 26 | next_price: ndarray price at next timestep you are trying to predict 27 | """ 28 | df = pd.read_csv(os.path.join(data_dir, 'medium.csv')) 29 | return (df.prev_price.values, df.x1.values, df.x2.values, df.x3.values, df.p.values) 30 | 31 | 32 | def load_hard(data_dir=train_dir): 33 | """ 34 | returns a tuple with columns 35 | timesteps: ndarray representing timesteps 36 | prev_price: ndarray price right now, included for consistency 37 | x1: ndarray representing a feature 38 | x2: ndarray representing a feature 39 | x3: ndarray representing a feature 40 | next_price: ndarray price at next timestep you are trying to predict 41 | Note for hard, prev_price is not sufficient and you might want to consider some type of price momentum effect 42 | For the actual tests, you'll receive an array of the 50 previous prices for hard 43 | """ 44 | df = pd.read_csv(os.path.join(data_dir, 'hard.csv')) 45 | return (df.prev_price.values, df.x1.values, df.x2.values, df.x3.values, df.p.values) 46 | -------------------------------------------------------------------------------- /DayOf/mymodel.py: -------------------------------------------------------------------------------- 1 | from dayof.framework.train_loaders import load_simple, load_medium, load_hard 2 | import numpy as np 3 | train_dir = 'train_data' 4 | 5 | # Implement your models below 6 | # Test mean square error on the training set by 7 | # running python test_model.py (possible errors with Python2) 8 | # Depending on your method, you might want to also consider cross 9 | # validation or some type of out-of-sample performance metric 10 | 11 | class SimpleModel(object): 12 | def __init__(self): 13 | self.prev_price, self.x1, self.x2, self.next_price = load_simple(train_dir) 14 | self.train() 15 | 16 | def train(self): 17 | self.b0 = .1749575 18 | self.b1 = .9995143 19 | self.b2 = -.0972899 20 | self.b3 = .0076197 21 | pass 22 | 23 | def predict(self, prev_price, x1, x2): 24 | return self.b0+prev_price*self.b1+x1*self.b2+x2*self.b3 25 | 26 | class MediumModel(object): 27 | def __init__(self): 28 | self.prev_price, self.x1, self.x2, self.x3, self.next_price = load_medium(train_dir) 29 | self.train() 30 | 31 | def train(self): 32 | # train model here 33 | pass 34 | 35 | def predict(self, prev_price, x1, x2, x3): 36 | return prev_price 37 | 38 | class HardModel(object): 39 | def __init__(self): 40 | self.prev_price, self.x1, self.x2, self.x3, self.next_price = load_hard(train_dir) 41 | self.train() 42 | 43 | def train(self): 44 | # train model here 45 | pass 46 | 47 | def predict(self, price_history, x1, x2, x3): 48 | # note price history is the previous 50 prices with most recent prev_price last 49 | # and x1, x2, x3 are still single values 50 | return price_history[-1] 51 | 52 | 53 | simple_model = SimpleModel() 54 | medium_model = MediumModel() 55 | hard_model = HardModel() 56 | 57 | def allocate(simple_args, medium_args, hard_args): 58 | """ 59 | Implement your allocation function here 60 | You should return a tuple (a1, a2, a3), where 61 | a1 is the quantity of stock simple you wish to purchase and so forth 62 | You will buy the stocks at the current price 63 | 64 | The argument format is as follows: 65 | simple_args will be a tuple of (current_price, current_x1, current_x2) 66 | medium_args will be a tuple of (current_price, current_x1, current_x2, current_x3) 67 | hard_args will be a tuple of (current_price_history, current_x1, current_x2, current_x3) 68 | where the current_price_history is the previous 50 prices 69 | and the current price is the last element of current_price_history 70 | 71 | Note that although we notate for example feature x1 for all the stocks, the 72 | features for each stock are unrelated (x1 for simple has no relation to x1 for medium, etc) 73 | 74 | Make sure the total money you allocate satisfies 75 | (a1 * simple_current_price + a2 * medium_current_price + a3 * hard_current_price) < 100000000 76 | Quantities may be decimals so don't worry about rounding 77 | To be safe, you should make sure you're lower than 100000000 by a threshold 78 | You can check your code with the provided helper test_allocate.py 79 | 80 | Test your allocation function on the provided test set by running python test_allocate.py 81 | Generate your final submission on the real data set by running python run_allocate.py 82 | """ 83 | # Sample: retrieve prices and get predictions from models 84 | simple_price = simple_args[0] 85 | medium_price = medium_args[0] 86 | hard_price = hard_args[0][-1] 87 | 88 | simple_prediction = simple_model.predict(*simple_args) 89 | medium_prediction = medium_model.predict(*medium_args) 90 | hard_prediction = hard_model.predict(*hard_args) 91 | 92 | # Sample: allocate all money (except a small threshold) to medium 93 | return ((1000000000-1)/simple_prediction, 0, 0) -------------------------------------------------------------------------------- /DayOf/regression.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | from pandas import DataFrame 3 | from sklearn import linear_model 4 | import statsmodels.api as sm 5 | 6 | data = pd.read_csv('train_data/simple.csv') 7 | df = DataFrame(data, columns=['p', 'prev_price', 't', 'x1', 'x2']) 8 | 9 | 10 | 11 | X = df[['x1', 'x2']] 12 | Y = df[''] 13 | 14 | print(df) -------------------------------------------------------------------------------- /DayOf/run_allocate.py: -------------------------------------------------------------------------------- 1 | from mymodel import allocate 2 | from dayof.framework.tester import Tester 3 | 4 | output_fname = 'output.csv' 5 | test_dir = 'submit_data' 6 | 7 | if __name__ == '__main__': 8 | print('Will load data from directory: ' + test_dir) 9 | print('Running your allocate function and outputting into: ' + output_fname) 10 | t = Tester(allocate, test_dir, output_fname) 11 | t.test() 12 | 13 | -------------------------------------------------------------------------------- /DayOf/test_allocate.py: -------------------------------------------------------------------------------- 1 | from mymodel import allocate 2 | from dayof.framework.tester import Tester 3 | 4 | output_fname = 'test_output.csv' 5 | test_dir = 'test_data' 6 | 7 | if __name__ == '__main__': 8 | print('Will load data from directory: ' + test_dir) 9 | print('Running your allocate function and outputting into: ' + output_fname) 10 | t = Tester(allocate, test_dir, output_fname) 11 | t.test() 12 | t.grade() 13 | 14 | -------------------------------------------------------------------------------- /DayOf/test_model.py: -------------------------------------------------------------------------------- 1 | try: 2 | import numpy as np 3 | except ImportError as e: 4 | print('Please install numpy') 5 | raise e 6 | from mymodel import SimpleModel, MediumModel, HardModel 7 | from dayof.framework.loader import Grader, mean_squared_error 8 | 9 | if __name__ == '__main__': 10 | g = Grader() 11 | choice = int(input("What would you like to test?\n1) Simple\n2) Medium\n3) Hard\n4) All\n>> ")) 12 | 13 | if choice == 1 or choice == 4: 14 | model = SimpleModel() 15 | prev_prices, x1, x2, current_prices = g.simple_args() 16 | predictions = [] 17 | actuals = [] 18 | for i in range(len(x1)): 19 | predictions.append(model.predict(prev_prices[i], x1[i], x2[i])) 20 | actuals.append(current_prices[i]) 21 | predictions, actuals = np.array(predictions, dtype=np.float64), np.array(actuals, dtype=np.float64) 22 | print("Mean Squared Error for Simple Model: " + str(mean_squared_error(predictions, actuals))) 23 | 24 | if choice == 2 or choice == 4: 25 | model = MediumModel() 26 | prev_prices, x1, x2, x3, current_prices = g.medium_args() 27 | predictions = [] 28 | actuals = [] 29 | for i in range(len(x1)): 30 | predictions.append(model.predict(prev_prices[i], x1[i], x2[i], x3[i])) 31 | actuals.append(current_prices[i]) 32 | predictions, actuals = np.array(predictions, dtype=np.float64), np.array(actuals, dtype=np.float64) 33 | print("Mean Squared Error for Medium Model: " + str(mean_squared_error(predictions, actuals))) 34 | 35 | if choice == 3 or choice == 4: 36 | model = HardModel() 37 | prev_prices, x1, x2, x3, current_prices = g.hard_args() 38 | predictions = [] 39 | actuals = [] 40 | for i in range(len(x1) - 50): 41 | k = i + 50 42 | price_history = prev_prices[k-49:k+1] 43 | predictions.append(model.predict(price_history, x1[i], x2[i], x3[i])) 44 | actuals.append(current_prices[k]) 45 | predictions, actuals = np.array(predictions, dtype=np.float64), np.array(actuals, dtype=np.float64) 46 | print("Mean Squared Error for Hard Model: " + str(mean_squared_error(predictions, actuals))) 47 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 samuelfu 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. -------------------------------------------------------------------------------- /Mangocore Binaries/mangocorelinuxamd64.x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/Mangocore Binaries/mangocorelinuxamd64.x -------------------------------------------------------------------------------- /Mangocore Binaries/mangocoreosxamd64.x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/Mangocore Binaries/mangocoreosxamd64.x -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TradingBot 2 | 3 | ``` 4 | $ mangocore --help 5 | Usage of mangocore: 6 | -case string 7 | case file to load 8 | -identity string 9 | identity file to load 10 | -logf string 11 | log file format 12 | -mprofile 13 | enable cpu profiling 14 | -port string 15 | port to use (default ":10914") 16 | -profile 17 | enable cpu profiling 18 | -speedup float 19 | how many times faster mangocore should run (default 1) 20 | -start int 21 | automatically start in given seconds 22 | -test 23 | testing mode (default true) 24 | ``` 25 | 26 | Start the trading server using something like `./mangocore-osx-amd64.x -case /path/to/casefile`. 27 | 28 | Start each bot as a standard python3 file. 29 | 30 | ## Barclays Options 31 | ### Case Information: 32 | 33 | The trade-able instruments are options and TMXFUT futures, where the futures are solely for hedging. Both are cash-settled. 34 | 35 | There are 82 options in each round of the case: 41 puts and 41 calls, in range(80, 121). 36 | 37 | Options expire at the end of each round and their tickers are subsequently re-used. 38 | 39 | Five example tickers are listed below; other tickers follow the same naming conventions: 40 | 41 | | Strike Price | Put Option Ticker | Call Option Ticker | 42 | | ------------- | ------------- |------------- | 43 | | $90 | T90P | T90C | 44 | | $95 | T95P | T95C | 45 | | $100 | T100P| T100C | 46 | | $105 | T105P| T105C | 47 | 48 | The ticker for futures on the index is “TMXFUT” 49 | 50 | ### File information 51 | `Chen_Fu_options.py` 52 | 53 | Calculates the implied volatility of T100C whenever market updates 54 | 55 | Uses the historical implied volatility to predict using polynomial regression future volatility (3 seconds out) 56 | 57 | Calculate future price of T100C using future implied volatility 58 | 59 | If future price > current price, purchase call option 60 | 61 | If future price < current price, sell call option 62 | -------------------------------------------------------------------------------- /Traders_MIT_Fall_2018.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/samuelfu/TradingBot/608464adf08cc9ede838e3947c5ae5ffb31a43f1/Traders_MIT_Fall_2018.pdf -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- 1 | from tradersbot import TradersBot 2 | 3 | t = TradersBot('160.39.148.119', 'trader0', 'trader0') 4 | --------------------------------------------------------------------------------