Java or C++ for HFT?

Discussion in 'Automated Trading' started by ppy93, Oct 29, 2021.

  1. ppy93

    ppy93

    For IB, I believe the minimum charge per order is $0.35.
     
    #41     Oct 31, 2021
  2. traider

    traider

    Is this still a problem if you trade >> 100 shares with limit orders as the rebates can get large enough to offset the fixed cost.
     
    #42     Nov 1, 2021
  3. ppy93

    ppy93

    If the # of shares per order is always great than 100, the minimum charge per order imposed by IB is no longer a disadvantage. However, you may want to review your order history carefully to be sure. According to someone else who trade 10-20M shares per month with IB, another big disadvantage of IB is the higher commission for non-smart-route orders which is 75mil/share. He had to use non-smart-route orders sometimes knowing that he would pay 75mil/share instead of 20mil/share. He suspects IB might attempt to internally digest the orders before they are sent to the ECNs.

    After an order is submitted using IB's smart route, how long will it take to be executed? Measuring the time difference might give some indications whether IB attempts to capitalize on the orders with some internal algorithms like Ci**del's payment for order flow before they are sent to the ECNs.

    I only have an account with TD Ameritrade and Trade Station at the moment. I have noticed significant difference between 2 accounts running the exact same strategy which tells me that different retail brokers sell the orders differently which might be related the different agreement with Ci**del. Can someone who does automated trading with IB's API measure the time difference between t_order_submitted_by_bot and t_order_executed_by_IB? I would like to at least compare the difference between IB and TD Ameritrade at the moment.

    When I finish writing the code with Lime, I can compare Lime with IB. My guess is Lime will be significantly faster than IB's popular API due to a few factors, including FIX connection and more favorable order flows. I know IB also offers FIX, if someone using IB's FIX could do the same measurements, I will be able to compare IB's FIX and Lime's FIX, which is a more fair apple-to-apple comparison.
     
    Last edited: Nov 1, 2021
    #43     Nov 1, 2021
    qlai likes this.
  4. With maker rebates from the exchange I have often "paid" a negative commission.
     
    #44     Nov 4, 2021
  5. I did one test with this and found a SMART routed order took something like 120 ms to get an order confirmation but a NASDAQ directed order took about 1200 ms. Both were marketable limit orders on the same stock. This result makes no sense at all. The crazy high cost of a directed order does not make sense either. They really want you to use the SMART router.

    If you read the fine print at IB's website (no shortage of that) they do have deals with ECNs for volume discounts. These volume discounts are not passed to you. They strip off part of the maker rebate and keep it for themselves and send you the remaining portion of the rebate that apparently represents a non-negotiated rack rate.

    So they do have an incentive for their SMART router to make decisions based on more than just getting you the best fill. Hopefully they ignore that conflict of interest and focus strictly on the quality of order fills.
     
    #45     Nov 4, 2021
  6. I have tested IB and TD by sending each an exact order at the exact same millisecond on a 1 Gbps fiber connection. This was multi-threaded to ensure one order did not go out first. A marketable limit order was sent and both were identical. IB won hands down every time and was far cheaper than TD even though I was paying commissions at IB. The "free" trades at TD were very costly during this test!

    But you already knew this. No surprises.
     
    #46     Nov 4, 2021
    jtrader33 and swinging tick like this.
  7. ppy93

    ppy93

    Thank you very much for all your insightful information. When you said it took 120ms to get an order confirmation number, are you referring to the time difference between t_order_submitted_by_bot and t_confirming_order_placed? If yes, have you ever measured the difference between t_order_submitted_by_bot and t_order_executed for marketable limit orders? Thanks!
     
    #47     Nov 4, 2021
  8. The measurement was a Linux timestamp on the local machine when the order went out and a timestamp on my local machine when a confirmation # came back on the IB API callback. I ran this test 1 time so take it with a grain of salt. My expectation was a directed order would be faster but that wasn't the case.
     
    #48     Nov 4, 2021
  9. topdog

    topdog

    So what were the results ?
     
    #49     May 4, 2022
  10. ppy93

    ppy93

    I have not been able to write the code for Lime yet. As soon as I have the results, I will report back.
     
    #50     May 9, 2022
    topdog likes this.