Quantitative Trading Analysis With Python

Learn quantitative trading analysis from basic to expert level through practical course with Python programming language

Last updated 2022-01-10 | 3.4

- Read or download S&P 500® Index ETF prices data and perform quantitative trading analysis operations by installing related packages and running code on Python PyCharm 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 code on Python PyCharm 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 and performance metrics.
Calculate main trading statistics such as net trading profit and loss
maximum drawdown and equity curve.
Measure principal strategy performance metrics such as annualized returns
annualized standard deviation and annualized Sharpe ratio.
Maximize historical performance by optimizing strategy parameters through an exhaustive grid search of all indicators parameters combinations.
Reduce optimization over-fitting or data snooping through asset prices data delimiting into training subset for in-sample strategy parameters optimization and testing subset for out-of-sample optimized strategy parameters validation.

* Requirements

* Python programming language is required. Downloading instructions included.
* Python Distribution (PD) and Integrated Development Environment (IDE) are recommended. Downloading instructions included.
* Practical example data and Python code files provided with the course.
* Prior basic Python programming language knowledge is useful but not required.

Description

Full Course Content Last Update 09/2018

Learn quantitative trading analysis through a practical course with Python programming language 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 Python

  • Read or download S&P 500® Index ETF prices data and perform quantitative trading analysis operations by installing related packages and running code on Python PyCharm 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 and performance metrics.

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

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

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

  • Reduce optimization over-fitting or data snooping through asset prices data delimiting into training subset for in-sample strategy parameters optimization and testing subset for out-of-sample optimized strategy parameters validation.

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 50 lectures and 7 hours of content. It’s designed for all quantitative trading analysis knowledge levels and a basic understanding of Python programming language 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 code on Python PyCharm IDE.

Then, you’ll implement trading strategy by defining indicators based on its category and frequency, identifying trading signals these generate and outlining trading rules that accompany them. 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 and performance metrics. For trading statistics, you’ll use net trading profit and loss, maximum drawdown and equity curve. For performance metrics, you’ll use annualized return, annualized standard deviation and annualized Sharpe ratio.

Later, you’ll optimize strategy parameters by maximizing historical performance through an exhaustive grid search of all indicators parameters combinations. Next, you’ll explore main strategy parameters optimization objective such as final portfolio equity metric.

Finally, you’ll reduce optimization over-fitting or data snooping through asset prices data delimiting into training subset for in-sample strategy parameters optimization and testing subset for out-of-sample optimized strategy parameters validation.

Who this course is for:

  • Undergraduate or postgraduate who wants to learn about quantitative trading analysis using Python programming language.
  • 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

4 sections • 50 lectures

Course Description Preview 05:04

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 02:38

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 and strategy parameters optimization).

Quantitative Trading Analysis Preview 04:22

In this lecture you will learn quantitative trading analysis definition, Miniconda Distribution for Python 3.6 64-bit (PD) and Python PyCharm Integrated Development Environment (IDE) downloading websites.

Quantitative Trading Analysis Data Preview 16:47

In this lecture you will learn quantitative trading analysis .TXT data file in .CSV format downloading, .TXT Python code files downloading, quantitative trading analysis packages installation (numpy, pandas, pandas-datareader, scipy, statsmodels, matplotlib and pyalgotrade) and Python PyCharm 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 Code Files Preview 00:03

Before starting course please download .TXT Python 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 12:53

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

Strategy Indicators Preview 02:09

In this lecture you will learn strategy indicators definitions.

Trend Strategy 1 Indicators Preview 09:32

In this lecture you will learn trend strategy 1 indicators definition and main calculations (<strategy>() class, __init__(), super(), setUseAdjustedValues(), SMA(), <get indicator>(), <strategy run>, GenericBarFeed(), addBarsFromCSV(), StrategyPlotter(), getInstrumentSubplot(), addDataSeries(), time(), run(), plot() functions).

Trend Strategy 2 Indicators Preview 13:14

In this lecture you will learn trend strategy 2 indicators definition and main calculations (<strategy>() class, __init__(), super(), setUseAdjustedValues(), MACD(), <get indicator>(), <strategy run>, GenericBarFeed(), addBarsFromCSV(), StrategyPlotter(), getInstrumentSubplot(), addDataSeries(), time(), run(), plot() functions).

Mean Strategy 1 Indicators Preview 10:40

In this lecture you will learn mean strategy 1 indicators definition and main calculations (<strategy>() class, __init__(), super(), setUseAdjustedValues(), BollingerBands(), <get indicator>(), <strategy run>, GenericBarFeed(), addBarsFromCSV(), StrategyPlotter(), getInstrumentSubplot(), addDataSeries(), time(), run(), plot() functions).

Mean Strategy 2 Indicators Preview 12:03

In this lecture you will learn mean strategy 2 indicators definition and main calculations (<strategy>() class, __init__(), super(), setUseAdjustedValues(), RSI(), <get indicator>(), <strategy run>, GenericBarFeed(), addBarsFromCSV(), StrategyPlotter(), getInstrumentSubplot(), addDataSeries(), time(), run(), plot() functions).

Mean Strategy 3 Stationary Time Series Preview 15:48

In this lecture you will learn mean strategy 3 stationary time series definition and main calculations (read_csv(), plot(), title(), show(), acf(), bar(), len(), axhline(), pacf(), adfuller(), Series(), print(), round(), shift() functions).

Mean Strategy 3 Indicators Preview 10:34

In this lecture you will learn mean strategy 3 indicators definition and main calculations (<strategy>() class, __init__(), super(), setUseAdjustedValues(), RateOfChange(), getPriceDataSeries(), <get indicator>(), <strategy run>, GenericBarFeed(), addBarsFromCSV(), StrategyPlotter(), getInstrumentSubplot(), addDataSeries(), time(), run(), plot() functions).

Strategy Signals Preview 01:00

In this lecture you will learn strategy signals definitions.

Trend Strategy 1 Signals Preview 10:14

In this lecture you will learn trend strategy 1 signals definition and main calculations (if, elif conditionals, onBars(), getBroker(), getCash(), getPrice(), enterLong(), exitActive() functions).

Trend Strategy 2 Signals Preview 10:07

In this lecture you will learn trend strategy 2 signals definition and main calculations (if, elif conditionals, onBars(), getBroker(), getCash(), getPrice(), enterLong(), exitActive() functions).

Mean Strategy 1 Signals Preview 10:14

In this lecture you will learn mean strategy 1 signals definition and main calculations (if, elif conditionals, onBars(), getBroker(), getCash(), getPrice(), enterLong(), exitActive() functions).

Mean Strategy 2 Signals Preview 09:19

In this lecture you will learn mean strategy 2 signals definition and main calculations (if, elif conditionals, onBars(), getBroker(), getCash(), getPrice(), enterLong(), exitActive() functions).

Mean Strategy 3 Signals Preview 10:33

In this lecture you will learn mean strategy 3 signals definition and main calculations (if, elif conditionals, onBars(), getBroker(), getCash(), getPrice(), enterLong(), exitActive() functions).

Strategy Rules Preview 02:01

In this lecture you will learn strategy rules definitions.

Trend Strategy 1 Rules Preview 12:15

In this lecture you will learn trend strategy 1 rules definition and main calculations (ie, else conditionals, onEnterOk(), getEntryOrder(), getExecutionInfo(), getPrice(), exitStop(), onEnterCanceled(), onExitOk(), getExitOrder(), getType(), onExitCanceled(), exitMarket(), cancelExit() functions).

Trend Strategy 2 Rules Preview 12:26

In this lecture you will learn trend strategy 2 rules definition and main calculations (ie, else conditionals, onEnterOk(), getEntryOrder(), getExecutionInfo(), getPrice(), exitStop(), onEnterCanceled(), onExitOk(), getExitOrder(), getType(), onExitCanceled(), exitMarket(), cancelExit() functions).

Mean Strategy 1 Rules Preview 12:25

In this lecture you will learn mean strategy 1 rules definition and main calculations (ie, else conditionals, onEnterOk(), getEntryOrder(), getExecutionInfo(), getPrice(), exitStop(), onEnterCanceled(), onExitOk(), getExitOrder(), getType(), onExitCanceled(), exitMarket(), cancelExit() functions).

Mean Strategy 2 Rules Preview 11:29

In this lecture you will learn mean strategy 2 rules definition and main calculations (ie, else conditionals, onEnterOk(), getEntryOrder(), getExecutionInfo(), getPrice(), exitStop(), onEnterCanceled(), onExitOk(), getExitOrder(), getType(), onExitCanceled(), exitMarket(), cancelExit() functions).

Mean Strategy 3 Rules Preview 11:42

In this lecture you will learn mean strategy 3 rules definition and main calculations (ie, else conditionals, onEnterOk(), getEntryOrder(), getExecutionInfo(), getPrice(), exitStop(), onEnterCanceled(), onExitOk(), getExitOrder(), getType(), onExitCanceled(), exitMarket(), cancelExit() functions).

Strategy Reporting Slides Preview 00:02

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

Strategy Reporting Overview Preview 15:52

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

Trading Statistics Preview 03:18

In this lecture you will learn trading statistics definitions. 

Trend Strategy 1 Trading Statistics Preview 13:57

In this lecture you will learn trend strategy 1 trading statistics definition and main calculations (getBroker(), setCommission(), FixedPerTrade(), Returns(), attachAnalyzer(), SharpeRatio(), DrawDown(), Trades(), StrategyPlotter(), print(), getEquity(), getAll(), sum(), getMaxDrawDown(), getCount(), mean(), std(), max(), min(), getAllReturns(), getProfitableCount(), getProfits(), getPositiveReturns(), getUnprofitableCount(), getLosses(), getNegativeReturns(), round(), plot() functions).

Trend Strategy 2 Trading Statistics Preview 13:21

In this lecture you will learn trend strategy 2 trading statistics definition and main calculations (getBroker(), setCommission(), FixedPerTrade(), Returns(), attachAnalyzer(), SharpeRatio(), DrawDown(), Trades(), StrategyPlotter(), print(), getEquity(), getAll(), sum(), getMaxDrawDown(), getCount(), mean(), std(), max(), min(), getAllReturns(), getProfitableCount(), getProfits(), getPositiveReturns(), getUnprofitableCount(), getLosses(), getNegativeReturns(), round(), plot() functions).

Mean Strategy 1 Trading Statistics Preview 13:10

In this lecture you will learn mean strategy 1 trading statistics definition and main calculations (getBroker(), setCommission(), FixedPerTrade(), Returns(), attachAnalyzer(), SharpeRatio(), DrawDown(), Trades(), StrategyPlotter(), print(), getEquity(), getAll(), sum(), getMaxDrawDown(), getCount(), mean(), std(), max(), min(), getAllReturns(), getProfitableCount(), getProfits(), getPositiveReturns(), getUnprofitableCount(), getLosses(), getNegativeReturns(), round(), plot() functions).

Mean Strategy 2 Trading Statistics Preview 12:25

In this lecture you will learn mean strategy 2 trading statistics definition and main calculations (getBroker(), setCommission(), FixedPerTrade(), Returns(), attachAnalyzer(), SharpeRatio(), DrawDown(), Trades(), StrategyPlotter(), print(), getEquity(), getAll(), sum(), getMaxDrawDown(), getCount(), mean(), std(), max(), min(), getAllReturns(), getProfitableCount(), getProfits(), getPositiveReturns(), getUnprofitableCount(), getLosses(), getNegativeReturns(), round(), plot() functions).

Mean Strategy 3 Trading Statistics Preview 12:33

In this lecture you will learn mean strategy 3 trading statistics definition and main calculations (getBroker(), setCommission(), FixedPerTrade(), Returns(), attachAnalyzer(), SharpeRatio(), DrawDown(), Trades(), StrategyPlotter(), print(), getEquity(), getAll(), sum(), getMaxDrawDown(), getCount(), mean(), std(), max(), min(), getAllReturns(), getProfitableCount(), getProfits(), getPositiveReturns(), getUnprofitableCount(), getLosses(), getNegativeReturns(), round(), plot() functions).

Performance Metrics Preview 03:40

In this lecture you will learn performance metrics definitions. 

Trend Strategy 1 Performance Metrics Preview 09:59

In this lecture you will learn trend strategy 1 performance metrics definition and main calculations (StrategyPlotter(), getOrCreateSubplot(), addDataSeries(), getCumulativeReturns(), CumulativeReturn(), getPriceDataSeries(), getReturns(), mean(), stddev(), sqrt(), getSharpeRatio(), print(), plot() functions).

Trend Strategy 2 Performance Metrics Preview 09:12

In this lecture you will learn trend strategy 2 performance metrics definition and main calculations (StrategyPlotter(), getOrCreateSubplot(), addDataSeries(), getCumulativeReturns(), CumulativeReturn(), getPriceDataSeries(), getReturns(), mean(), stddev(), sqrt(), getSharpeRatio(), print(), plot() functions).

Mean Strategy 1 Performance Metrics Preview 10:16

In this lecture you will learn mean strategy 1 performance metrics definition and main calculations (StrategyPlotter(), getOrCreateSubplot(), addDataSeries(), getCumulativeReturns(), CumulativeReturn(), getPriceDataSeries(), getReturns(), mean(), stddev(), sqrt(), getSharpeRatio(), print(), plot() functions).

Mean Strategy 2 Performance Metrics Preview 09:38

In this lecture you will learn mean strategy 2 performance metrics definition and main calculations (StrategyPlotter(), getOrCreateSubplot(), addDataSeries(), getCumulativeReturns(), CumulativeReturn(), getPriceDataSeries(), getReturns(), mean(), stddev(), sqrt(), getSharpeRatio(), print(), plot() functions).

Mean Strategy 3 Performance Metrics Preview 10:36

In this lecture you will learn mean strategy 3 performance metrics definition and main calculations (StrategyPlotter(), getOrCreateSubplot(), addDataSeries(), getCumulativeReturns(), CumulativeReturn(), getPriceDataSeries(), getReturns(), mean(), stddev(), sqrt(), getSharpeRatio(), print(), plot() functions).

Strategy Parameters Optimization Slides Preview 00:02

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

Strategy Parameters Optimization Overview Preview 13:01

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

Trend Strategy 1 Parameters Optimization Preview 11:15

In this lecture you will learn trend strategy 1 parameters optimization definition and main calculations (parameters(), product(), <local>.run() functions).

Trend Strategy 2 Parameters Optimization Preview 11:52

In this lecture you will learn trend strategy 2 parameters optimization definition and main calculations (parameters(), product(), <local>.run() functions).

Mean Strategy 1 Parameters Optimization Preview 11:39

In this lecture you will learn mean strategy 1 parameters optimization definition and main calculations (parameters(), product(), <local>.run() functions).

Mean Strategy 2 Parameters Optimization Preview 11:20

In this lecture you will learn mean strategy 2 parameters optimization definition and main calculations (parameters(), product(), <local>.run() functions).

Mean Strategy 3 Parameters Optimization Preview 12:14

In this lecture you will learn mean strategy 3 parameters optimization definition and main calculations (parameters(), product(), <local>.run() functions).