Automated Currency and ETF Arbitrage Journal

Discussion in 'Automated Trading' started by robbob, Jul 23, 2012.

  1. That's essentially $20 per million per side which is pretty standard. The key tho is getting the dealer out of the middle which sounds like is the case. Its been a while since I've seen what theyre offering
     
    #21     Aug 15, 2012
  2. j2ee

    j2ee

    I see. So you can set a very low amount $ of money for your testing level even with live account...
     
    #22     Aug 15, 2012
  3. robbob

    robbob

    This past week was mixed with the AUD/NZD strategy taking the biggest hit with a loss of -60 ticks. HKD/JPY and USD/SGD edge out a few ticks of profit and the EUR/DKK pair had a solid week with a gain of more than 14 ticks.

    This week’s number are below. All results include commission.

    Week of 8/12/12

    AUD/NZD
    Trades: 17
    Winning Trades: 82.4%
    Total P/L: -60.0 ticks

    USD/SGD
    Trades: 12
    Winning Trades: 83.3%
    Total P/L: +3.0 ticks

    HKD/JPY
    Trades: 5
    Winning Trades: 100.0%
    Total P/L: +3.1 ticks

    EUR/DKK
    Trades: 11
    Winning Trades: 91.0%
    Total P/L: +14.6 ticks



    Total since inception (3/11/12)
    AUD/NZD
    Trades: 376
    Winning Trades: 77.9%
    Total P/L: +268.9 ticks

    Total since inception (7/22/12)
    USD/SGD
    Trades: 67
    Winning Trades: 79.1%
    Total P/L: -27.0 ticks

    HKD/JPY
    Trades: 47
    Winning Trades: 74.5%
    Total P/L: -3.6 ticks

    EUR/DKK
    Trades: 54
    Winning Trades: 85.0%
    Total P/L: +28.7 ticks

    Update on Progress of the Arb Trader Application

    Currency Strategy

    This week I will be moving to live trading the following features/bugfixes.
    • Issue with ArbTrader’s real-time bar engine firing events a few seconds too early has been fixed and deployed to production this week. This bug was causing “duplicate order ID” errors, which in turn was preventing entry orders from being submitted to TWS.
    • Ability to dynamically create new connection to a quote data source. Currently the app is hard coded to talk to either my live or paper trade account and needs to be recompiled when switching between the two.

    End-of-Day ETF arb strategy
    No updates are planned for this strategy this week.

    Intraday ETF arb strategy
    • This week will continue testing and collecting data for 3 pairs.
    • Develop a method to filter data spikes in order to generate reliable trading signals. I’ve noticed some occasional spikes in the bid and/or ask, which, when the strategy places an order, it isn’t getting filled at those prices. The ArbTrader needs a way to filter this data in order to generate signals which have a higher probability of profit.
     
    #23     Aug 21, 2012
  4. robbob

    robbob

    Another issue occurred this week with the Interactive Brokers Gateway application which is not leaving me with warm fuzzy feelings. I awoke on Thursday morning to find the Gateway in the following state.

    [​IMG]

    Apparently the Gateway disconnected from the Interactive Brokers server sometime around 1am PDT on Thursday for an unknown reason. However, upon attempting to reconnect the Timeout Exception (above) was thrown and the Gateway didn’t attempt to reconnect again. I also had 2 instances of Trader Workstation (TWS) running on my machine as well overnight, and they had no issues and were receiving market data as normal when I logged in, in the morning.

    After closing the error dialog, the Gateway prompted for my username and password and then the security code. After this step however the Gateway still remained in a disconnected state until I shut it down and launched it again.

    At this point I’m wondering if there is any real advantage to running my automated trading application through the Gateway vs. through an instance of TWS. I thought that the Gateway would probably be a little lighter weight and consume less resources, but I’m inclined to switch back over to using TWS instead and IBControler to keep it running continuously through the entire week.

    I’ll be opening a help ticket with IB support, but I don’t anticipate any meaningful resolution on this.
     
    #24     Aug 25, 2012
  5. robbob

    robbob

    As mentioned in a previous post, issues with the IB Gateway this week caused the system to miss about 3 trading opportunities that would have proved to be profitable early Thursday morning. Regardless however both the EUR/DKK and AUD/NZD strategies had a great week, tallying up 30.5 and 59.2 ticks respectively, while the USD/SGD had a rough week with a loss of about 30 ticks.

    This week’s number are below. All results include commission.

    Week of 8/19/12

    AUD/NZD
    Trades: 19
    Winning Trades: 94.7%
    Total P/L: +59.2 ticks

    USD/SGD
    Trades: 18
    Winning Trades: 77.8%
    Total P/L: -30.5 ticks

    HKD/JPY
    Trades: 15
    Winning Trades: 80.0%
    Total P/L: -3.90 ticks

    EUR/DKK
    Trades: 17
    Winning Trades: 94.1%
    Total P/L: +30.5 ticks



    Total since inception (3/11/12)
    AUD/NZD
    Trades: 395
    Winning Trades: 78.7%
    Total P/L: +328.1 ticks

    Total since inception (7/22/12)
    USD/SGD
    Trades: 85
    Winning Trades: 78.8%
    Total P/L: -57.5 ticks

    HKD/JPY
    Trades: 62
    Winning Trades: 75.8%
    Total P/L: -7.5 ticks

    EUR/DKK
    Trades: 71
    Winning Trades: 87.3%
    Total P/L: +59.2 ticks

    Update on Progress of the Arb Trader Application

    Currency Strategy

    This week I will be moving to live trading the following features/bugfixes.
    • This will likely be the last week that the USD/SGD pair is traded. Historical backtest results weren’t great, but I wanted to see how the pair performed in actual trading. Live trading results look to be about in line with backtest results.
    • I will begin work with revamping the user interface for this strategy which will include adding some JavaFX components including real-time charts.

    End-of-Day ETF arb strategy
    No updates are planned for this strategy this week.

    Intraday ETF arb strategy
    • I will be adding an additional 2 pairs to this strategy running in the paper trade account.
     
    #25     Aug 27, 2012
  6. robbob

    robbob

    I’m running a little behind on publishing the results of last week’s trading. AUD/NZD had another rough week this week with a loss of nearly 95 ticks. USD/SGD and HKD/JPY both had small losses for the week and will be dropped from trading beginning this week. EUR/DKK had another great week with a gain of 36.7 ticks.

    This week’s number are below. All results include commission.

    Week of 8/26/12

    AUD/NZD
    Trades: 14
    Winning Trades: 71.4%
    Total P/L: -94.3 ticks

    USD/SGD
    Trades: 12
    Winning Trades: 83.3%
    Total P/L: -12.3 ticks

    HKD/JPY
    Trades: 14
    Winning Trades: 71.4%
    Total P/L: -0.1 ticks

    EUR/DKK
    Trades: 24
    Winning Trades: 91.7%
    Total P/L: +36.7 ticks



    Total since inception (3/11/12)
    AUD/NZD
    Trades: 401
    Winning Trades: 78.5%
    Total P/L: +233.8 ticks

    Total since inception (7/22/12)
    USD/SGD
    Trades: 97
    Winning Trades: 79.4%
    Total P/L: -69.8 ticks

    HKD/JPY
    Trades: 76
    Winning Trades: 75.0%
    Total P/L: -7.6 ticks

    EUR/DKK
    Trades: 95
    Winning Trades: 88.4%
    Total P/L: +95.9 ticks

    Update on Progress of the Arb Trader Application

    Currency Strategy

    This week I will be moving to live trading the following features/bugfixes.
    • USD/SGD and HKY/JPY will be dropped from trading
    • I will begin work with revamping the user interface for this strategy which will include adding some JavaFX components including real-time charts.
    • Look at implementing an equity curve filter so that when the system encounters a large string of losses the system will be switched off until the equity curve reestablishes an upward climb.

    End-of-Day ETF arb strategy
    No updates are planned for this strategy this week.

    Intraday ETF arb strategy
    • Continue monitoring 4 pairs in the paper trade account.
     
    #26     Sep 7, 2012
  7. robbob

    robbob

    My software for the AUD/NZD strategy has been trading along without any issues and an event with Interactive Brokers left me with a large position without a stop loss order as a fallback.

    My strategy will enter the market with a limit order, which at the time the order is submitted the software attaches a profit target limit order, a stop loss order and a good-after-time market order to exit the position if the profit target or stop loss order hasn’t been hit in a specified amount of time.

    Last night I received a partial fill on the initial entry order and then the price moved up and the profit target was hit. IB adjusted the bracket orders to reflect this partial fill as expected. However when the price moved down again and the remaining amount was filled on the initial limit entry order, IB canceled my stop loss and my good-after-time market order, leaving only the profit target order intact and also leaving the position completely exposed if the price continued to decline.



    I received the following email from IB below:
    [​IMG]




    I’ve submitted an order ticket to IB asking them if there was a problem with the parent/child orders, why on earth would they only cancel some of the child orders and not all parent/child orders that were part of the OCA group.
     
    #27     Sep 13, 2012
  8. One more reason to build your own algos :)
     
    #28     Sep 13, 2012
  9. robbob

    robbob

    Its a double edge sword I guess. If running your own algo, you introduce the risk that any downtime on the machine your algo runs on means that the exit orders may not be placed in the event one of your price targets are hit.
     
    #29     Sep 13, 2012
  10. This is worse than the screw up above?
     
    #30     Sep 13, 2012