Quantitative Trading Analysis With R

Learn quantitative trading analysis from basic to expert level through a practical course with R statistical software.

Last updated 2022-01-10 | 4

- Read or download S&P 500® Index ETF prices data and perform quantitative trading analysis operations by installing related packages and running script code on RStudio IDE.
- Implement trading strategies based on their category and frequency by defining indicators
- identifying signals they generate and outlining rules that accompany them.
- Explore strategy categories through trend-following indicators such as simple moving averages
- moving averages convergence-divergence and mean-reversion indicators such as Bollinger bands®
- relative strength index
- statistical arbitrage through z-score.

What you'll learn

Read or download S&P 500® Index ETF prices data and perform quantitative trading analysis operations by installing related packages and running script code on RStudio IDE.
Implement trading strategies based on their category and frequency by defining indicators
identifying signals they generate and outlining rules that accompany them.
Explore strategy categories through trend-following indicators such as simple moving averages
moving averages convergence-divergence and mean-reversion indicators such as Bollinger bands®
relative strength index
statistical arbitrage through z-score.
Evaluate simulated strategy historical risk adjusted performance through trading statistics
performance metrics and risk management metrics.
Calculate main trading statistics such as net trading profit and loss
gross profit
gross loss
profit ratio
maximum drawdown
profit to maximum drawdown and equity curve.
Measure principal strategy performance metrics such as annualized returns
annualized standard deviation and annualized Sharpe ratio.
Estimate key risk management metrics such as maximum adverse excursion and maximum favorable excursion.
Maximize historical risk adjusted performance by optimizing strategy parameters through an exhaustive grid search of all indicators parameters combinations.
Minimize optimization over-fitting or data snooping through walk forward analysis implemented as time-series or step-forward cross-validation by sequentially resampling asset prices data into rolling fixed length training subsets for in-sample strategy parameters optimizations and testing subsets for out-of-sample optimized strategy parameters validations.

* Requirements

* R statistical software is required. Downloading instructions included.
* RStudio Integrated Development Environment (IDE) is recommended. Downloading instructions included.
* Practical example data and R script code files provided with the course.
* Prior basic R statistical software knowledge is useful but not required.

Description

Full Course Content Last Update 08/2018

Learn quantitative trading analysis through a practical course with R statistical software using S&P 500® Index ETF prices for back-testing. It explores main concepts from basic to expert level which can help you achieve better grades, develop your academic career, apply your knowledge at work or do your research as experienced investor. All of this while exploring the wisdom of Nobel Prize winners and best practitioners in the field.

Become a Quantitative Trading Analysis Expert in this Practical Course with R

  • Read or download S&P 500® Index ETF prices data and perform quantitative trading analysis operations by installing related packages and running script code on RStudio IDE.

  • Implement trading strategies based on their category and frequency by defining indicators, identifying signals they generate and outlining rules that accompany them.

  • Explore strategy categories through trend-following indicators such as simple moving averages, moving averages convergence-divergence and mean-reversion indicators such as Bollinger bands®, relative strength index, statistical arbitrage through z-score.

  • Evaluate simulated strategy historical risk adjusted performance through trading statistics, performance metrics and risk management metrics.

  • Calculate main trading statistics such as net trading profit and loss, gross profit, gross loss, profit ratio, maximum drawdown, profit to maximum drawdown and equity curve.

  • Measure principal strategy performance metrics such as annualized returns, annualized standard deviation and annualized Sharpe ratio.

  • Estimate key risk management metrics such as maximum adverse excursion and maximum favorable excursion.

  • Maximize historical risk adjusted performance by optimizing strategy parameters through an exhaustive grid search of all indicators parameters combinations.

  • Minimize optimization over-fitting or data snooping through walk forward analysis implemented as time-series or step-forward cross-validation by sequentially resampling asset prices data into rolling fixed length training subsets for in-sample strategy parameters optimizations and testing subsets for out-of-sample optimized strategy parameters validations.

Become a Quantitative Trading Analysis Expert and Put Your Knowledge in Practice

Learning quantitative trading analysis is indispensable for finance careers in areas such as quantitative research, quantitative development, and quantitative trading mainly within investment banks and hedge funds. It is also essential for academic careers in quantitative finance. And it is necessary for experienced investors quantitative trading research and development.

But as learning curve can become steep as complexity grows, this course helps by leading you step by step using S&P 500® Index ETF prices historical data back-testing to achieve greater effectiveness.

Content and Overview

This practical course contains 59 lectures and 7 hours of content. It’s designed for all quantitative trading analysis knowledge levels and a basic understanding of R statistical software is useful but not required.

At first, you’ll learn how to read or download S&P 500® Index ETF prices historical data to perform quantitative trading analysis operations by installing related packages and running script code on RStudio IDE.

Then, you’ll implement trading strategy by defining indicators based on its category and frequency, identifying trading signals these generate, outlining trading rules that accompany them and applying all of the above. Next, you’ll explore main strategy categories such as trend-following and mean-reversion. For trend-following strategy category, you’ll use indicators such as simple moving averages and moving averages convergence-divergence. For mean-reversion strategy category, you’ll use indicators such as Bollinger bands®, relative strength index and statistical arbitrage through z-score.

After that, you’ll do strategy reporting by evaluating simulated strategy risk adjusted performance using historical data. Next, you’ll explore main strategy reporting areas such as trading statistics, performance metrics and risk management metrics. For trading statistics, you’ll use net trading profit and loss, gross profit, gross loss, profit factor, maximum drawdown, profit to maximum drawdown and equity curve. For performance metrics, you’ll use annualized return, annualized standard deviation and annualized Sharpe ratio. For risk management metrics, you’ll use maximum adverse excursion and maximum favorable excursion charts.

Later, you’ll optimize strategy parameters by maximizing historical risk adjusted performance through an exhaustive grid search of all indicators parameters combinations. Next, you’ll explore main strategy parameters optimization objectives such as net trading profit and loss, maximum drawdown and profit to maximum drawdown metrics.

Then, you’ll do strategy walk forward analysis to reduce historical parameters optimization over-fitting or data snooping through time-series or step-forward cross-validation. Next, you’ll implement asset prices time series data sequential resampling into fixed length training and testing without replacement subsets. For training data subsets, you’ll do sequential in-sample strategy parameters optimization.  For testing data subsets, you’ll do sequential out-of-sample validation of previously optimized strategy parameters. Finally, you’ll repeat this process one step-forward up to the end of asset prices time series data.

Who this course is for:

  • Undergraduate or postgraduate who wants to learn about quantitative trading analysis using R statistical software.
  • Finance professional or academic researcher who wishes to deepen your knowledge in quantitative finance.
  • Experienced investor who desires to research quantitative trading strategies.
  • This course is NOT about “get rich quick” trading systems or magic formulas.

Course content

5 sections • 58 lectures

Course Description Preview 05:08

In this lecture you will view course disclaimer and learn which are its objectives, how you will benefit from it, its previous requirements and my profile as instructor.

Course Overview Preview 03:16

In this lecture you will learn that it is recommended to view course in an ascendant manner as each section builds on last one and also does its complexity. You will also study course structure and main sections (course overview, strategy implementation, strategy reporting, strategy parameters optimization, walk forward analysis and bibliography).

Quantitative Trading Analysis Preview 07:55

In this lecture you will learn quantitative trading analysis definition, R statistical software and RStudio Integrated Development Environment (IDE) downloading websites.

Quantitative Trading Analysis Data Preview 18:27

In this lecture you will learn quantitative trading analysis .TXT data file in .CSV format downloading, .TXT R script code file downloading, quantitative trading analysis packages installation (FinancialInstrument, PerformanceAnalytics, pracma, quantmod, tseries, TTR, roll, xts, blotter and quantstrat) and RStudio Integrated Development Environment (IDE) project creation.

Course Data File Preview 00:03

Before starting course please download .TXT data file in .CSV format as additional resources.

Course Script Code Files Preview 00:03

Before starting course please download .TXT R script code files as additional resources.

Course Overview Slides Preview 00:02

You can download .PDF section slides file as additional resources.

Course Bibliography Preview 00:03

You can download .PDF course bibliography slides file as additional resources.

Strategy Implementation Slides Preview 00:02

You can download .PDF section slides file as additional resources.

Strategy Implementation Overview Preview 09:07

In this lecture you will learn section lectures’ details and main themes to be covered related to strategy implementation (strategy indicators, strategy signals, strategy rules and strategy application).

Strategy Indicators Preview 02:06

In this lecture you will learn strategy indicators definition.

Trend-Following Strategy 1 Indicators Preview 07:38

In this lecture you will learn trend-following strategy 1 indicators definition and main calculations (lineChart(), chartTheme(), addSMA(), rm.strat(), strategy(), summary(), getStrategy(), initPortf(), initAcct(), initOrders(), add.indicator(), quote(), Cl() functions).

Trend-Following Strategy 2 Indicators Preview 09:22

In this lecture you will learn trend-following strategy 2 indicators definition and main calculations (barChart(), chartTheme(), addMACD(), rm.strat(), strategy(), summary(), getStrategy(), initPortf(), initAcct(), initOrders(), add.indicator(), quote(), Cl() functions).

Mean-Reversion Strategy 1 Indicators Preview 07:54

In this lecture you will learn mean-reversion strategy 1 indicators definition and main calculations (lineChart(), chartTheme(), addBBands(), rm.strat(), strategy(), summary(), getStrategy(), initPortf(), initAcct(), initOrders(), add.indicator(), quote(), HLC() functions).

Mean-Reversion Strategy 2 Indicators Preview 08:14

In this lecture you will learn mean-reversion strategy 2 indicators definition and main calculations (barChart(), chartTheme(), addRSI(), rm.strat(), strategy(), summary(), getStrategy(), initPortf(), initAcct(), initOrders(), add.indicator(), quote(), getPrice() functions).

Mean-Reversion Strategy 3 Indicators Preview 17:33

In this lecture you will learn mean-reversion strategy 3 indicators definition and main calculations (adf.test(), kpss.test(), hurstexp(), diff(), Cl(), complete.cases(), roll_scale(), plot(), index(), abline(), rm.strat(), strategy(), summary(), getStrategy(), initPortf(), initAcct(), initOrders(), add.indicator(), quote() functions).

Strategy Signals Preview 00:48

In this lecture you will learn strategy signals definition.

Trend-Following Strategy 1 Signals Preview 05:50

In this lecture you will learn trend-following strategy 1 signals definition and main calculations (add.signal(), list() functions).

Trend-Following Strategy 2 Signals Preview 05:45

In this lecture you will learn trend-following strategy 2 signals definition and main calculations (add.signal(), list() functions).

Mean-Reversion Strategy 1 Signals Preview 05:37

In this lecture you will learn mean-reversion strategy 1 signals definition and main calculations (add.signal(), list() functions).

Mean-Reversion Strategy 2 Signals Preview 05:28

In this lecture you will learn mean-reversion strategy 2 signals definition and main calculations (add.signal(), list() functions).

Mean-Reversion Strategy 3 Signals Preview 06:18

In this lecture you will learn mean-reversion strategy 3 signals definition and main calculations (add.signal(), list() functions).

Strategy Rules Preview 12:43

In this lecture you will learn strategy rules definition and main calculations (addPosLimit(), add.rule(), list(), summary(), getStrategy() functions).

Strategy Application Preview 10:41

In this lecture you will learn strategy application definition and main calculations (Sys.time(), applyStrategy(), updatePortf(), updateAcct(), updateEndEq() functions).

Strategy Reporting Slides Preview 00:02

You can download .PDF section slides file as additional resources.

Strategy Reporting Overview Preview 19:59

In this lecture you will learn section lectures’ details and main themes to be covered related to strategy reporting (trading statistics, performance metrics and risk management). 

Trading Statistics Preview 05:03

In this lecture you will learn trading statistics definition.

Trend-Following Strategy 1 Trading Statistics Preview 10:26

In this lecture you will learn trend-following strategy 1 trading statistics definition and main calculations (dailyStats(), tradeStats(), perTradeStats(), View(), cbind(), t(), chart_theme(), chart.Posn(), getAccount(), plot(), cbind() functions).

Trend-Following Strategy 2 Trading Statistics Preview 09:35

In this lecture you will learn trend-following strategy 2 trading statistics definition and main calculations (dailyStats(), tradeStats(), perTradeStats(), View(), cbind(), t(), chart_theme(), chart.Posn(), getAccount(), plot(), cbind() functions).

Mean-Reversion Strategy 1 Trading Statistics Preview 09:42

In this lecture you will learn mean-reversion strategy 1 trading statistics definition and main calculations (dailyStats(), tradeStats(), perTradeStats(), View(), cbind(), t(), chart_theme(), chart.Posn(), getAccount(), plot(), cbind() functions).

Mean-Reversion Strategy 2 Trading Statistics Preview 09:30

In this lecture you will learn mean-reversion strategy 2 trading statistics definition and main calculations (dailyStats(), tradeStats(), perTradeStats(), View(), cbind(), t(), chart_theme(), chart.Posn(), getAccount(), plot(), cbind() functions).

Mean-Reversion Strategy 3 Trading Statistics Preview 09:39

In this lecture you will learn mean-reversion strategy 3 trading statistics definition and main calculations (dailyStats(), tradeStats(), perTradeStats(), View(), cbind(), t(), chart_theme(), chart.Posn(), getAccount(), plot(), cbind() functions).

Performance Metrics Preview 02:56

In this lecture you will learn performance metrics definition.

Trend-Following Strategy 1 Performance Metrics Preview 04:54

In this lecture you will learn trend-following strategy 1 performance metrics definition and main calculations (PortfReturns(), colnames(), cbind(), charts.PerformanceSummary(), table.AnnualizedReturns() functions).

Trend-Following Strategy 2 Performance Metrics Preview 04:54

In this lecture you will learn trend-following strategy 2 performance metrics definition and main calculations (PortfReturns(), colnames(), cbind(), charts.PerformanceSummary(), table.AnnualizedReturns() functions).

Mean-Reversion Strategy 1 Performance Metrics Preview 04:50

In this lecture you will learn mean-reversion strategy 1 performance metrics definition and main calculations (PortfReturns(), colnames(), cbind(), charts.PerformanceSummary(), table.AnnualizedReturns() functions).

Mean-Reversion Strategy 2 Performance Metrics Preview 04:56

In this lecture you will learn mean-reversion strategy 2 performance metrics definition and main calculations (PortfReturns(), colnames(), cbind(), charts.PerformanceSummary(), table.AnnualizedReturns() functions).

Mean-Reversion Strategy 3 Performance Metrics Preview 05:00

In this lecture you will learn mean-reversion strategy 3 performance metrics definition and main calculations (PortfReturns(), colnames(), cbind(), charts.PerformanceSummary(), table.AnnualizedReturns() functions).

Risk Management Metrics Preview 02:25

In this lecture you will learn risk management metrics definition.

Trend-Following Strategy 1 Risk Management Preview 10:34

In this lecture you will learn trend-following strategy 1 risk management definition and main calculations (chart.ME(), rm.strat(), add.rule(), list(), quote() functions).

Trend-Following Strategy 2 Risk Management Preview 09:23

In this lecture you will learn trend-following strategy 2 risk management definition and main calculations (chart.ME(), rm.strat(), add.rule(), list(), quote() functions).

Mean-Reversion Strategy 1 Risk Management Preview 09:35

In this lecture you will learn mean-reversion strategy 1 risk management definition and main calculations (chart.ME(), rm.strat(), add.rule(), list(), quote() functions).

Mean-Reversion Strategy 2 Risk Management Preview 10:16

In this lecture you will learn mean-reversion strategy 2 risk management definition and main calculations (chart.ME(), rm.strat(), add.rule(), list(), quote() functions).

Mean-Reversion Strategy 3 Risk Management Preview 10:08

In this lecture you will learn mean-reversion strategy 3 risk management definition and main calculations (chart.ME(), rm.strat(), add.rule(), list(), quote() functions).

Strategy Parameters Optimization Slides Preview 00:02

You can download .PDF section slides file as additional resources.

Strategy Parameters Optimization Overview Preview 10:16

In this lecture you will learn section lectures’ details and main themes to be covered related to strategy parameters optimization.

Trend-Following Strategy 1 Parameters Optimization Preview 10:26

In this lecture you will learn trend-following strategy 1 parameters optimization definition and main calculations (add.distribution(), apply.paramset(), barplot(), plot() functions).

Trend-Following Strategy 2 Parameters Optimization Preview 09:34

In this lecture you will learn trend-following strategy 2 parameters optimization definition and main calculations (add.distribution(), apply.paramset(), barplot(), plot() functions).

Mean-Reversion Strategy 1 Parameters Optimization Preview 10:18

In this lecture you will learn mean-reversion strategy 1 parameters optimization definition and main calculations (add.distribution(), apply.paramset(), barplot(), plot() functions).

Mean-Reversion Strategy 2 Parameters Optimization Preview 11:35

In this lecture you will learn mean-reversion strategy 2 parameters optimization definition and main calculations (add.distribution(), apply.paramset(), barplot(), plot() functions).

Mean-Reversion Strategy 3 Parameters Optimization Preview 11:38

In this lecture you will learn mean-reversion strategy 3 parameters optimization definition and main calculations (add.distribution(), apply.paramset(), barplot(), plot() functions).

Strategy Walk Forward Analysis Slides Preview 00:02

You can download .PDF section slides file as additional resources.

Strategy Walk Forward Analysis Overview Preview 13:50

In this lecture you will learn section lectures’ details and main themes to be covered related to strategy walk forward analysis.

Trend-Following Strategy 1 Walk Forward Analysis Preview 13:16

In this lecture you will learn trend-following strategy 1 walk forward analysis definition and main calculations (walk.forward(), chart.forward() functions).

Trend-Following Strategy 2 Walk Forward Analysis Preview 12:08

In this lecture you will learn trend-following strategy 2 walk forward analysis definition and main calculations (walk.forward(), chart.forward() functions).

Mean-Reversion Strategy 1 Walk Forward Analysis Preview 12:19

In this lecture you will learn mean-reversion strategy 1 walk forward analysis definition and main calculations (walk.forward(), chart.forward() functions).

Mean-Reversion Strategy 2 Walk Forward Analysis Preview 12:11

In this lecture you will learn mean-reversion strategy 2 walk forward analysis definition and main calculations (walk.forward(), chart.forward() functions).

Mean-Reversion Strategy 3 Walk Forward Analysis Preview 13:27

In this lecture you will learn mean-reversion strategy 3 walk forward analysis definition and main calculations (walk.forward(), chart.forward() functions).