INNER CODE UNIT · Python

MIN_BID_NEAREST_TICK

keanekwa/Optiver-Ready-Trader-Go · ASModel.py:15

MIN_BID_NEAREST_TICK = (MINIMUM_BID + TICK_SIZE_IN_CENTS) // TICK_SIZE_IN_CENTS * TICK_SIZE_IN_CENTS
MAX_ASK_NEAREST_TICK = MAXIMUM_ASK // TICK_SIZE_IN_CENTS * TICK_SIZE_IN_CENTS


class AutoTrader(BaseAutoTrader):
    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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…