Automated Cryptocurrency Portfolio Investing with Python AZ

Create your automated Crypto Robo-Advisor | Portfolio Optimization & Rebalancing | Many Exchanges & Coins supported!
Automated Cryptocurrency Portfolio Investing with Python AZ
File Size :
566.68 MB
Total length :
32h 4m



Alexander Hagmann


Last update




Automated Cryptocurrency Portfolio Investing with Python AZ

What you’ll learn

How to boost your Crypto Investments with Portfolio Diversification and Rebalancing
How to build an automated Portfolio Investing and Rebalancing Bot (Python)
Crypto Portfolio Optimization, Management and Rebalancing
How to measure and improve the Performance of your Crypto Portfolio
How to load the complete Crypto Markets data from Coingecko
Truly Data-driven Crypto Investing
Basics on Cryptocurrencies, Investing and Trading
API Trading and Investing with Binance, Coinbase, Kraken & many other Exchanges
How to get programmatic access to many Crypto Exchanges with the CCXT Library
Python Coding and Object Oriented Programming (OOP) in a way that everybody understands it
Coding with Numpy, Pandas, Matplotlib and Seaborn
Mean-Variance Portfolio Optimization
More advanced & practical Portfolio Optimization techniques
How to create Crypto Indices and Investment Benchmarks

Automated Cryptocurrency Portfolio Investing with Python AZ


No Python experience needed. This course provides a Python Crash Course.
No Finance/Investment knowledge required. You will learn everything you need to know.
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).


Welcome to the first-ever course on (Automated) Cryptocurrency Portfolio Investing. Investing in Cryptocurrencies has been highly profitable but also risky and volatile in the past.Did you know that you can substantially improve the performance of your Crypto Investments withPortfolio Diversification (there is more than just Bitcoin and Ethereum)Active and frequent Portfolio Rebalancing…leading to higher Profitability and/or lower Risk!This course provides practical and simple-to-use Python tools forPortfolio Optimizationautomated Portfolio Investing & Rebalancing for Exchanges like Binance, Coinbase, Kraken & co. The course is structured in four Parts:Part 1:  Basics & Prerequisites Trading vs InvestingWhat you should know about Cryptocurrencies as an Asset ClassTrading and Investing on Exchanges like Binance, Coinbase, Kraken & co. Loading tons of Crypto Market Data from Data AggregatorsAnalyzing the Cryptocurrency Market with Python and PandasPart 2: Crypto Portfolio Investing and Rebalancing with PythonBuilding and using a Portfolio Investing and Rebalancing BotAPI Trading with CCXTRequired Python skills (Error Handling, Object Oriented Programming)Part 3: Crypto Portfolio Management and OptimizationFinancial Data Analysis & Performance MeasurementCreating Crypto Indices and PortfoliosPortfolio Optimization (and its Pitfalls)Reverse Optimization & the Black-Litterman modelAdvanced Topics and TheoryPart 4 (Appendix): A Python Crash Course (optional)Everything you need to know about Python Coding for this Course – no more, no lessWhat else should you know about me and the course?The course shows how to do things right. But equally important, it highlights the most commonly made mistakes in (Crypto) Investing. There is hardly any other business where beginners make so many mistakes. Why is that? A lack of skills, expertise, and experience. And: Overconfidence and overreliance on intuition. As a finance professional with an extensive academic background (MSc in Finance, CFA) my clear message is: For Trading and Investing, intuition and common sense are not your best friends. Very often, the most intuitive solution is not the correct solution!       This course is “not only” a crypto investing course but also an in-depth Python Course that goes beyond what you can typically see in other courses. Create hands-on Applications with Python and use it for your Crypto Investing Business!What are you waiting for? Join now!Thanks and looking forward to seeing you in the Course!


Section 1: Getting started

Lecture 1 Welcome and Introduction

Lecture 2 Did you know…? (a Sneak Preview on Crypto Investing)

Lecture 3 How to get the best out of this course

Lecture 4 Student FAQ


Lecture 6 Course Overview

Section 2: PART 1: Basics and Prerequisites

Lecture 7 Introduction and Overview PART 1

Lecture 8 Download Course Materials PART 1

Section 3: Introduction to Cryptocurrency Investing/Trading

Lecture 9 Investing vs. Trading

Lecture 10 Asset Classes, Money and (Crypto-) Currencies

Lecture 11 What is a Stable Coin?

Lecture 12 Why Investing into Cryptocurrencies?

Lecture 13 Crypto Exchanges/Markets – Overview

Lecture 14 Introduction to

Lecture 15 Price, Volume and Charts

Lecture 16 Market Capitalization and (Circulating) Supply

Lecture 17 Cryptocurrency Exchanges

Lecture 18 The Binance Exchange

Lecture 19 and Binance.US at a first glance

Lecture 20 How to get a 10% Discount on Trading Commissions

Lecture 21 Registration and Identity Verification

Lecture 22 How to instantly buy your first Cryptos

Lecture 23 Deposits and Withdrawals (Part 1)

Lecture 24 Deposits and Withdrawals (Part 2)

Lecture 25 The first Spot Trade (buy Bitcoin)

Lecture 26 Trade Analysis and Trading Fees/Commissions

Lecture 27 Another Spot Trade (sell Bitcoin)

Lecture 28 Limit Orders vs. Market Orders

Lecture 29 Take-Profit Orders

Lecture 30 Stop-Loss Orders

Lecture 31 The Order Book

Lecture 32 Bid-Ask-Spread and Slippage

Lecture 33 Total Costs of a Trade (visible vs. hidden Costs)

Lecture 34 Alternative Exchanges (FTX, Kraken, etc.)

Lecture 35 Introduction and

Lecture 36 How to get a 5% Discount on Trading Commissions (

Lecture 37 Creating accounts on and

Section 4: Installing Python and Jupyter Notebooks

Lecture 38 Introduction

Lecture 39 Download and Install Anaconda

Lecture 40 How to open Jupyter Notebooks

Lecture 41 How to work with Jupyter Notebooks

Lecture 42 Tips for python beginners

Section 5: Excursus: How to avoid and debug Coding Errors (don´t skip!)

Lecture 43 Introduction

Lecture 44 Test your debugging skills!

Lecture 45 Major reasons for Coding Errors

Lecture 46 The most commonly made Errors at a glance

Lecture 47 Omitting cells, changing the sequence and more

Lecture 48 IndexErrors

Lecture 49 Indentation Errors

Lecture 50 Misuse of function names and keywords

Lecture 51 TypeErrors and ValueErrors

Lecture 52 Getting help on

Lecture 53 How to traceback more complex Errors

Lecture 54 Problems with the Python Installation

Lecture 55 External Factors and Issues

Lecture 56 Errors related to the course content (Transcription Errors)

Lecture 57 Summary and Debugging Flow-Chart

Section 6: Python Data Analysis: The Cryptocurrency Market at a glance

Lecture 58 Introduction

Lecture 59 Cross-Sectional Data, Time Series Data & Panel Data

Lecture 60 Download Course Materials and how to load csv-files

Lecture 61 [Article] Loading Data into Pandas – advanced topics

Lecture 62 The full Crypto Market in one Dataset (Cross-Sectional)

Lecture 63 Price, Market Capitalization, circulating Supply & more

Lecture 64 Data Analysis & Presentation

Lecture 65 The full Crypto Market in one Dataset (Panel Data)

Lecture 66 Price Charts

Lecture 67 Market Cap over time

Lecture 68 Market_Share over time

Lecture 69 Outlook

Section 7: Loading the full Market Data from Coingecko

Lecture 70 The Coingecko API – Introduction

Lecture 71 Preparations & First Steps

Lecture 72 Simple Calls

Lecture 73 Coin Calls (Part 1)

Lecture 74 Coin Calls (Part 2)

Lecture 75 Exchanges Calls

Lecture 76 How to load the Cross-Sectional Dataset (Part 1)

Lecture 77 How to load the Cross-Sectional Dataset (Part 2)

Lecture 78 How to load the Cross-Sectional Dataset (Part 3)

Lecture 79 Getting all available Coins on Binance

Lecture 80 Loading the Panel Dataset

Lecture 81 Cleaning and preparing the Panel Dataset (Part 1)

Lecture 82 Cleaning and preparing the Panel Dataset (Part 2)

Lecture 83 Cleaning and preparing the Panel Dataset (Part 3)

Section 8: PART 2: Crypto Portfolio Investing and Rebalancing with Python

Lecture 84 Introduction and Overview PART 2

Lecture 85 Download Course Materials PART 2

Section 9: Crypto API Trading with CCXT – Introduction

Lecture 86 Introduction

Lecture 87 Preparations

Lecture 88 First Steps with CCXT

Lecture 89 General Exchange Information

Lecture 90 The Public API

Lecture 91 Loading Historical Data (Part 1)

Lecture 92 Loading Historical Data (Part 2)

Lecture 93 How to get Binance API Keys

Lecture 94 The Private API

Lecture 95 The Binance Spot Test Network

Lecture 96 How to connect to Testnets (Sandbox mode)

Lecture 97 Creating Orders and analyzing Trades (Spot)

Lecture 98 Trading with CCXT and FTX

Section 10: Error Handling: How to make your Code more stable and reliable

Lecture 99 Introduction

Lecture 100 Python Errors (Exceptions)

Lecture 101 try and except

Lecture 102 Catching specific Errors

Lecture 103 The Exception class

Lecture 104 try, except, else

Lecture 105 finally

Lecture 106 Try again (…until it works)

Lecture 107 How to limit the number of retries

Lecture 108 Waiting periods between re-tries

Section 11: Object Oriented Programming (OOP): Creating a Finance Class

Lecture 109 Introduction to OOP and examples for Classes

Lecture 110 Installing required Libraries

Lecture 111 The Financial Analysis Class live in action (Part 1)

Lecture 112 The Financial Analysis Class live in action (Part 2)

Lecture 113 The special method __init__()

Lecture 114 The method get_data()

Lecture 115 The method log_returns()

Lecture 116 String representation and the special method __repr__()

Lecture 117 The methods plot_prices() and plot_returns()

Lecture 118 Encapsulation and protected Attributes

Lecture 119 The method set_ticker()

Lecture 120 Adding more methods and performance metrics

Lecture 121 Inheritance

Lecture 122 Inheritance and the super() Function

Lecture 123 Adding meaningful Docstrings

Lecture 124 Creating and Importing Python Modules (.py)

Lecture 125 Coding Exercise: Create your own Class

Section 12: The Portfolio Trading and Rebalancing Bot

Lecture 126 The Portfolio Rebalancing Bot Live in Action

Lecture 127 The Portfolio Rebalancing Bot explained (Part 1)

Lecture 128 The Portfolio Rebalancing Bot explained (Part 2)

Lecture 129 The Portfolio Rebalancing Bot explained (Part 3)

Lecture 130 The Portfolio Rebalancing Bot explained (Part 4)

Lecture 131 The Portfolio Rebalancing Bot explained (Part 5)

Lecture 132 The Portfolio Rebalancing Bot explained (Part 6)

Lecture 133 The Portfolio Rebalancing Bot explained (Part 7)

Lecture 134 Changing Target Currencies

Lecture 135 How to adjust to other Exchanges

Lecture 136 How to run a Rebalancing Script

Section 13: PART 3: Crypto Portfolio Management and Optimization

Lecture 137 Introduction and Overview PART 3

Lecture 138 Download Course Materials PART 3 (updated: 27/09/2022)

Section 14: Financial Data Analysis with Python and Pandas – a (deep) Introduction

Lecture 139 Introduction and Overview

Lecture 140 Installing and importing required Libraries/Packages

Lecture 141 Loading Financial Data from the Web

Lecture 142 Initial Inspection and Visualization

Lecture 143 Normalizing Time Series to a Base Value (100)

Lecture 144 Coding Challenge #1

Lecture 145 Price changes and Financial Returns

Lecture 146 Reward and Risk of Financial Instruments

Lecture 147 Coding Challenge #2

Lecture 148 Investment Multiple and CAGR

Lecture 149 Compound Returns & Geometric Mean Return

Lecture 150 Coding Challenge #3

Lecture 151 Discrete Compounding

Lecture 152 Continuous Compounding

Lecture 153 Log Returns

Lecture 154 Simple Returns vs Log Returns ( Part 1)

Lecture 155 Simple Returns vs Log Returns ( Part 2)

Lecture 156 Coding Challenge #4

Lecture 157 Comparing the Performance of Financial Instruments

Lecture 158 (Non-) Normality of Financial Returns

Lecture 159 Annualizing Return and Risk

Lecture 160 Resampling / Smoothing of Financial Data

Lecture 161 Rolling Statistics

Lecture 162 Coding Challenge #5

Lecture 163 Short Selling and Short Position Returns (Part 1)

Lecture 164 Introduction to Currencies (Forex) and Trading

Lecture 165 Short Selling and Short Position Returns (Part 2)

Lecture 166 Short Selling and Short Position Returns (Part 3)

Lecture 167 Coding Challenge #6

Lecture 168 Covariance and Correlation

Lecture 169 Portfolios and Portfolio Returns

Lecture 170 Margin Trading and Levered Returns (Part 1)

Lecture 171 Margin Trading and Levered Returns (Part 2)

Lecture 172 Coding Challenge #7

Section 15: Performance Analysis Cryptocurrencies – Homework Challenge

Lecture 173 Getting started & Assignments

Lecture 174 Solutions

Section 16: How to create a Cryptocurrency Index/Benchmark

Lecture 175 Introduction

Lecture 176 Financial Indexes – an Overview

Lecture 177 Getting started

Lecture 178 Value-weighted Index (Theory)

Lecture 179 Creating a Value-weighted Crypto Index

Lecture 180 Price-weighted Index (Theory)

Lecture 181 Creating a Price-weighted Crypto Index

Lecture 182 Equally-weighted Index (Theory)

Lecture 183 Creating an Equally-weighted Crypto Index

Lecture 184 Analysis and Comparison (Part 1)

Lecture 185 Analysis and Comparison (Part 2)

Section 17: Creating and Analysing Cryptocurrency Portfolios

Lecture 186 Getting started

Lecture 187 Creating Random Portfolios (Part 1)

Lecture 188 Creating Random Portfolios (Part 2)

Lecture 189 Performance Measurement: Risk-adjusted Return

Lecture 190 Portfolio Optimization (Part 1)

Lecture 191 Portfolio Optimization (Part 2)

Lecture 192 The Efficient Frontier

Lecture 193 Adding (daily) Rebalancing

Lecture 194 The Effects of Rebalancing

Lecture 195 Rebalancing and Trading Costs

Section 18: The Portfolio Optimization Bot (with naive Diversification)

Lecture 196 Getting started

Lecture 197 Naive Diversification (Part 1)

Lecture 198 Naive Diversification (Part 2)

Lecture 199 The Portfolio Optimization Bot – loading data

Lecture 200 Updating PortfolioTrader

Lecture 201 Naive Diversification – Implementation

Lecture 202 The Portfolio Optimization Bot (Part 2)

Lecture 203 The Portfolio Optimization Bot (Part 3)

Lecture 204 Summary and Conclusion

Section 19: Portfolio Theory, Forward-looking Portfolio Optimization & Pitfalls

Lecture 205 Introduction

Lecture 206 Section Assumptions

Lecture 207 Getting Started

Lecture 208 2-Asset-Case (Intro)

Lecture 209 Portfolio Return (2-Asset-Case)

Lecture 210 Portfolio Risk (2-Asset-Case) – a (too) simple solution

Lecture 211 Crash Course Statistics: Variance and Standard Deviation

Lecture 212 Crash Course Statistics: Covariance and Correlation (Part 1)

Lecture 213 Crash Course Statistics: Covariance and Correlation (Part 2)

Lecture 214 Portfolio Risk (2-Asset-Case)

Lecture 215 Correlation and the Portfolio Diversification Effect

Lecture 216 Multiple Asset Case

Lecture 217 Forward-looking Optimization

Lecture 218 Forward-looking Mean-Variance Optimization (MVO): Pitfalls (1)

Lecture 219 Forward-looking Mean-Variance Optimization (MVO): Pitfalls (2)

Lecture 220 Introduction of a Risk-Free Asset

Lecture 221 The Sharpe Ratio: Graphical Interpretation

Lecture 222 Portfolio Optimization with Risk-free Asset (Part 1)

Lecture 223 Portfolio Optimization with Risk-free Asset (Part 2)

Lecture 224 Implications and the Two-Fund-Theorem

Lecture 225 Coding Challenge

Section 20: Reverse Optimization and the Black-Litterman model

Lecture 226 Introduction and Motivation

Lecture 227 Getting started (Inputs for reverse Optimization)

Lecture 228 Black-Litterman Step 1: Reverse Optimization

Lecture 229 Black-Litterman Step 2: Incorporating Investor Opinions

Lecture 230 Coding Challenge

Section 21: APPENDIX: Python Crash Course

Lecture 231 Introduction and Overview

Lecture 232 Appendix Downloads

Section 22: Appendix 1: Python (& Finance) Basics

Lecture 233 Intro to the Time Value of Money (TVM) Concept (Theory)

Lecture 234 Calculate Future Values (FV) with Python / Compounding

Lecture 235 Calculate Present Values (PV) with Python / Discounting

Lecture 236 Interest Rates and Returns (Theory)

Lecture 237 Calculate Interest Rates and Returns with Python

Lecture 238 Introduction to Variables

Lecture 239 Excursus: How to add inline comments

Lecture 240 Variables and Memory (Theory)

Lecture 241 More on Variables and Memory

Lecture 242 Variables – Dos, Don´ts and Conventions

Lecture 243 The print() Function

Lecture 244 Coding Exercise 1

Lecture 245 TVM Problems with many Cashflows

Lecture 246 Intro to Python Lists

Lecture 247 Zero-based Indexing and negative Indexing in Python (Theory)

Lecture 248 Indexing Lists

Lecture 249 For Loops – Iterating over Lists

Lecture 250 The range Object – another Iterable

Lecture 251 Calculate FV and PV for many Cashflows

Lecture 252 The Net Present Value – NPV (Theory)

Lecture 253 Calculate an Investment Project´s NPV

Lecture 254 Coding Exercise 2

Lecture 255 Data Types in Action

Lecture 256 The Data Type Hierarchy (Theory)

Lecture 257 Excursus: Dynamic Typing in Python

Lecture 258 Build-in Functions

Lecture 259 Integers

Lecture 260 Floats

Lecture 261 How to round Floats (and Integers) with round()

Lecture 262 More on Lists

Lecture 263 Lists and Element-wise Operations

Lecture 264 Slicing Lists

Lecture 265 Slicing Cheat Sheet

Lecture 266 Changing Elements in Lists

Lecture 267 Sorting and Reversing Lists

Lecture 268 Adding and removing Elements from/to Lists

Lecture 269 Mutable vs. immutable Objects (Part 1)

Lecture 270 Mutable vs. immutable Objects (Part 2)

Lecture 271 Coding Exercise 3

Lecture 272 Tuples

Lecture 273 Dictionaries

Lecture 274 Intro to Strings

Lecture 275 String Replacement

Lecture 276 Booleans

Lecture 277 Operators (Theory)

Lecture 278 Comparison, Logical and Membership Operators in Action

Lecture 279 Coding Exercise 4

Lecture 280 Conditional Statements

Lecture 281 Keywords pass, continue and break

Lecture 282 Calculate a Project´s Payback Period

Lecture 283 Introduction to while loops

Lecture 284 Coding Exercise 5

Section 23: Appendix 2: User-defined Functions

Lecture 285 Defining your first user-defined Function

Lecture 286 What´s the difference between Positional Arguments vs. Keyword Arguments?

Lecture 287 How to work with Default Arguments

Lecture 288 The Default Argument None

Lecture 289 How to unpack Iterables

Lecture 290 Sequences as arguments and *args

Lecture 291 How to return many results

Lecture 292 Scope – easily explained

Lecture 293 Coding Exercise 6

Section 24: Appendix 3: Numpy, Pandas, Matplotlib and Seaborn Crash Course

Lecture 294 Modules, Packages and Libraries – No need to reinvent the Wheel

Lecture 295 Numpy Arrays

Lecture 296 Indexing and Slicing Numpy Arrays

Lecture 297 Vectorized Operations with Numpy Arrays

Lecture 298 Changing Elements in Numpy Arrays & Mutability

Lecture 299 View vs. copy – potential Pitfalls when slicing Numpy Arrays

Lecture 300 Numpy Array Methods and Attributes

Lecture 301 Numpy Universal Functions

Lecture 302 Boolean Arrays and Conditional Filtering

Lecture 303 Advanced Filtering & Bitwise Operators

Lecture 304 Determining a Project´s Payback Period with np.where()

Lecture 305 Creating Numpy Arrays from Scratch

Lecture 306 Coding Exercise 7

Lecture 307 How to work with nested Lists

Lecture 308 2-dimensional Numpy Arrays

Lecture 309 How to slice 2-dim Numpy Arrays (Part 1)

Lecture 310 How to slice 2-dim Numpy Arrays (Part 2)

Lecture 311 Recap: Changing Elements in a Numpy Array / slice

Lecture 312 How to perform row-wise and column-wise Operations

Lecture 313 Coding Exercise 8

Lecture 314 Intro to Tabular Data / Pandas

Lecture 315 Create your very first Pandas DataFrame (from csv)

Lecture 316 Pandas Display Options and the methods head() & tail()

Lecture 317 First Data Inspection

Lecture 318 Coding Exercise 9

Lecture 319 Selecting Columns

Lecture 320 Selecting one Column with the “dot notation”

Lecture 321 Zero-based Indexing and Negative Indexing

Lecture 322 Selecting Rows with iloc (position-based indexing)

Lecture 323 Slicing Rows and Columns with iloc (position-based indexing)

Lecture 324 Position-based Indexing Cheat Sheets

Lecture 325 Selecting Rows with loc (label-based indexing)

Lecture 326 Slicing Rows and Columns with loc (label-based indexing)

Lecture 327 Label-based Indexing Cheat Sheets

Lecture 328 Summary, Best Practices and Outlook

Lecture 329 Coding Exercise 10

Lecture 330 First Steps with Pandas Series

Lecture 331 Analyzing Numerical Series with unique(), nunique() and value_counts()

Lecture 332 Analyzing non-numerical Series with unique(), nunique(), value_counts()

Lecture 333 The copy() method

Lecture 334 Sorting of Series and Introduction to the inplace – parameter

Lecture 335 First Steps with Pandas Index Objects

Lecture 336 Changing Row Index with set_index() and reset_index()

Lecture 337 Changing Column Labels

Lecture 338 Renaming Index & Column Labels with rename()

Lecture 339 Filtering DataFrames (one Condition)

Lecture 340 Filtering DataFrames by many Conditions (AND)

Lecture 341 Filtering DataFrames by many Conditions (OR)

Lecture 342 Advanced Filtering with between(), isin() and ~

Lecture 343 Intro to NA Values / missing Values

Lecture 344 Handling NA Values / missing Values

Lecture 345 Exporting DataFrames to csv

Lecture 346 Summary Statistics and Accumulations

Lecture 347 Visualization with Matplotlib (Intro)

Lecture 348 Customization of Plots

Lecture 349 Histogramms (Part 1)

Lecture 350 Histogramms (Part 2)

Lecture 351 Scatterplots

Lecture 352 First Steps with Seaborn

Lecture 353 Categorical Seaborn Plots

Lecture 354 Seaborn Regression Plots

Lecture 355 Seaborn Heatmaps

Lecture 356 Removing Columns

Lecture 357 Introduction to GroupBy Operations

Lecture 358 Understanding the GroupBy Object

Lecture 359 Splitting with many Keys

Lecture 360 split-apply-combine

Section 25: Appendix 4: Advanced Pandas Time Series Topics

Lecture 361 Helpful DatetimeIndex Attributes and Methods

Lecture 362 Filling NA Values with bfill, ffill and interpolation

Lecture 363 Timezones and Converting (Part 1)

Lecture 364 Timezones and Converting (Part 2)

Section 26: What´s next? (outlook and additional resources)

Lecture 365 Bonus Lecture

Beginners who want to start with Cryptocurrencies and want to do it right straight way (avoiding common mistakes).,Cryptorcurreny Traders and Investors who want to professionalize and automate their Business.,Finance & Investment Professionals who want to step into Data-driven Finance.,Data Scientists and Machine Learning Professionals with an interest in Investing into Cryptos.

Course Information:

Udemy | English | 32h 4m | 566.68 MB
Created by: Alexander Hagmann

You Can See More Courses in the Business >> Greetings from

New Courses

Scroll to Top