Interactive Course

# Model a Quantitative Trading Strategy in R

• 10 hours
• 6 Videos
• 74 Exercises
• 2,984 Participants
• 5,400 XP

### Course Description

R is widely used by analysts and traders around the world to develop quantitative trading strategies which can be executed manually or through program trading. This is an introductory course for beginners in R to get familiarized with a trading strategy and experience coding a technical indicator in R. You will learn technical terms associated with a trading strategy, 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 the profits. This course is for everyone who have an interest in Algorithmic trading and want to get started! No prior knowledge is required!

1. 1

#### Introduction to R for trading

Get familiar with the new cool language of the financial analysts: R! This chapter is to equip you with the basic programming skills in R before we proceed to strategy writing. You will learn many techniques in an interactive fashion, requiring you to write your own one-two lines of codes in every exercise. 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 the dataset.

2. 3

#### Create a technical indicator

Apply the knowledge of previous chapters to write a more sophisticated trading strategy based on Point & Figures. Create a technical indicator in your strategy to improve your output. You will learn to improve your strategy's returns by changing the input parameters. Hence, you take your first step towards optimizing a trading strategy. After this chapter you would appreciate the complexities involved in creating quantitative trading strategies and would be equipped with knowledge and skills required to write your own trading strategies in R!

3. 2

#### Code a basic trading strategy

In this chapter, we will work with a sample dataset, which has price of a stock and its best buying and best selling price in the market at any time 't'. You will learn to write a simple strategy based on price movements of the stock. Learn to generate trading signals; how to decide upon the trading quantity and trading price to place orders. Finally, learn to analyse your strategy based on the accrued profit and loss. Use R as a statistical tool to write your first fully functional programming code which performs these tasks automatically and gives you the final output.

1. 1

#### Introduction to R for trading

Get familiar with the new cool language of the financial analysts: R! This chapter is to equip you with the basic programming skills in R before we proceed to strategy writing. You will learn many techniques in an interactive fashion, requiring you to write your own one-two lines of codes in every exercise. 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 the dataset.

2. 2

#### Code a basic trading strategy

In this chapter, we will work with a sample dataset, which has price of a stock and its best buying and best selling price in the market at any time 't'. You will learn to write a simple strategy based on price movements of the stock. Learn to generate trading signals; how to decide upon the trading quantity and trading price to place orders. Finally, learn to analyse your strategy based on the accrued profit and loss. Use R as a statistical tool to write your first fully functional programming code which performs these tasks automatically and gives you the final output.

3. 3

#### Create a technical indicator

Apply the knowledge of previous chapters to write a more sophisticated trading strategy based on Point & Figures. Create a technical indicator in your strategy to improve your output. You will learn to improve your strategy's returns by changing the input parameters. Hence, you take your first step towards optimizing a trading strategy. After this chapter you would appreciate the complexities involved in creating quantitative trading strategies and would be equipped with knowledge and skills required to write your own trading strategies in R!

### What do other learners have to say?

“I've used other sites, but DataCamp's been the one that I've stuck with.”

Devon Edwards Joseph

Lloyd's Banking Group

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

Louis Maiden