O'Reilly logo
live online training icon Live Online training

Practical AI for Finance with Python

Build Intelligent solutions for Quantitative Finance with modern Python libraries

Atul Tripathi

Artificial Intelligence techniques for classifying and evaluating risk have an important place in the world of quantitative finance because of their greater power than classical statistical methodologies. Building models is a fluid and creative activity. There are many ways to build a model. The ability to create and understand models is one of the most valued skills in business and finance today. This expertise is highly valued in the area of Quantitative Finance, where numbers are important. Whether one is a veteran, just starting out a career, or still in school, having this expertise can give a competitive advantage.

The course combines relevant material from quantitative finance and sets up its interface to Artificial Intelligence techniques. The intent of this course is to show the tools—the vocabulary and the syntax of model building, for developing a model that works properly. Also, provides with a strong foundation for developing other models.

By the end, you will have a complete understanding of the applications of Artificial Intelligence for Quantitative Trading, Portfolio Theory, and Investment.

What you'll learn-and how you can apply it

  • Apply Artificial Intelligence techniques to solve Quantitative Finance problems such as, Portfolio Theory, Investment Analysis, Derivative Pricing and Risk Management
  • Get familiar with various financial instruments
  • Understand market and trading strategies to develop solutions
  • Create a working, dynamic financial model to make correct projections
  • Understand the mathematical and theoretical background of each topic covered
  • Build models for High-Frequency Trading based
  • Build models for Risk Management techniques such as Value at Risk and Extreme Value Theory

This training course is for you because...

You are a Quant Finance practitioner, HFT Trader, Algorithmic Trader, Portfolio Managers, Financial Engineer or Student who would like to expand your existing skill-sets and knowledge with Artificial Intelligence concepts, practical modeling techniques and best practices in the industry.


  • An interest in solving Quantitative Finance problems
  • Familiarity with Python programming language
  • Familiarity with Data Science & Artificial Intelligence terminologies

Materials, downloads, or Supplemental Content needed in advance:

  • Installed python development environment
  • Initial exploration of the Python language – without the requirement of complete understanding of python

Recommended Preparation

Python for Finance - Second Edition

About your instructor

  • Atul Tripathi has spent more than 16 years in the fields of artificial intelligence, machine learning, and quantitative finance. He has researched, worked and developed models for Value at Risk, Extreme Value Theorem, Option Pricing, and Energy Derivatives using Monte Carlo simulation techniques. He has worked on advanced machine learning techniques, such as neural networks and Markov models. While working on these techniques, he has solved problems related to image processing, telecommunications, human speech recognition, and natural language processing. He has also developed tools for text mining using neural networks.

    He is the author of a book titled Machine Learning Cookbook by PACKT Publication. The book has been translated into Chinese.


The timeframes are only estimates and may vary according to how the class is progressing

Day 1

Section 1: Investment Portfolio Optimization and Efficient Frontier using Python - 10 mins

  • Theory about the application of Python programming for implementing Efficient Frontier, Sharpe Ratio, Monte Carlo

Lab: Building the application using Python – 35 mins

  • Explore historical data which can be leveraged to choose specific mixes of assets based on investment goals
  • Application of the Monte Carlo Method for optimizing a portfolio
  • Evaluate assets based on randomly varying weights
  • Plot expected annual return versus the historical volatility of the portfolio
  • Plot each point which represents portfolio according to the Sharpe Ratio
  • Apply structured approach for selection of asset weights - consider efficient portfolios meeting criteria important to the investor
  • Find the optimum portfolio when an investor is faced with choosing from many assets

Q&A - 5 mins

Break – 10 mins

Section 2: Statistical Learning approach for predicting stock market trends - 10 mins

  • Theory about Neural Network and stock market predictions

Lab: Building the application using Python – 35 min

  • Use statistical learning approach for prediction of stock market trends
  • Make useful stock price predictions
  • Supplement trading strategies with predictions

Q&A - 5 mins

Break – 10 mins

Section 3: Machine Learning-based Time Series Prediction for market price for given the currency - 15 mins

  • Theory about Time Series and currency market

Lab: Building the application using Python – 35 min

  • Use collection of artificial intelligence methods to learn from the training data
  • Build models using Ordinary linear model
  • Build models using Gradient boosting
  • Build models using Deep neural network
  • Build models using Recurrent neural network: LSTM, GRU, one or multi-layered
  • Build models using Convolutional neural network for 1-dimensional data

Q&A - 5mins

Break – 10 mins

Section 4: Monte Carlo Simulations for pricing American and European Options using the Binomial Option Pricing Model - 15 mins

  • Theory about Monte Carlo Simulations, American Options, European options, Binomial Trees

Lab: Building the application using Python – 35 min

  • Trade real options European and American
  • Simulations using Monte Carlo Simulations
  • Simulating Binomial Trees

Q&A - 5 mins


Section 5: Machine Learning-based pairs trading strategy - 10 mins

  • Theory about Stochastic Volatility, Gaussian Process Regression, Recurrent Neural Network, Moving Average Reversion and pairs trading strategy

Lab: Building the application using Python – 35 min

  • Identifying similar pairs of stocks
  • Use of Long Short-Term Memory (LSTM) Recurrent Neural Network (RNN) for training on the closing price of time series data
  • Application of the Bayesian model to describe the time-varying nature of volatility in which the returns are T-distributed with a variance that follows a Gaussian Random Walk
  • Application of On-Line Moving Average Reversion

Q&A - 5 mins

Break – 10 mins

Section 6: Monte Carlo Simulations for pricing Greeks using Antithetic Variance Reduction Techniques - 10 mins

  • Theory about Monte Carlo Simulations, Greeks, Antithetic Variance Reduction Techniques

Lab: Building the application using Python – 35 min

  • Greeks pricing strategies
  • Simulations using Monte Carlo Simulations
  • Variance Reduction Techniques

Q&A - 5 mins

Break – 10 mins

Section 7: Signal detection for quantitative trading strategies - 10 mins

  • Theory about MACD oscillator, Heikin-Ashi rules, London Breakout, Dual thrust Parabolic SAR, Bollinger Bands Pattern Recognition, Relative Strength Index Pattern Recognition

Lab: Building the application using Python – 35 min

  • Use the signaling techniques and pattern recognition to learn about trading strategies
  • Use momentum trading, opening range breakout and statistical arbitrage strategies

Q&A - 5 mins

Break – 10 mins

Section 8: Artificial Intelligence based high-frequency algorithmic trading module - 15 mins

  • Theory about Q-learning and high-frequency algorithmic trading

Lab: Building the application using Python – 40 min

  • Use of a stack of financial indicators which is consumed by a Q-learning algorithm which determines an Agent's action at a given step in the stream of financial quotes
  • Sampling of the time series quotes to discover trends along any sort of time interval

Q&A - 5 mins