Algorithmic risk management in trading and investing
Published by O'Reilly Media, Inc.
Analyze and manage your financial risks using Python
The key to success in risky investments is proactively and systematically managing expected losses so that they don’t overwhelm expected profits in the long run. Value at risk (VaR) and expected shortfall (ES) are risk measures used extensively by financial institutions, regulators, and corporate treasurers in nonfinancial institutions. Similarly, volatility and beta—foundational risk measures upon which modern portfolio theory (MPT) is built—are used extensively by institutional and individual investors. It’s imperative to understand the drawbacks of using these measures to manage risks in portfolios.
Join expert Deepak Kanungo to explore the concepts, processes, and tools for developing algorithmic risk-management strategies such as the Kelly criterion—which is used by great investors like Warren Buffett and Edward Thorpe but isn’t taught in academia or professional training organizations like the CFA. You’ll dive into the advantages and disadvantages of algorithmic risk management, learn how to import, analyze, and visualize data from the market, apply the Kelly Criterion to size trades, and more—all using Python and its libraries.
Note: Live trading is out of the scope of the course.
What you’ll learn and how you can apply it
By the end of this live, hands-on, online course, you’ll understand:
- The advantages and disadvantages of algorithmic risk management
- The strengths and weaknesses of VaR, adjusted VaR, and conditional VaR/ES
- Why maximizing expected value of trades and investments risks ruin and why volatility and beta are inadequate measures of risk
- The pros and cons of the Kelly criterion and Markowitz’s capital allocation strategies
- The importance of sizing your trades and investments
- The concepts, process, and tools for developing risk-management strategies
And you’ll be able to:
- Import, analyze, and visualize data from the market using the pandas library as well as fundamental and alternative sources available for free on the web
- Estimate Var and ES using Monte Carlo simulations
- Analyze past trades to estimate your edge and odds
- Apply the Kelly criterion to size trades
- Build a portfolio of stocks using MPT
- Analyze and design your own specific risk-management strategies in Python
This live event is for you because...
- You’re an investor, trader, financial analyst, or risk manager who wants to develop algorithmic risk management strategies.
Prerequisites
- General knowledge of Python and pandas DataFrames
- A basic understanding of probability and statistics
- Create an empty Google Colab document before the course
Recommended preparation:
- Read “Seeing Theory” for a visual overview of probability and statistics
- Read Chapter 1 “Getting Started with pandas Using Wakari.io” in Mastering pandas for Finance (book)
- Read Chapter 16 “Automated Trading” in Python for Finance, 2nd Edition (book)
- Read Chapter 12 “Value at Risk and Expected Shortfall” in Risk Management and Financial Institutions, 4th Edition (book)
Recommended follow-up:
- Read Python for Finance, 2nd Edition (book)
- Read Risk Management and Financial Institutions, 4th Edition (book)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Quantifying risks in trading and investing (55 minutes)
- Group discussion: What’s your investing, trading, and Python experience?
- Lecture: Risk measures such as volatility, beta, VaR, adjusted VaR, and ES; algorithmic characteristics of a good risk measure
- Hands-on exercises: Set up Colab notebook; create pandas DataFrames to import data; calculate, analyze, and visualize various risk measures
- Q&A
- Break (5 minutes)
Using Monte Carlo simulations to estimate VaR and ES (55 minutes)
- Lecture: Methods to estimate VaR, modified VaR, and ES; strengths and weaknesses
- Hands-on exercise: Use pandas DataFrames and Monte Carlo simulations to estimate VaR and ES for stocks and portfolios
- Q&A
- Break (5 minutes)
Applying the Kelly criterion and MPT to trading and investing (50 minutes)
- Lecture: The Kelly criterion; how it differs from the Markowitz mean-variance theory; its strengths and weaknesses
- Hands-on exercises: Use pandas DataFrames to analyze and visualize portfolios using MPT; use Monte Carlo simulations to demonstrate how the Kelly position sizing outperforms other capital allocation strategies
Wrap-up and Q&A (10 minutes)
Your Instructor
Deepak K. Kanungo
Deepak K. Kanungo is an algorithmic derivatives trader, educator, and CEO and founder of Hedged Capital LLC, an AI-powered proprietary trading company. He’s also the author of the award-winning Probabilistic Machine Learning for Finance and Investing: A Primer to Generative AI with Python and teaches the O’Reilly on-demand course Hands-On Algorithmic Trading with Python. He has taught tens of thousands of traders and investors the concepts, processes, and machine learning technologies for algorithmic trading, investing, and finance with Python. Long before machine learning was an industry buzzword, Deepak invented a probabilistic machine learning method and software system for managing the risks and returns of project portfolios—a framework that has been cited by IBM, Accenture, Fujitsu, among many others. Previously, he was a financial advisor at Morgan Stanley, a Silicon Valley fintech entrepreneur, a director in the Global Planning Department at Mastercard International, and a senior analyst with Diamond Technology Partners. He was educated at Princeton University (astrophysics) and the London School of Economics (finance and information systems).