Knowledge is best gained from hands-on experience and interactive tinkering.

Abstract visualization of data and insights

Our approach

We believe that knowledge is best built and solidified by fiddling, tinkering with code, algorithms, and formulas, to get a hands-on “feeling” for the abstract relations that govern complex systems. Our courses consist of interactive notebooks that run directly in the browser and allow the participants to completely reproduce the content of lectures and exercises on their own, and further to extend it, change it, and adapt it to their problems at hand. Especially for highly technical or mathematical topics, we believe that a code-first approach is superior to a lengthy discussion of mathematical backgrounds. We find that participants often understand the mathematical details of a problem better after coding and simulating the problem at hand.

Self-study online course

Invest with Code Logo

Investing is not a guessing game, and investment decisions should be made in a rational, data-driven manner. Our interactive online course “Invest with Code” will teach you basic as well as advanced methods used in quantitative investing via interactive Python code examples. We believe that programming offers an easy approach to math-heavy subjects, as code snippets can be interactively tested and fiddled with to build an intuitive understanding of the inner workings of even very complex mathematical models.

The course runs directly in your browser, no installation of Python or other applications needed! Get started in seconds!

Abstract visualization of data and insights

Target audience

Anyone with an interest in investing and programming! You may already have a background in finance, for example as a financial advisor or portfolio manager and are interested in quantitative methods of investing. Or you may want to properly organize your private investments with the help of a bit of Python coding.

Requirements

Participants should have some coding experience in any programming language to follow the code examples. The first lecture will introduce the basics of the Python language alongside the first code examples.

Chapter 1

The first chapter introduces the absolute basics of any investment strategy and discusses problems that investors regularly face. By that, we motivate the use of a number of quantitative methods that will help you build solutions which are specifically tailored to your own financial requirements.

  • How to calculate profit and loss?
  • How to estimate the risk of investing in different assets?
  • How to account for the costs of frequent trading?
  • If stocks only go up in the longterm, why shouldn’t we simply invest in a leveraged stock index ETF?
  • Why shouldn’t we simply invest in a mix of stocks and government bonds?
  • The S&P 500 curiously makes most of its profits overnight, when the market is closed. Can we exploit that?

Chapter 2

The second chapter focuses on the statistics behind price fluctuations on financial markets. Do not worry, we will always take an interactive, simulation-based approach to learn about the more theoretical aspects of finance, not a math-heavy approach!

  • What is skewness and why is it hard to estimate?
  • Risk of ruin and its connection to skewness
  • Power law theory and how it affects our ability to forecast risk
  • Risk estimation using Bayesian regime-switching models

Chapter 3

In the third chapter, we will focus on portfolio optimization and first recapitulate and implement the traditional mean-variance portfolio optimization approach. We will learn about benefits and shortcomings of this approach, before we venture into a more flexible, simulation-based approach that optimizes portfolio holdings with respect to any investor-relevant metric.

  • How to capture non-linear asset correlations in portfolio optimization
  • The role of withdrawals and draw downs in portfolio optimization
  • How to optimize portfolios with respect to (almost) arbitrary objectives

Chapter 4

In Chapter 4, we will combine the lessons that we have learned in the pervious chapters to create actively managed portfolios that react to macroeconomic changes to avoid drawdowns and maximize returns. We will adapt the Bayesian regime switch model from Chapter 2 to yield a probabilistic, regime-switching capital asset pricing model that tells us the probability that a given asset currently outperforms the global stock market.

  • How to diversify across asset classes (intro to Ray Dalio’s All-Weather Portfolio)
  • From Bayesian statistics to allocation weights
  • Simulating an active investment strategy

Chapter 5

In Chapter 5, we will venture into the derivative market of futures contracts to showcase how trading futures differs from trading equities. At the end of this chapter, you will know the concept of leveraged trading and how to develop an active crypto futures trading strategy that employs basic as well as more elaborate trend-following indicators.

  • Intro to long/short futures portfolios
  • Tuning portfolio risk with futures
  • Crypto futures as an entry point to quantitiative trading
  • Basic trading indicators and bet sizing

Chapter 6

In the final chapter, we will focus on DevOps, that means how you can structure the code that you use for investing in a full-fledged Python package that runs reliably on your home machine or on a server to execute portfolio optimization or trading strategies in an automated manner.

  • Python package management
  • Best practices for reliable production code
  • Troubleshooting and automatic notifications