Module Import alias ImportFrom alias Import alias ImportFrom alias alias ImportFrom alias alias ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad Call NameLoad NameLoad orelse Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list
N/A N/A datetime decimal Decimal N/A queue abc ABCMeta abstractmethod qstrader.event.event FillEvent OrderEvent ExecutionHandler N/A object N/A N/A 
    The ExecutionHandler abstract class handles the interaction
    between a set of order objects generated by a PortfolioHandler
    and the set of Fill objects that actually occur in the
    market. 

    The handlers can be used to subclass simulated brokerages
    or live brokerages, with identical interfaces. This allows
    strategies to be backtested in a very similar manner to the
    live trading engine.
     N/A __metaclass__ ABCMeta execute_order N/A N/A self event N/A N/A N/A 
        Takes an OrderEvent and executes it, producing
        a FillEvent that gets placed onto the events queue.

        Parameters:
        event - Contains an Event object with order information.
         N/A N/A NotImplementedError Should implement execute_order() N/A abstractmethod N/A IBSimulatedExecutionHandler N/A ExecutionHandler N/A N/A 
    The simulated execution handler for Interactive Brokers
    converts all order objects into their equivalent fill 
    objects automatically without latency, slippage or 
    fill-ratio issues.

    This allows a straightforward "first go" test of any strategy,
    before implementation with a more sophisticated execution
    handler.
     __init__ N/A N/A self events_queue price_handler N/A N/A N/A 
        Initialises the handler, setting the event queue
        as well as access to local pricing.

        Parameters:
        events_queue - The Queue of Event objects.
         N/A N/A self events_queue events_queue N/A N/A self price_handler price_handler N/A calculate_ib_commission N/A N/A self N/A N/A N/A 
        Calculate the Interactive Brokers commission for
        a transaction. At this stage, simply add in $1.00
        for transaction costs, irrespective of lot size.
         N/A N/A Decimal 1.00 N/A execute_order N/A N/A self event N/A N/A N/A 
        Converts OrderEvents into FillEvents "naively",
        i.e. without any latency, slippage or fill ratio problems.

        Parameters:
        event - An Event object with order information.
         N/A N/A N/A event type ORDER N/A N/A timestamp N/A N/A N/A datetime datetime utcnow N/A ticker N/A event ticker N/A action N/A event action N/A quantity N/A event quantity N/A N/A bid ask N/A N/A N/A self price_handler get_best_bid_ask ticker N/A N/A N/A event action BOT N/A N/A fill_price N/A Decimal N/A str ask N/A N/A fill_price N/A Decimal N/A str bid N/A exchange ARCA N/A commission N/A N/A self calculate_ib_commission N/A fill_event N/A FillEvent timestamp ticker action quantity exchange fill_price commission N/A N/A N/A N/A self events_queue put fill_event N/A N/A