'Converts OrderEvents into FillEvents "naively",
i.e. without any latency, slippage or fill ratio problems.
Parameters:
event - An Event object with order information.'

def execute_order(self, event):

    if (event.type == EventType.ORDER):
        timestamp = self.price_handler.get_last_timestamp(event.ticker)
        ticker = event.ticker
        action = event.action
        quantity = event.quantity
        if self.price_handler.istick():
            (bid, ask) = self.price_handler.get_best_bid_ask(ticker)
            if (event.action == 'BOT'):
                fill_price = ask
            else:
                fill_price = bid
        else:
            close_price = self.price_handler.get_last_close(ticker)
            fill_price = close_price
        exchange = 'ARCA'
        commission = self.calculate_ib_commission(quantity, fill_price)
        fill_event = FillEvent(timestamp, ticker, action, quantity, exchange, fill_price, commission)
        self.events_queue.put(fill_event)
        if (self.compliance is not None):
            self.compliance.record_trade(fill_event)
