Connecting R Trading Models to Interactive Brokers
Summary
The document asks how to connect models written in R to an Interactive Brokers account for live trading. It considers whether the trader must write a C or C++ interface, whether an R-only route is available, and whether the IBrokers package remains usable. The replies identify IBrokers as an option built on the broker’s C++ API and also name the rib package as another implementation of the IB API.
The discussion additionally points to R packages for market data, portfolio performance analysis, and high-frequency research. These are suggestions rather than a setup guide: there are no code examples, installation steps, descriptions of order handling, or comparisons of package maintenance and reliability. The recommendations should therefore be treated as a starting list from the time of the original discussion, not as current guidance on package compatibility or production readiness. Traders would need to check present API support and test the connection and execution behavior before relying on it.
Key ideas
- R trading systems can connect to Interactive Brokers through packages that implement or wrap the broker's API.
- The replies name IBrokers and rib as possible API interfaces from R.
- The discussion also mentions R packages for market data, performance analysis, and high-frequency research.
- The post offers package pointers but no implementation steps or current assessment of maintenance and reliability.
Tags
Full text
# IB with R which package? # IB with R which package? I want to implement my models in R and trade according to them with my IB account. Now I am wondering, how I should solve this problem? Do I need to program with C an access (https://www.interactivebrokers.com/en/?f=%2Fen%2Fsoftware%2Fibapi.php) or is there a solution, where I only need R and IB? How do profeesional people solve this issue? And what about the IBrokers package in R, is it still valid? It seems to me a bit outdated, is there a better package? Thanks for sharing your wisdom in advance! ## Answer by Sagaponack FX (score 2) https://quant.stackexchange.com/a/17092 You'll want the ibrokers package, its very good and built on the c++ api. Also check out quantmod, performanceanalytics, and highfrequency package. And a comprehensive list, http://cran.r-project.org/web/views/Finance.html ## Answer by Enrico Schumann (score 0) https://quant.stackexchange.com/a/53306 The rib package also implements the IB API.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.