Course Highlights
  • 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, Interactive Brokers (IBKR) and FXCM.
  • Stream high-frequency real-time Data.
  • Understand, analyze, control and limit Trading Costs.
  • Use powerful Broker APIs and connect with Python.
Curriculum

6 Topics
What is Algorithmic Trading / Course Overview
How to get the best out of this course
Did you know...? (what Data can tell us about Day Trading)
Test your knowledge
Student FAQ
*** LEGAL DISCLAIMER (MUST READ!) ***

5 Topics
Our very first Trade
Long Term Investing vs. (Algorithmic) Day Trading
Spot Trading vs. Derivatives Trading (Part 1)
Spot Trading vs. Derivatives Trading (Part 2)
Overview & the Brokers OANDA IBKR and FXCM

16 Topics
OANDA at a first glance
Creating a fully functional Demo Account - in all Countries/Regions!
How to create an Account ***Update May 2023***
FOREX / Currency Exchange Rates explained
Our second Trade - EUR/USD FOREX Trading
How to calculate Profit & Loss of a Trade
Trading Costs and Performance Attribution
Margin and Leverage
Margin Closeout and more
Introduction to Charting
Our third Trade A-Z - Going Short EUR/USD
Netting vs. Hedging
Market Limit and Stop Orders
Take-Profit and Stop-Loss Orders
A more general Example
Trading Challenge

12 Topics
IBKR at a first glance
How to create a (Paper Trading) Account
How to Install the IB Trader Workstation (TWS)
TWS - First Steps
The first Trade (buying Stocks)
Trading Hours
Cash Account vs. Margin Account
Trading Costs (Stocks) - Commissions
Trading Costs (Stocks) - other (hidden) Costs
FOREX Trading: Cash vs. CFD
A complete CFD FOREX Trade
CFD Trade Analysis

9 Topics
***Important Info April 2023***
FXCM at a first glance
How to create an Account
Example Trade: Buying EUR/USD
Trade Analysis
Charting
Closing Positions vs. Hedging Positions
Order Types at a glance
Trading Challenge

5 Topics
Introduction
Download and Install Anaconda
How to open Jupyter Notebooks
How to work with Jupyter Notebooks
Tips for Python Beginners

15 Topics
Introduction
Test your debugging skills!
Major reasons for Coding Errors
The most commonly made Errors at a glance
Omitting cells changing the sequence and more
IndexErrors
Indentation Errors
Misuse of function names and keywords
TypeErrors and ValueErrors
Getting help on StackOverflow.com
How to traceback more complex Errors
Problems with the Python Installation
External Factors and Issues
Errors related to the course content (Transcription Errors)
Summary and Debugging Flow-Chart

35 Topics
How to maximize your learning experience
Overview
OANDA: Commands to install required packages ***UPD August 23***
OANDA: Getting the API Key & other Preparations
OANDA: Connecting to the API/Server
***Important Notice Update August 2023***
OANDA: How to load Historical Price Data (Part 1)
OANDA: How to load Historical Price Data (Part 2)
OANDA: Streaming high-frequency real-time Data
OANDA: How to place Orders and execute Trades
Trading Challenge
IBKR API: Downloads and required Commands to install the Wrapper
IBKR: How to download and install the API Wrapper & other Preparations
IBKR: Connecting to the API
IBKR: Contracts
IBKR: How to get Market Data
IBKR: Data Streaming for Multiple Tickers
IBKR: Contracts (advanced)
IBKR: FOREX and CFD Contracts
IBKR: Creating Orders (Stock Trading)
IBKR: Creating Orders (CFD Trading)
IBKR: CFD Trade Information
IBKR: Positions and Account Values
IBKR: Historical Bars
***FXCM Important Info April 2023***
FXCM: Commands to install required packages
FXCM: How to install the FXCM API Wrapper
FXCM: Getting the Access Token & other Preparations
FXCM: Connecting to the API/Server
Troubleshooting: FXCM Server Connection Issues
FXCM: How to load Historical Price Data (Part 1)
FXCM: How to load Historical Price Data (Part 2)
FXCM: Streaming high-frequency real-time Data
FXCM: How to place Orders and execute Trades
Trading Challenge

1 Topic
Conclusion and Outlook

1 Topic
Introduction and Downloads Part 2 ***Updated March 2023***

5 Topics
Importing Time Series Data from csv-files
Converting strings to datetime objects with pd.to_datetime()
Indexing and Slicing Time Series
Downsampling Time Series with resample()
Coding Exercise 1

36 Topics
Introduction and Overview
Installing and importing required Libraries/Packages
Loading Financial Data from the Web
Initial Inspection and Visualization
[Article] Loading Data into Pandas - advanced topics
Normalizing Time Series to a Base Value (100)
Coding Challenge #1
Price changes and Financial Returns
Reward and Risk of Financial Instruments
Coding Challenge #2
Investment Multiple and CAGR
Compound Returns & Geometric Mean Return
Coding Challenge #3
Discrete Compounding
Continuous Compounding
Log Returns
Simple Returns vs Log Returns ( Part 1)
Simple Returns vs Log Returns ( Part 2)
Coding Challenge #4
Mid-Section Test
Comparing the Performance of Financial Instruments
(Non-) Normality of Financial Returns
Annualizing Return and Risk
Resampling / Smoothing of Financial Data
Rolling Statistics
Coding Challenge #5
Short Selling and Short Position Returns (Part 1)
Short Selling and Short Position Returns (Part 2)
Short Selling and Short Position Returns (Part 3)
Coding Challenge #6
Covariance and Correlation
Portfolios and Portfolio Returns
Margin Trading and Levered Returns (Part 1)
Margin Trading and Levered Returns (Part 2)
Coding Challenge #7
Final Test

6 Topics
Importing Financial Data from Excel
Merging / Aligning Financial Time Series (hands-on)
Helpful DatetimeIndex Attributes and Methods
Filling NA Values with bfill ffill and interpolation
Timezones and Converting (Part 1)
Timezones and Converting (Part 2)

16 Topics
Introduction to OOP and examples for Classes
The Financial Analysis Class live in action (Part 1)
The Financial Analysis Class live in action (Part 2)
The special method __init__()
The method get_data()
The method log_returns()
String representation and the special method __repr__()
The methods plot_prices() and plot_returns()
Encapsulation and protected Attributes
The method set_ticker()
Adding more methods and performance metrics
Inheritance
Inheritance and the super() Function
Adding meaningful Docstrings
Creating and Importing Python Modules (.py)
Coding Exercise 3: Create your own Class

6 Topics
Introduction to Part 3
Trading Strategies - an Overview
Downloads for Part 3 ***Updated May 2023***
Getting the Data
A simple Buy and Hold "Strategy"
Performance Metrics

13 Topics
SMA Crossover Strategies - Overview
Defining an SMA Crossover Strategy
Vectorized Strategy Backtesting
Finding the optimal SMA Strategy
Generalization with OOP: An SMA Backtesting Class in action
Creating the Class (Part 1)
Creating the Class (Part 2)
Creating the Class (Part 3)
Creating the Class (Part 4)
Creating the Class (Part 5)
Creating the Class (Part 6)
Creating the Class (Part 7)
Creating the Class (Part 8)

10 Topics
Simple Contrarian/Momentum Strategies - Overview
Getting the Data
Excursus: Your FAQs answered
Defining a simple Contrarian Strategy
Vectorized Strategy Backtesting
Changing the Window Parameter
Trades and Trading Costs (Part 1)
Trades and Trading Costs (Part 2)
Generalization with OOP: A Contrarian Backtesting Class in action
OOP Challenge: Create the Contrarian Backtesting Class (incl. Solution)

7 Topics
Mean-Reversion Strategies - Overview
Getting the Data
Defining a Bollinger Bands Mean-Reversion Strategy (Part 1)
Defining a Bollinger Bands Mean-Reversion Strategy (Part 2)
Vectorized Strategy Backtesting
Generalization with OOP: A Bollinger Bands Backtesting Class in action
OOP Challenge: Create the Bollinger Bands Backtesting Class (incl. Solution)

11 Topics
Machine Learning - an Overview
Linear Regression with scikit-learn - a simple Introduction
Making Predictions with Linear Regression
Overfitting
Underfitting
Getting the Data
A simple Linear Model to predict Financial Returns (Part 1)
A simple Linear Model to predict Financial Returns (Part 2)
A Multiple Regression Model to predict Financial Returns
In-Sample Backtesting and the Look-ahead-bias
Out-Sample Forward Testing

9 Topics
Logistic Regression with scikit-learn - a simple Introduction (Part 1)
Logistic Regression with scikit-learn - a simple Introduction (Part 2)
Getting and Preparing the Data
Predicting Market Direction with Logistic Regression
In-Sample Backtesting and the Look-ahead-bias
Out-Sample Forward Testing
Generalization with OOP: A Classification Backtesting Class in action
The Classification Backtesting Class explained (Part 1)
The Classification Backtesting Class explained (Part 2)

15 Topics
Introduction to Iterative Backtesting ("event-driven")
A first Intuition on Iterative Backtesting (Part 1)
A first Intuition on Iterative Backtesting (Part 2)
Creating an Iterative Base Class (Part 1)
Creating an Iterative Base Class (Part 2)
Creating an Iterative Base Class (Part 3)
Creating an Iterative Base Class (Part 4)
Creating an Iterative Base Class (Part 5)
Creating an Iterative Base Class (Part 6)
Creating an Iterative Base Class (Part 7)
Creating an Iterative Base Class (Part 8)
Adding the Iterative Backtest Child Class for SMA (Part 1)
Adding the Iterative Backtest Child Class for SMA (Part 2)
Using Modules and adding Docstrings
OOP Challenge: Add Contrarian and Bollinger Strategies

2 Topics
Introduction and Overview
Downloads for Part 4 *** Updated May 2023 ***

26 Topics
Updating the Wrapper Package (Part 1)
Updating the Wrapper Package (Part 2)
**Weekend and Bank Holiday Alert**
Historical Data real-time Data and Orders (Recap)
Preview: A Trader Class live in action
How to collect and store real-time tick data
Storing and resampling real-time tick data (Part 1)
Storing and resampling real-time tick data (Part 2)
Storing and resampling real-time tick data (Part 3)
Storing and resampling real-time tick data (Part 4)
Storing and resampling real-time tick data (Part 5)
Working with historical data and real-time tick data (Part 1)
Working with historical data and real-time tick data (Part 2)
Working with historical data and real-time tick data (Part 3)
Defining a simple Contrarian Strategy
Placing Orders and Executing Trades
Trade Monitoring and Reporting
Trading other Strategies - Coding Challenge
Implementing an SMA Crossover Strategy (Solution)
Implementing a Bollinger Bands Strategy (Solution)
Machine Learning Strategies (1) - Model Fitting
Machine Learning Strategies (2) - Implementation
Importing a Trader Module / Class
Excursus: Printing all ticks in a Command Prompt/Terminal
Running a Python Trader Script
Outlook: What is (still) missing?

14 Topics
IBKR API - Recap
Streaming Tick Data
Streaming Tick Data for multiple Symbols
Streaming Bar Data
How to create a live Candle Stick Chart
Preparing the Data for Day Trading
Improving Code Efficiency
Define an SMA Day Trading Strategy
Creating Orders and Executing Trades
Trade Monitoring and Reporting
How to Stop a Trading Session
Trading other Strategies - Coding Challenge
Running a Python Trader Script
Outlook: What is (still) missing?

21 Topics
**Weekend and Bank Holiday Alert**
Historical Data real-time Data and Orders (Recap)
Troubleshooting: FXCM Server Connection Issues
Preview: A Trader Class live in action
Collecting and storing real-time tick data
Storing and resampling real-time tick data (Part 1)
A Trader Class
Storing and resampling real-time tick data (Part 2)
Storing and resampling real-time tick data (Part 3)
Working with historical data and real-time tick data (Part 1)
Working with historical data and real-time tick data (Part 2)
Working with historical data and real-time tick data (Part 3)
Defining a Simple Contrarian Trading Strategy
Placing Orders and Executing Trades
Trade Monitoring and Reporting
Trading other Strategies - Coding Challenge
SMA Crossover and Bollinger Bands (Solution)
Machine Learning Strategies (1) - Model Fitting
Machine Learning Strategies (2) - Implementation
Excursus: Printing all ticks in a Command Prompt/Terminal
Running a Python Script

12 Topics
Introduction and Motivation
Demonstration: AWS EC2 for Algorithmic Trading live in action
Amazon Web Services (AWS) - Overview and how to create a Free Trial Account
How to create an EC2 Instance
How to connect to your EC2 Instance
Getting the Instance Ready for Algorithmic Trading
**Weekend and Bank Holiday Alert**
How to run Python Scripts in a Windows Command Prompt
How to start Trading sessions with Batch (.bat) Files
How to schedule Trading sessions with the Task Scheduler
How to stop Trading Sessions (OANDA)
How to stop Trading Sessions (FXCM)

2 Topics
Overview
Downloads for PART 5 ***Updated June 2023***

6 Topics
Introduction and Preparing the Data
The best time to trade (Part 1)
The best time to trade (Part 2)
Spreads during the busy hours
The Impact of Granularity
Conclusions

8 Topics
Introduction
Strategy 1: SMA
Strategy 2: Mean Reversion
Combining both Strategies - Alternative 1
Taking into account busy Trading Hours
Strategy Backtesting
Combining both Strategies - Alternative 2
Strategy Optimization

13 Topics
Project Overview
Installation of Tensorflow & Keras (Part 1)
Installation of Tensorflow & Keras (Part 2)
Getting and Preparing the Data
Adding Labels/Features
Adding lags
Splitting into Train and Test Set
Feature Scaling/Engineering
Creating and Fitting the DNN Model
Prediction & Out-Sample Forward Testing
Saving Model and Parameters
**Important Notices**
Implementation (Oanda & FXCM)

19 Topics
Introduction
Python Errors (Exceptions)
try and except
Catching specific Errors
The Exception class
try except else
finally
Try again (...until it works)
How to limit the number of retries
Waiting periods between re-tries
Implementation with Oanda: V20 Connection Issues
Oanda Error Handling (Part 1)
Oanda Error Handling (Part 2)
Oanda Error Handling (Part 3)
Implementation with IBKR: Errors and Connectivity Issues
IBKR Error Handling
Implementation with FXCM: API/Server Issues
FXCM Error Handling (Part 1)
FXCM Error Handling (Part 2)

17 Topics
Introduction
Stop Loss Orders - Theory
Trailing Stop Loss Orders - Theory
Take Profit Orders - Theory
SL & TP - Use Cases and Conclusion
Oanda: Contrader Class without Take Profit & Stop Loss (Recap)
Oanda: How to create Stop Loss and Take Profit Orders
Oanda: Stop Loss and Take Profit Orders - Pitfalls
Oanda: Setting SL Distances and TP Prices in real-time
Oanda: Check for SL/TP Events
Oanda: Adding Stop Loss & Take Profit
Oanda Trading Bot: Final Python Script
IBKR: Contrader Class without Take Profit & Stop Loss (Recap)
IBKR: How to create Stop Loss and Take Profit Orders
IBKR: Stop Loss and Take Profit Orders - Pitfalls
IBKR: Adding Stop Loss & Take Profit
IBKR Trading Bot: Final Python Script

1 Topic
Overview

80 Topics
Section Downloads ***Reviewed May 2023***
Intro to the Time Value of Money (TVM) Concept (Theory)
Calculate Future Values (FV) with Python / Compounding
***NEW*** Udemy Online Coding Exercises - Intro
Future Value
Calculate Present Values (PV) with Python / Discounting
Present Value
Interest Rates and Returns (Theory)
Calculate Interest Rates and Returns with Python
Interest Rates
Introduction to Variables
Variables
Excursus: How to add inline comments
Variables and Memory (Theory)
More on Variables and Memory
Addition Assignment
Variables - Dos Don´ts and Conventions
The print() Function
print()
Coding Exercise 1
TVM Problems with many Cashflows
Intro to Python Lists
Creating Lists
Zero-based Indexing and negative Indexing in Python (Theory)
Indexing Lists
Indexing Lists
For Loops - Iterating over Lists
List Iteration
The range Object - another Iterable
Iterating over range objects
Calculate FV and PV for many Cashflows
The Net Present Value - NPV (Theory)
Calculate an Investment Project´s NPV
Calculating NPV
Coding Exercise 2
Data Types in Action
Strings
The Data Type Hierarchy (Theory)
Excursus: Dynamic Typing in Python
Build-in Functions
Functions
Integers
Floats
How to round Floats (and Integers) with round()
Rounding
More on Lists
Lists and Element-wise Operations
Element-wise Operations
Slicing Lists
Slicing Cheat Sheet
Slicing Lists
Changing Elements in Lists
Changing Lists
Sorting and Reversing Lists
Sorting Lists
Adding and removing Elements from/to Lists
Adding and Removing Elements
Mutable vs. immutable Objects (Part 1)
Mutable vs. immutable Objects (Part 2)
Coding Exercise 3
Tuples
Dictionaries
Dictionary
Intro to Strings
Capitalize Strings
String Replacement
String Replacement
Booleans
Operators (Theory)
Comparison Logical and Membership Operators in Action
Booleans and Operators
Coding Exercise 4
Conditional Statements
Conditionals
Keywords pass continue and break
Keywords
Calculate a Project´s Payback Period
Introduction to while loops
While Loop
Coding Exercise 5

10 Topics
Section Downloads ***reviewed May 2023***
Defining your first user-defined Function
What´s the difference between Positional Arguments vs. Keyword Arguments?
How to work with Default Arguments
The Default Argument None
How to unpack Iterables
Sequences as arguments and *args
How to return many results
Scope - easily explained
Coding Exercise 6

84 Topics
Downloads for this Section ***Updated May 2023***
Modules Packages and Libraries - No need to reinvent the Wheel
Numpy Arrays
Numpy Arrays
Indexing and Slicing Numpy Arrays
Indexing and Slicing
Vectorized Operations with Numpy Arrays
PV with vectorized Numpy Code
Changing Elements in Numpy Arrays & Mutability
View vs. copy - potential Pitfalls when slicing Numpy Arrays
Changing elements in Arrays (and Copies)
Numpy Array Methods and Attributes
Methods
Numpy Universal Functions
Universal Functions
Boolean Arrays and Conditional Filtering
Conditional Filtering
Advanced Filtering & Bitwise Operators
Advanced Filtering
Determining a Project´s Payback Period with np.where()
Creating Numpy Arrays from Scratch
Numpy Arrays from Scratch
Coding Exercise 7
How to work with nested Lists
2-dimensional Numpy Arrays
How to slice 2-dim Numpy Arrays (Part 1)
How to slice 2-dim Numpy Arrays (Part 2)
Recap: Changing Elements in a Numpy Array / slice
How to perform row-wise and column-wise Operations
Coding Exercise 8
Intro to Tabular Data / Pandas
Create your very first Pandas DataFrame (from csv)
Loading a CSV-file into Pandas
Pandas Display Options and the methods head() & tail()
First Data Inspection
Summary Statistics
Coding Exercise 9
Selecting Columns
Selecting one Column with the "dot notation"
Selecting Columns
Zero-based Indexing and Negative Indexing
Selecting Rows with iloc (position-based indexing)
Slicing Rows and Columns with iloc (position-based indexing)
Position-based Indexing Cheat Sheets
Position-based Indexing 1
Position-based Indexing 2
Selecting Rows with loc (label-based indexing)
Slicing Rows and Columns with loc (label-based indexing)
Label-based Indexing Cheat Sheets
Label-based Indexing 1
Label-based Indexing 2
Summary Best Practices and Outlook
Coding Exercise 10
First Steps with Pandas Series
Analyzing Numerical Series with unique() nunique() and value_counts()
Analyzing non-numerical Series with unique() nunique() value_counts()
The copy() method
Sorting of Series and Introduction to the inplace - parameter
First Steps with Pandas Index Objects
Changing Row Index with set_index() and reset_index()
Changing Column Labels
Renaming Index & Column Labels with rename()
Filtering DataFrames (one Condition)
Filtering DataFrames by many Conditions (AND)
Filtering DataFrames by many Conditions (OR)
Advanced Filtering with between() isin() and ~
Intro to NA Values / missing Values
Handling NA Values / missing Values
Exporting DataFrames to csv
Summary Statistics and Accumulations
Visualization with Matplotlib (Intro)
Customization of Plots
Histogramms (Part 1)
Histogramms (Part 2)
Scatterplots
First Steps with Seaborn
Categorical Seaborn Plots
Seaborn Regression Plots
Seaborn Heatmaps
Removing Columns
Introduction to GroupBy Operations
Understanding the GroupBy Object
Splitting with many Keys
split-apply-combine

1 Topic
Bonus Lecture

  Write a Review

Algorithmic Trading A-Z with Python, Machine Learning & AWS

Go to Paid Course