Algorithmic Trading With Python And Machine Learning

Build your own truly Data-driven Day Trading Bot | Learn how to create, test, implement & automate unique Strategies.

Last updated 2022-01-10 | 4.6

- Build automated Trading Bots with Python and Amazon Web Services (AWS)
- Create powerful and unique Trading Strategies based on Technical Indicators and Machine Learning / Deep Learning.
- Rigorous Testing of Strategies: Backtesting
- Forward Testing and live Testing with paper money.

What you'll learn

Build automated Trading Bots with Python and Amazon Web Services (AWS)
Create powerful and unique Trading Strategies based on Technical Indicators and Machine Learning / Deep Learning.
Rigorous Testing of Strategies: Backtesting
Forward Testing and live Testing with paper money.
Fully automate and schedule your Trades on a virtual Server in the AWS Cloud.
Truly Data-driven Trading and Investing.
Python Coding and Object Oriented Programming (OOP) in a way that everybody understands it.
Coding with Numpy
Pandas
Matplotlib
scikit-learn
Keras and Tensorflow.
Understand Day Trading A-Z: Spread
Pips
Margin
Leverage
Bid and Ask Price
Order Types
Charts & more.
Day Trading with Brokers OANDA & FXCM.
Stream high-frequency real-time Data.
Understand
analyze
control and limit Trading Costs.
Use powerful Broker APIs and connect with Python.

* Requirements

* No prior Python knowledge required. This course provides a Python Crash Course.
* No prior Finance/Trading knowledge required. This course explains the Basics.
* A desktop computer (Windows
* Mac
* or Linux) capable of storing and running Anaconda. The course will walk you through installing the necessary free software.
* An internet connection capable of streaming HD videos.
* Some high school level math skills would be great (not mandatory
* but it helps)
* In some countries (Japan
* Russian Federation
* South Korea
* Turkey) CFD/FOREX Trading is not permitted and residents cannot create an account on OANDA or FXCM (Online Brokers). Please keep in mind that approx. 20% of the Course (Trading and Implementation) won´t work for you! Thanks a lot for your understanding!

Description

  • Build automated Trading Bots with Python and Amazon Web Services (AWS)
  • Create powerful and unique Trading Strategies based on Technical Indicators and Machine Learning / Deep Learning.
  • Rigorous Testing of Strategies: Backtesting, Forward Testing and live Testing with paper money.
  • Fully automate and schedule your Trades on a virtual Server in the AWS Cloud.
  • Truly Data-driven Trading and Investing.
  • Python Coding and Object Oriented Programming (OOP) in a way that everybody understands it.
  • Coding with Numpy, Pandas, Matplotlib, scikit-learn, Keras and Tensorflow.
  • Understand Day Trading A-Z: Spread, Pips, Margin, Leverage, Bid and Ask Price, Order Types, Charts & more.
  • Day Trading with Brokers OANDA & FXCM.
  • Stream high-frequency real-time Data.
  • Understand, analyze, control and limit Trading Costs.
  • Use powerful Broker APIs and connect with Python.

Course content

32 sections • 390 lectures

What is Algorithmic Trading / Course Overview Preview 04:54

How to get the best out of this course Preview 05:27

Did you know...? (what Data can tell us about Day Trading) Preview 04:24

Student FAQ Preview 02:07

*** LEGAL DISCLAIMER (MUST READ!) *** Preview 01:31

Our very first Trade Preview 01:45

Long Term Investing vs. (Algorithmic) Day Trading Preview 04:26

Overview & the Brokers OANDA and FXCM Preview 04:42

OANDA at a first glance Preview 07:58

How to create an Account Preview 06:54

FOREX / Currency Exchange Rates explained Preview 08:33

Our second Trade - EUR/USD FOREX Trading Preview 04:24

How to calculate Profit & Loss of a Trade Preview 06:45

Trading Costs and Performance Attribution Preview 11:18

Margin and Leverage Preview 08:04

Margin Closeout and more Preview 07:20

Introduction to Charting Preview 04:50

Our third Trade A-Z - Going Short EUR/USD Preview 07:03

Netting vs. Hedging Preview 07:26

Market, Limit and Stop Orders Preview 05:42

Take-Profit and Stop-Loss Orders Preview 03:28

A more general Example Preview 04:25

Trading Challenge Preview 00:21

FXCM at a first glance Preview 06:55

How to create an Account Preview 06:35

Example Trade: Buying EUR/USD Preview 03:07

Trade Analysis Preview 03:44

Charting Preview 01:16

Closing Positions vs. Hedging Positions Preview 02:16

Order Types at a glance Preview 04:01

Trading Challenge Preview 00:19

Introduction Preview 01:32

Download and Install Anaconda Preview 08:08

How to open Jupyter Notebooks Preview 09:29

How to work with Jupyter Notebooks Preview 14:00

Tips for Python Beginners Preview 01:11

Overview Preview 01:07

OANDA: Commands to install required packages Preview 00:07

OANDA: How to install the OANDA API / Wrapper Preview 03:52

OANDA: Getting the API Key & other Preparations Preview 05:02

OANDA: Connecting to the API/Server Preview 07:34

OANDA: How to load Historical Price Data (Part 1) Preview 07:55

OANDA: How to load Historical Price Data (Part 2) Preview 04:11

OANDA: Streaming high-frequency real-time Data Preview 03:46

OANDA: How to place Orders and execute Trades Preview 10:18

Trading Challenge Preview 00:17

FXCM: Commands to install required packages Preview 00:24

FXCM: How to install the FXCM API Wrapper Preview 03:24

FXCM: Getting the Access Token & other Preparations Preview 03:05

FXCM: Connecting to the API/Server Preview 07:45

Troubleshooting: FXCM Server Connection Issues Preview 01:31

FXCM: How to load Historical Price Data (Part 1) Preview 06:30

FXCM: How to load Historical Price Data (Part 2) Preview 05:24

FXCM: Streaming high-frequency real-time Data Preview 06:38

FXCM: How to place Orders and execute Trades Preview 07:26

Trading Challenge Preview 00:17

Importing Time Series Data from csv-files Preview 08:16

Converting strings to datetime objects with pd.to_datetime() Preview 08:53

Indexing and Slicing Time Series Preview 07:25

Downsampling Time Series with resample() Preview 14:20

Coding Exercise 1 Preview 05:10

Getting Ready (Installing required library) Preview 02:20

Importing Stock Price Data from Yahoo Finance Preview 09:29

Initial Inspection and Visualization Preview 05:32

Normalizing Time Series to a Base Value (100) Preview 06:31

The shift() method Preview 06:51

The methods diff() and pct_change() Preview 06:41

Measuring Stock Performance with MEAN Returns and STD of Returns Preview 08:49

Financial Time Series - Return and Risk Preview 08:30

Financial Time Series - Covariance and Correlation Preview 04:32

Coding Exercise 2 Preview 00:04

Simple Returns vs. Log Returns Preview 09:18

Importing Financial Data from Excel Preview 11:25

Simple Moving Averages (SMA) with rolling() Preview 08:44

Momentum Trading Strategies with SMAs Preview 07:08

Exponentially-weighted Moving Averages (EWMA) Preview 04:32

Merging / Aligning Financial Time Series (hands-on) Preview 05:02

Helpful DatetimeIndex Attributes and Methods Preview 06:24

Filling NA Values with bfill, ffill and interpolation Preview 10:07

Timezones and Converting (Part 1) Preview 04:36

Timezones and Converting (Part 2) Preview 04:48

Introduction to OOP and examples for Classes Preview 10:58

The Financial Analysis Class live in action (Part 1) Preview 04:58

The Financial Analysis Class live in action (Part 2) Preview 03:42

The special method __init__() Preview 08:28

The method get_data() Preview 06:49

The method log_returns() Preview 03:21

String representation and the special method __repr__() Preview 03:41

The methods plot_prices() and plot_returns() Preview 05:21

Encapsulation and protected Attributes Preview 04:02

The method set_ticker() Preview 03:18

Adding more methods and performance metrics Preview 05:51

Inheritance Preview 09:01

Inheritance and the super() Function Preview 06:47

Adding meaningful Docstrings Preview 06:24

Creating and Importing Python Modules (.py) Preview 04:19

Coding Exercise 3: Create your own Class Preview 07:13

Introduction to Part 3 Preview 06:13

Trading Strategies - an Overview Preview 06:43

Downloads for Part 3 Preview 00:05

Getting the Data Preview 03:56

A simple Buy and Hold "Strategy" Preview 05:20

Performance Metrics Preview 06:33

SMA Crossover Strategies - Overview Preview 05:04

Defining an SMA Crossover Strategy Preview 07:03

Vectorized Strategy Backtesting Preview 08:21

Finding the optimal SMA Strategy Preview 11:52

Generalization with OOP: An SMA Backtesting Class in action Preview 10:24

Creating the Class (Part 1) Preview 04:02

Creating the Class (Part 2) Preview 09:06

Creating the Class (Part 3) Preview 06:20

Creating the Class (Part 4) Preview 04:58

Creating the Class (Part 5) Preview 02:37

Creating the Class (Part 6) Preview 04:54

Creating the Class (Part 7) Preview 02:46

Creating the Class (Part 8) Preview 04:19

Simple Contrarian/Momentum Strategies - Overview Preview 03:45

Getting the Data Preview 02:53

Excursus: Your FAQs answered Preview 05:03

Defining a simple Contrarian Strategy Preview 03:27

Vectorized Strategy Backtesting Preview 04:31

Changing the Window Parameter Preview 05:35

Trades and Trading Costs (Part 1) Preview 08:51

Trades and Trading Costs (Part 2) Preview 03:01

Generalization with OOP: A Contrarian Backtesting Class in action Preview 08:07

OOP Challenge: Create the Contrarian Backtesting Class (incl. Solution) Preview 05:04

Mean-Reversion Strategies - Overview Preview 05:41

Getting the Data Preview 02:00

Defining a Bollinger Bands Mean-Reversion Strategy (Part 1) Preview 04:29

Defining a Bollinger Bands Mean-Reversion Strategy (Part 2) Preview 09:22

Vectorized Strategy Backtesting Preview 05:48

Generalization with OOP: A Bollinger Bands Backtesting Class in action Preview 07:20

OOP Challenge: Create the Bollinger Bands Backtesting Class (incl. Solution) Preview 04:12

Machine Learning - an Overview Preview 06:40

Linear Regression with scikit-learn - a simple Introduction Preview 08:17

Making Predictions with Linear Regression Preview 03:11

Overfitting Preview 06:23

Underfitting Preview 04:05

Getting the Data Preview 01:39

A simple Linear Model to predict Financial Returns (Part 1) Preview 03:08

A simple Linear Model to predict Financial Returns (Part 2) Preview 06:40

A Multiple Regression Model to predict Financial Returns Preview 05:36

In-Sample Backtesting and the Look-ahead-bias Preview 03:48

Out-Sample Forward Testing Preview 04:30

Logistic Regression with scikit-learn - a simple Introduction (Part 1) Preview 05:22

Logistic Regression with scikit-learn - a simple Introduction (Part 2) Preview 06:11

Getting and Preparing the Data Preview 02:51

Predicting Market Direction with Logistic Regression Preview 03:38

In-Sample Backtesting and the Look-ahead-bias Preview 02:20

Out-Sample Forward Testing Preview 03:25

Generalization with OOP: A Classification Backtesting Class in action Preview 10:59

The Classification Backtesting Class explained (Part 1) Preview 07:00

The Classification Backtesting Class explained (Part 2) Preview 04:24

Introduction to Iterative Backtesting ("event-driven") Preview 04:18

A first Intuition on Iterative Backtesting (Part 1) Preview 06:07

A first Intuition on Iterative Backtesting (Part 2) Preview 05:06

Creating an Iterative Base Class (Part 1) Preview 04:27

Creating an Iterative Base Class (Part 2) Preview 02:35

Creating an Iterative Base Class (Part 3) Preview 02:14

Creating an Iterative Base Class (Part 4) Preview 07:30

Creating an Iterative Base Class (Part 5) Preview 05:42

Creating an Iterative Base Class (Part 6) Preview 04:15

Creating an Iterative Base Class (Part 7) Preview 06:36

Creating an Iterative Base Class (Part 8) Preview 06:49

Adding the Iterative Backtest Child Class for SMA (Part 1) Preview 05:52

Adding the Iterative Backtest Child Class for SMA (Part 2) Preview 08:56

Using Modules and adding Docstrings Preview 05:05

OOP Challenge: Add Contrarian and Bollinger Strategies Preview 07:25

Updating the Wrapper Package (Part 1) Preview 00:05

Updating the Wrapper Package (Part 2) Preview 03:13

**Weekend and Bank Holiday Alert** Preview 00:11

Historical Data, real-time Data and Orders (Recap) Preview 09:19

Preview: A Trader Class live in action Preview 05:05

How to collect and store real-time tick data Preview 05:35

Storing and resampling real-time tick data (Part 1) Preview 08:23

Storing and resampling real-time tick data (Part 2) Preview 05:48

Storing and resampling real-time tick data (Part 3) Preview 04:39

Storing and resampling real-time tick data (Part 4) Preview 07:49

Storing and resampling real-time tick data (Part 5) Preview 04:08

Working with historical data and real-time tick data (Part 1) Preview 08:08

Working with historical data and real-time tick data (Part 2) Preview 06:27

Working with historical data and real-time tick data (Part 3) Preview 03:44

Defining a simple Contrarian Strategy Preview 06:01

Placing Orders and Executing Trades Preview 06:30

Trade Monitoring and Reporting Preview 09:09

Trading other Strategies - Coding Challenge Preview 01:48

Implementing an SMA Crossover Strategy (Solution) Preview 04:18

Implementing a Bollinger Bands Strategy (Solution) Preview 03:15

Machine Learning Strategies (1) - Model Fitting Preview 05:26

Machine Learning Strategies (2) - Implementation Preview 06:47

Importing a Trader Module / Class Preview 02:56

Running a Python Trader Script Preview 07:02

**Weekend and Bank Holiday Alert** Preview 00:11

Historical Data, real-time Data and Orders (Recap) Preview 09:31

Troubleshooting: FXCM Server Connection Issues Preview 01:17

Preview: A Trader Class live in action Preview 06:14

Collecting and storing real-time tick data Preview 06:50

Storing and resampling real-time tick data (Part 1) Preview 08:42

A Trader Class Preview 05:41

Storing and resampling real-time tick data (Part 2) Preview 08:18

Storing and resampling real-time tick data (Part 3) Preview 03:16

Working with historical data and real-time tick data (Part 1) Preview 06:07

Working with historical data and real-time tick data (Part 2) Preview 05:55

Working with historical data and real-time tick data (Part 3) Preview 03:46

Defining a Simple Contrarian Trading Strategy Preview 04:47

Placing Orders and Executing Trades Preview 07:33

Trade Monitoring and Reporting Preview 06:31

Trading other Strategies - Coding Challenge Preview 01:57

SMA Crossover and Bollinger Bands (Solution) Preview 04:20

Machine Learning Strategies (1) - Model Fitting Preview 05:26

Machine Learning Strategies (2) - Implementation Preview 05:54

Running a Python Script Preview 06:20

Introduction and Motivation Preview 02:49

Demonstration: AWS EC2 for Algorithmic Trading live in action Preview 07:26

Amazon Web Services (AWS) - Overview and how to create a Free Trial Account Preview 02:34

How to create an EC2 Instance Preview 07:58

How to connect to your EC2 Instance Preview 04:20

Getting the Instance Ready for Algorithmic Trading Preview 07:00

**Weekend and Bank Holiday Alert** Preview 00:11

How to run Python Scripts in a Windows Command Prompt Preview 04:05

How to start Trading sessions with Batch (.bat) Files Preview 04:02

How to schedule Trading sessions with the Task Scheduler Preview 04:58

How to stop Trading Sessions (OANDA) Preview 06:36

How to stop Trading Sessions (FXCM) Preview 05:26

Introduction and Preparing the Data Preview 04:57

The best time to trade (Part 1) Preview 03:25

The best time to trade (Part 2) Preview 03:20

Spreads during the busy hours Preview 02:01

The Impact of Granularity Preview 04:15

Conclusions Preview 02:09

Introduction Preview 02:06

Strategy 1: SMA Preview 02:18

Strategy 2: Mean Reversion Preview 02:26

Combining both Strategies - Alternative 1 Preview 05:21

Taking into account busy Trading Hours Preview 02:32

Strategy Backtesting Preview 01:41

Combining both Strategies - Alternative 2 Preview 02:48

Strategy Optimization Preview 08:53

Project Overview Preview 05:31

Installation of Tensorflow & Keras (Part 1) Preview 00:10

Installation of Tensorflow & Keras (Part 2) Preview 07:52

Getting and Preparing the Data Preview 01:13

Adding Labels/Features Preview 05:36

Adding lags Preview 02:25

Splitting into Train and Test Set Preview 02:00

Feature Scaling/Engineering Preview 03:17

Creating and Fitting the DNN Model Preview 08:00

Prediction & Out-Sample Forward Testing Preview 07:02

Saving Model and Parameters Preview 02:52

**Important Notices** Preview 00:21

Implementation (Oanda & FXCM) Preview 12:25

Section Downloads Preview 00:04

Intro to the Time Value of Money (TVM) Concept (Theory) Preview 06:01

Calculate Future Values (FV) with Python / Compounding Preview 03:29

Calculate Present Values (FV) with Python / Discounting Preview 02:38

Interest Rates and Returns (Theory) Preview 04:26

Calculate Interest Rates and Returns with Python Preview 03:47

Introduction to Variables Preview 05:04

Excursus: How to add inline comments Preview 02:50

Variables and Memory (Theory) Preview 01:57

More on Variables and Memory Preview 06:33

Variables - Dos, Don´ts and Conventions Preview 03:49

The print() Function Preview 04:09

Coding Exercise 1 Preview 09:00

TVM Problems with many Cashflows Preview 03:21

Intro to Python Lists Preview 02:22

Zero-based Indexing and negative Indexing in Python (Theory) Preview 02:47

Indexing Lists Preview 03:10

For Loops - Iterating over Lists Preview 07:48

The range Object - another Iterable Preview 04:56

Calculate FV and PV for many Cashflows Preview 07:35

The Net Present Value - NPV (Theory) Preview 07:47

Calculate an Investment Project´s NPV Preview 03:02

Coding Exercise 2 Preview 08:41

Data Types in Action Preview 06:07

The Data Type Hierarchy (Theory) Preview 03:30

Excursus: Dynamic Typing in Python Preview 01:38

Build-in Functions Preview 05:52

Integers Preview 03:18

Floats Preview 05:58

How to round Floats (and Integers) with round() Preview 05:10

More on Lists Preview 05:15

Lists and Element-wise Operations Preview 04:19

Slicing Lists Preview 04:33

Slicing Cheat Sheet Preview 00:03

Changing Elements in Lists Preview 02:44

Sorting and Reversing Lists Preview 03:48

Adding and removing Elements from/to Lists Preview 09:33

Mutable vs. immutable Objects (Part 1) Preview 09:04

Mutable vs. immutable Objects (Part 2) Preview 05:12

Coding Exercise 3 Preview 11:32

Tuples Preview 06:50

Dictionaries Preview 06:22

Intro to Strings Preview 08:47

String Replacement Preview 04:10

Booleans Preview 02:23

Operators (Theory) Preview 04:37

Comparison, Logical and Membership Operators in Action Preview 08:21

Coding Exercise 4 Preview 08:56

Conditional Statements Preview 09:04

Keywords pass, continue and break Preview 09:37

Calculate a Project´s Payback Period Preview 04:35

Introduction to while loops Preview 07:58

Coding Exercise 5 Preview 00:04

Section Downloads Preview 00:04

Defining your first user-defined Function Preview 06:07

What´s the difference between Positional Arguments vs. Keyword Arguments? Preview 05:35

How to work with Default Arguments Preview 05:27

The Default Argument None Preview 06:17

How to unpack Iterables Preview 04:40

Sequences as arguments and *args Preview 05:05

How to return many results Preview 02:42

Scope - easily explained Preview 08:16

Coding Exercise 6 Preview 00:04

Downloads for this Section Preview 00:04

Modules, Packages and Libraries - No need to reinvent the Wheel Preview 07:52

Numpy Arrays Preview 08:23

Indexing and Slicing Numpy Arrays Preview 03:13

Vectorized Operations with Numpy Arrays Preview 03:56

Changing Elements in Numpy Arrays & Mutability Preview 05:50

View vs. copy - potential Pitfalls when slicing Numpy Arrays Preview 04:45

Numpy Array Methods and Attributes Preview 05:13

Numpy Universal Functions Preview 03:59

Boolean Arrays and Conditional Filtering Preview 04:39

Advanced Filtering & Bitwise Operators Preview 06:11

Determining a Project´s Payback Period with np.where() Preview 04:50

Creating Numpy Arrays from Scratch Preview 05:56

Coding Exercise 7 Preview 00:04

How to work with nested Lists Preview 04:21

2-dimensional Numpy Arrays Preview 03:51

How to slice 2-dim Numpy Arrays (Part 1) Preview 05:36

How to slice 2-dim Numpy Arrays (Part 2) Preview 02:03

Recap: Changing Elements in a Numpy Array / slice Preview 03:39

How to perform row-wise and column-wise Operations Preview 04:33

Coding Exercise 8 Preview 00:04

Intro to Tabular Data / Pandas Preview 04:19

Create your very first Pandas DataFrame (from csv) Preview 09:09

Pandas Display Options and the methods head() & tail() Preview 06:41

First Data Inspection Preview 11:25

Coding Exercise 9 Preview 00:04

Selecting Columns Preview 06:05

Selecting one Column with the "dot notation" Preview 02:16

Zero-based Indexing and Negative Indexing Preview 03:04

Selecting Rows with iloc (position-based indexing) Preview 10:07

Slicing Rows and Columns with iloc (position-based indexing) Preview 04:39

Position-based Indexing Cheat Sheets Preview 00:02

Selecting Rows with loc (label-based indexing) Preview 03:14

Slicing Rows and Columns with loc (label-based indexing) Preview 10:21

Label-based Indexing Cheat Sheets Preview 00:02

Summary, Best Practices and Outlook Preview 06:30

Coding Exercise 10 Preview 00:04

First Steps with Pandas Series Preview 03:53

Analyzing Numerical Series with unique(), nunique() and value_counts() Preview 13:50

Analyzing non-numerical Series with unique(), nunique(), value_counts() Preview 07:17

The copy() method Preview 03:57

Sorting of Series and Introduction to the inplace - parameter Preview 08:59

First Steps with Pandas Index Objects Preview 05:57

Changing Row Index with set_index() and reset_index() Preview 10:07

Changing Column Labels Preview 03:20

Renaming Index & Column Labels with rename() Preview 03:51

Filtering DataFrames (one Condition) Preview 10:20

Filtering DataFrames by many Conditions (AND) Preview 04:45

Filtering DataFrames by many Conditions (OR) Preview 05:04

Advanced Filtering with between(), isin() and ~ Preview 08:35

Intro to NA Values / missing Values Preview 08:52

Handling NA Values / missing Values Preview 10:51

Exporting DataFrames to csv Preview 02:14

Summary Statistics and Accumulations Preview 10:26

Visualization with Matplotlib (Intro) Preview 08:48

Customization of Plots Preview 12:56

Histogramms (Part 1) Preview 04:34

Histogramms (Part 2) Preview 06:28

Scatterplots Preview 07:18

First Steps with Seaborn Preview 05:24

Categorical Seaborn Plots Preview 13:33

Seaborn Regression Plots Preview 12:21

Seaborn Heatmaps Preview 08:17

Removing Columns Preview 05:18

Introduction to GroupBy Operations Preview 02:02

Understanding the GroupBy Object Preview 08:05

Splitting with many Keys Preview 06:49

split-apply-combine Preview 09:36