Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

I'd like to start automating my trading strategies. I'm not looking for a fast and easy solution, therefore the programming language is not important for me, I am ready to spend an extra year to master the required technologies if needed. I'm very good with R, VBA and SQL, used Python a bit, but don't know any C++/C#/Java.

I'm looking for a recommendation on what framework and related programming language to learn. I can't afford any expensive solutions, a free open-source framework would be ideal. I trade futures and stocks with IB and my trading strategies mostly use a combination of simple technical rules. However, sometimes I really need to get some extra data to generate an entry or exit signal, e.g. check if today's date is present in some list of dates in the database, or generate a custom breadth indicator (like at the moment some condition is true for at least X% of stocks from certain list of stocks). I can fairly easily backtest such strategies in R with my own backtester, but I have no idea if ready frameworks for automated trading allow that. Having read some articles and forum posts I realized that I probably need CEP to program such rules. If so, then as far as I know I'm limited to AlgoTrader among free solutions. However, I've read opinions that AlgoTrader is extremely complicated to understand even with a solid background in Java, which I lack at the moment, and that it lacks proper documentation. Is there anyone, who uses AlgoTrader, in here? Are there any alternatives that allow to program algos similar to what I described above?

In theory I can send trading signals from R, but I'd like to get more reliability, speed (I don't need HFT, but recalculating custom breadth indicators for several systems takes time) and some ready framework that can be used to both backtest and trade using the same code to generate signals. In addition, there are probably other good reasons that I'm not aware of why hardly anyone uses R for automated trading.

Any recommendations?

share|improve this question
    
are you looking just to automate the backtesting and trading signal generation, after which you will manually enter orders or the actual order generation direct to the market? –  chollida May 9 at 18:34
    
I already backtest and generate signals in R, and trade them manually. I'd like to actually place orders. –  user1603038 May 9 at 19:48
1  
The open source version of AlgoTrader is fairly limited but it looks like it has everything you need. Regarding documentation, there is one available here: (code.google.com/p/algo-trader/wiki/AlgoTraderDocumentation). The advantage is that you can use the same code for back testing and life trading –  Andy Flury May 9 at 20:31
2  
quantopian.com supports automated trading of python algos to IB. –  experquisite May 9 at 20:53
    
Andy, thank you for your comment. I had a quick look through the documentation, I got used to seeing something longer than 16 A4 pages, this is what worries me. However, it might be enough. I can't assess it before I actually try to use it. Do you know any other free open-source projects with similar functionality? –  user1603038 May 9 at 22:30

3 Answers 3

To be honest you're not likely to get a very satisfying answer to your question. Not because its a bad question, but because "regular people" can't just go hooking their home grown trading systems up to a live market.

I'd like to start automating my trading strategies.

First off you'll need a system that can interface with your broker. If you're not a fund then you won't be able to certify your own fix engine for trading, which means you're path of least resistance is probably to interface with something like IB.

In that case your best bet is to read up on the Interactive Brokers api https://www.interactivebrokers.com/en/?f=%2Fen%2Fsoftware%2Fibapi.php%3Fib_entity%3Dllc

share|improve this answer
    
Thank you for your reply, chollida. Does this mean that you recommend to work with IB API directly from Java or C++ without using any frameworks that usually allow to easily switch brokers (not necessarily using FIX) and are meant to make algo-trading easier? The definite advantage here is nice documentation of IB API. However, I'm not sure if doing everything from scratch using nice docs is easier than using a framework with not so nice docs. Can you comment on how much code is pre-written in frameworks like AlgoTrader in comparison to using pure IB API? –  user1603038 May 9 at 22:51

There's some pretty basic frameworks for IB. One that's pretty simple to modify is http://sourceforge.net/projects/jsystemtrader/ . I haven't looked in a while but it uses only market orders. The development has gone on to a version that uses market depth.

There's also things like Ninja Trader but paid per month.

It's what I do and I just use java with IB. I have a feeling you're going to write so much code that the framework isn't going to be much work in the end.

Since you said R and Python I'll just add

http://cran.r-project.org/web/packages/IBrokers/index.html

and

https://code.google.com/p/ibpy/

I haven't used either and don't know how well they work. I'm pretty sure the R package can download historical data. One thing to remember with un-updated frameworks is the API can change a bit and no longer work without some tweaks.

share|improve this answer

There is also http://ibconnector.com/, which is free, afaik, and an alternative to IBrokers. I've worked with it before and for basic orders, it was very fast and reliable.

share|improve this answer
    
Those guys don't look serious (check the founder and his description of the project: ca.linkedin.com/pub/alon-honig/35/407/369). They say that they do some reports, transaction cost analysis etc., but I didn't find anything like that. All I found was a couple of functions that do the same thing that IBrokers package does. Looks like some failed amateur start-up. –  user1603038 May 27 at 13:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.