TrueTrade, Java/IB trading & backtesting

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
 
Quote from ginux:

how to i add the predefined strategy -

com.ats.strategy.CloseAboveStrategy ?
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).
 
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.
 
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
Quote from tyro_t:

After trying out all of the open source and several commercial automated trading systems for InteractiveBrokers, I decided to write my own. I wanted to have:

* multiple concurrent strategies
* day trading and swing trading support
* full access to all order types (market, limit, trailing, stop, etc.)
* bar and tick level decision making
* backtesting
* multiple simultaneous bar-level data (e.g.: onBar() messages at the daily, 15min, and 5min levels)

I really liked JSystemTrader, but I felt that it was too limited to use in any serious fashion. OpenQuant seemed the closest to my needs, but the restriction on allowing only one strategy was too much, so I set out to write my own ATS.

I just released it on Google Code and would am keen to get not just feedback, but contributions from other people.

http://code.google.com/p/truetrade/

There is a wiki with documentation, the downloads contains the runtime versions for Windows, but if you want to develop your own strategies (who doesn't?) you'll have to download eclipse and run it from the source (there are also instructions for this on the Google Code wiki).

It has some bugs, but I think I've worked out the major bugs on all of the functional paths, and I'm happily using it as-is to develop my own strategies. The IB-interface is new and relatively untested so I wouldn't advise using it against a real account.

Still, I think it's a great start for some early adopters who, like me, aren't satisfied with JSystemTrader and the other ATS's out there and would like to help build this into something good.
 
Quote from nitro:

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
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.
 
Back
Top