INNER CODE UNIT · Python
__init__
keanekwa/Optiver-Ready-Trader-Go · ASModel.py:20
def __init__(self, loop: asyncio.AbstractEventLoop, team_name: str, secret: str):
"""Initialise a new instance of the AutoTrader class."""
super().__init__(loop, team_name, secret)
self.order_ids = itertools.count(1)
self.bids = set()
self.asks = set()
self.ask_id = self.ask_price = self.bid_id = self.bid_price = self.position = 0
self.hedge_bids = set()
self.hedge_asks = set()
self.hedge_position = 0
self.mid_prices = []
self.T = 1 # Reserve pricing time
# Previous prices on Orderbook
self.bid_prices = np.array([])
self.ask_prices = np.array([])