When will Interactive Brokers give us a nice, clean OTO order type?

Discussion in 'Order Execution' started by topdrudge, Apr 21, 2014.

  1. Thanks for the great responses dst ... the hedge calculation is the most important issue so can you please provide more clarification (truthfully I am confused):

    1.
    True or False: hedge quantity for a full parent execution (no partial fills) = round_down(ratio * parent_quantity) = Truncate_to_integer(ratio * parent quantity)?

    2.
    True or False: Denote by N the full hedge quantity from (1). Then no matter how many partial fills there are, the algorithm ensures that if the full parent order eventually gets executed, the total quantity of all transmitted hedge orders is exactly N?

    3.
    This is where I'm definitely confused, so an example would really help: Suppose the parent order executes completely in 3 partial fills of parent order quantities M1, M2, M3 ... then what are the formulas for N1, N2, N3, the hedge order quantities transmitted upon each partial fill?

    4.
    Suppose I'm hedging 100 shares stock XYZ with 100 shares stock ABC (ratio = 1.0) and the parent order executes in 100 partial fills of 1 share each (this is a real example; dozens of tiny partial fills are common with HFT activity). Then do I pay 100 commissions on the hedges, or 1 commission, or something else?

    P.S. I've got screen shots to send you but I did not get your PM.
     
    #21     May 5, 2014
  2. dst

    dst Interactive Brokers

    True

    True

    size set on pair order after M1 fill = truncate_to_integer(ratio*M1)
    size set on pair order after M2 fill = truncate_to_integer(ratio*[M1+M2])
    size set on pair order after M3 fill = truncate_to_integer(ratio*[M1+M2+M3])
    thus e.g. N2 = truncate_to_integer(ratio*[M1+M2]) - truncate_to_integer(ratio*M1)

    I cannot tell you affirmatively here, this depends on many factors (products/exchanges), you'd need to test e.g. in paper or do couple smaller trade in production, but my guess - you'd pay commission for each order modification (remember that modification is a cancel-replace action).
     
    #22     May 9, 2014
  3. Thanks for the excellent answers dst, appreciate it very much. At this point I'm just waiting for a beta version of the standalone TWS ... any ETA on this?

    And, will the first beta have the fixes for (1) the delay in attaching the hedge order and (2) the ability to change BUY/SELL for orders set up in TWS?
     
    #23     May 9, 2014
  4. dst

    dst Interactive Brokers

    No ETA for standalone; it might take some time to get to standalone; you should not be waiting for it since you can easily trade via API using browser build.

    You are hitting the problem that lead you to use these orders in the first place, recall that these are managed by backend, thus when you say that child order XYZ is a child of a parent ABC, you need to make sure backend is aware of ABC. You need to submit ABC first, before attaching XYZ to it. The best way to do this is to wait for order confirmation for ABC (and not for N seconds as you do now; note that parent order may be rejected due to failed credit check, and other alike reasons). If you are concerned for being unhedged for a period of time, you can set both orders to be active after certain interval (GAT e.g. 10 seconds from now).

    We could provide you with "single method" submission later if we have good demand for this feature and could justify spending development time on this.

    As you know this was available in API all along, we tweaked TWS behavior to be the same in just posted 946 beta; it will also make it into next 945 build refresh.
     
    #24     May 9, 2014
  5. Thanks dst for another very helpful response. I may post on the options forum with a reference to this thread ... I think a lot of options traders are not aware that the "pairs trade order" is also the only really useful order for executing hedged options spreads with the hedge on the server side.
     
    #25     May 9, 2014
  6. Pete - IB

    Pete - IB Interactive Brokers

    This problem is fixed and released in TWS 946, currently in beta.

     
    #26     Jun 13, 2014
  7. Excellent, thanks Pete!
     
    #27     Jun 13, 2014