Skip to main content
Free course

Model a Quantitative Trading Strategy in R

Start Free Course
10 Hours6 Videos74 Exercises4,788 Learners
5400 XP

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

R is widely used by analysts and traders around the world to develop quantitative trading strategies that can be executed manually or through program trading. This is an introductory course for beginners in R to get familiar with quantitative trading strategies and coding technical indicators in R. You will learn technical terms associated with trading strategies, work with data.tables in R, and manipulate the input data to create trading signals and profit-and-loss columns. You will also learn about optimizing parameters to be able to maximize profits. This course is for everyone interested in getting started with algorithmic trading. No prior knowledge is required!

  1. 1

    Introduction to R for trading


    This chapter equips you with basic programming skills in R before proceeding to strategy writing. This chapter covers reading a data.table, creating new columns in the table, calculating returns by different methods, loop functions, conditional functions, and plotting of datasets.

    Play Chapter Now
    Read file: read.csv()
    100 xp
    Get a glimpse of your data
    100 xp
    Types, Classes and Dimensions of Objects in R
    100 xp
    Extract data frame cell value
    50 xp
    Extract value of consecutive cells in a column
    50 xp
    Function c()
    100 xp
    Create a column using function c()
    100 xp
    Vector Operations
    50 xp
    Calculate returns: Get started
    100 xp
    Using the diff() function
    50 xp
    Calculate returns: Using c() and diff() together
    50 xp
    Calculate returns: For the second row
    100 xp
    Calculate returns: the general formula
    50 xp
    Calculate returns: vector division
    100 xp
    Calculate returns: for-loop
    100 xp
    Calculate log returns
    100 xp
    Plotting and interpreting charts
    50 xp
    Plot the Returns
    100 xp
    Conditional Statements
    50 xp
Quantinsti Faculty Headshot

Quantinsti Faculty

QuantInsti is one of Asia's pioneer Algorithm Trading Research and Training Institutes focused on preparing financial market professionals for the contemporary field of Algorithmic and High Frequency Trading. QuantInsti institute developed the curriculum for the Asia's first Executive Program in Algorithmic Trading (E-PAT) in 2009. As an initiative by financial markets professionals with stellar academic and professional credentials, the program aims to fulfill the pressing demands for highly specialized skill sets of a potentially lucrative domain. QuantInsti opened the doors to global participants in 2012 by introducing virtual classrooms for its flagship E-PAT course and have seen participation from all inhabited continents since then.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA