Congratulations for enrolling in this course on Trading using R! We are sure that the course videos and the study material will be of great help in your goal for trading using R on Interactive Brokers platform. The course study notes have been divided into a number of lessons and have been designed in an easyto-understand language. Let’s get rolling and start off with the first lesson on introduction to R and RStudio.
In this lesson, you would:
• Get introduced to R and RStudio
• Know the difference between R and RStudio
• Learn the benefits of using R for automated trading
What is R?
R is a programming language used for scientific computing and graphics. The roots of R language can be found in the S programming language which was developed at Bell laboratories in the 1970s, mainly by John Chambers. The R language was conceived in the early 1990s by Ross Ihaka and Robert Gentleman. R also refers to the software environment which is used to run the programs written in R. The R environment is free and open-source software. R as a programming language has gained wide popularity in recent years and it ranks among the top programming languages for data science. This popularity has resulted on account of various factors like ease-to-learn, excellent data manipulation and visualization tools, thousands of contributed packages on CRAN (Comprehensive R Archive Network), ability to create your own packages, and a large developer community.
What is RStudio?
RStudio is an integrated development environment (IDE) that helps you develop programs in R. An integrated development environment (IDE) is a software application that provides a facility to programmers for easy software development. An IDE normally consists of a source code editor, build automation tools and a debugger. There are other IDEs for R like Visual Studio and Eclipse, however, RStudio is considered to be the best available IDE for R programming.
Difference between R and RStudio
It is important that you understand the difference between R and RStudio. You can use R without using RStudio IDE, but you cannot use RStudio without using R. In the RStudio configuration, an R version is required to be set which is usually auto-set by RStudio when it is installed. RStudio makes it easy for writing programs in R but it is not a must to use R.
Benefits of using R for Automated Trading
R has found application in numerous fields like Finance, Marketing, Manufacturing, Retail, Bio Science etc. Given its excellent data manipulation and visualization tools, it has also been successfully used for automated trading in financial markets. Following are the benefits of using R:
- Free and Open-source software
- Excellent built-in functions
- Thousands of Contributed packages
- Ability to create your own packages
- Availability of packages like Quantstrat, QuantTools and PerformanceAnalytics for backtesting and analyzing trading strategies
- Quick prototyping of back-tested strategies, thus requiring minimal code changes
- Ability to figure out the difference between real life and back-tested data
Summary
In this introductory lesson, we talked about R, RStudio, and listed the benefits of using R for automated trading. In the next lesson, we will explain the installation guidelines for R and RStudio.
Additional Resources
List of Contributed Packages on CRAN, sorted by name
List of Contributed Packages on CRAN, sorted by data of publication
Note – The IBrokers package provides native R access to Interactive Brokers Trader Workstation API
Join The Conversation
If you have a general question, it may already be covered in our FAQs. If you have an account-specific question or concern, please reach out to Client Services.