TrueTrade, Java/IB trading & backtesting

Discussion in 'Automated Trading' started by tyro_t, May 3, 2007.

  1. #61     May 12, 2007
  2. ginux

    ginux

    #62     May 13, 2007
  3. ginux

    ginux

    how do you create a strategy?

    I tried adding a new strategy:
    - enter name of strategy
    - on systemclasspath
    - no parameters is shown
    - Then i get <undefined> as the name of the strategy
     
    #63     May 13, 2007
  4. #64     May 13, 2007
  5. ginux

    ginux

    #65     May 13, 2007
  6. tyro_t

    tyro_t

    On the strategy pane (the pane on the right side), right click > Add Strategy. In the Create Strategy wizard, type "com.ats.strategy.CloseAboveStrategy" for the class name and click finish.

    When you've done that, you can add instruments to the strategy and run it (backtest).
     
    #66     May 13, 2007
  7. TickJob

    TickJob

    Hi, can you add this strategy?
     
    #67     May 20, 2007
  8. tonyqiu

    tonyqiu

    Hi,

    your strategy sound great, however, your strategy d0es only work if you have unlimit chips. it is just like gamble, you alway double your bid if you lose. if you do not have ulimit chips in your account, i think you will run out of your chip before you make money.
     
    #68     May 20, 2007
  9. nitro

    nitro

    Interesting. Nice work. I haven't had a need for a backtesting system in years, but I do now. I was about to roll up my sleeves and start coding my own...

    I could almost use this out of the box, but if I read the documentation correctly, it does not deal with B/A data, and it does not work where the system uses multiple data streams [e.g., for a pairs trading style system] ?

    nitro
     
    #69     May 20, 2007
  10. tyro_t

    tyro_t

    No, it currently doesn't send any B/A events to the strategy, but it would be a very easy change. All of the data is available at runtime and so we'd just use the same mechanism to pass along trade data.

    Do you have any thoughts on how this should behave during backtesting runs? Do you have a data stream which includes changes in the B/A? It could be simulated much the way the tick data is simulated, but I doubt this would be of much value, and it would slow down backtesting even more (already CPU intensive because of the simulated trade data).



    Multiple data streams is something that is also not yet present, but which I would also like to add. I was thinking of TICK data for trading the ES/YM, but pairs trading is another great example.

    This would be easy to do using only onBar() events, but would take a bit more thought to simulate onTrade() methods so that the simulated trades are properly synchronized. Currently strategies are defined as having only one instrument, but I don't think it would take much to change.



    Left to my own devices, I probably won't get around to coding these features for 4-6 months at least. I have a few other things I want to investigate and I'm planning on taking some vacation in the summer, but if you want to help code, I'll be happy to work with you on any rework of the architecture and to integrate your changes into the code base.
     
    #70     May 20, 2007