Does anyone use R language the link to IB?

Discussion in 'Automated Trading' started by GloriaBrown, Feb 20, 2014.

  1. IB doesn't officially provide API for R, but R is so convenient, so does anyone use R with IB?
     
  2. I've been looking at using R for some analysis, so I'd like to figure this out as well.
     
  3. yeah let's figure this out
     
  4. spacewiz

    spacewiz

    I tried some time ago (over a year) but the 3rd party libs didn't work well. These days I just get historical data using IB API, store it in csv file, and import into R from the file.
     
  5. I use IBrokers to get IB historical data from time to time. I think the manual for it, though not IB supported, is pretty self-explanatory.
     
  6. Yeah then if we use IB to auto live trade too, then we need to build a total different program in another language, which is so inconvenient. I don't think there is any good stable API to link IB to R yet, so except someone just uses R for backtest then manual trade with IB, don't sound like this solution is too good.
     
  7. spacewiz

    spacewiz

  8. You can't properly multithread with R and also IIRC with IBrokers you can't subscribe to multiple symbols at once.

    The only instance where I think R would be suitable for automated trading is if you're doing file drops to your broker or into an EMS (e.g. EMSX).
     
  9. spacewiz

    spacewiz

    Yes, you can't really build a full-scale back-testing or trading application with R.

    However, there is a right tool for each task. You can prototype a trading strategy, run models, play with data, and test your ideas in R much more efficiently (if you are familiar with it, or willing to learn), than in java, or any other imperative programming language.

    There are many things you can do in R in 1 hour that you'd spend days programming in Java, regardless of how experienced you are. It's just a higher-level language, and example of of DSL (domain-specific language).

    So, both R and Java are very useful, to be efficient you can't only have one tool in your toolbox.
     
    #10     Feb 24, 2014