Machine Learning and AI
An intuitive Introduction
2020 Copyright QuantUniversity LLC.
Presented By:
Sri Krishnamurthy, CFA, CAP
sri@quantuniversity.com
www.qu.academy
Oct 27thth, 2020
Online
2
Speaker bio
• Advisory and Consultancy for Financial
Analytics
• Prior Experience at MathWorks, Citigroup
and Endeca and 25+ financial services and
energy customers.
• Columnist for the Wilmott Magazine
• Author of forthcoming book
“Pragmatic AI and ML in Finance”
• Teaches AI/ML and Fintech Related topics in
the MS and MBA programs at Northeastern
University, Boston
• Reviewer: Journal of Asset Management
Sri Krishnamurthy
Founder and CEO
QuantUniversity
3
QuantUniversity
• Boston-based Data Science, Quant
Finance and Machine Learning
training and consulting advisory
• Trained more than 1000 students in
Quantitative methods, Data Science
and Big Data Technologies using
MATLAB, Python and R
• Building a platform for AI
and Machine Learning
Experimentation
1. Key trends in AI, Machine Learning & Fintech
2. An intuitive introduction to AI and ML
3. Case study
▫ Alternative investments: Interest rate predication for Peer-to-Peer
Market places using ML techniques
▫ Scenario analysis: Synthetic VIX data generation using Neural
Networks
Agenda
AI and Machine Learning in Finance
6
The 4th Industrial revolution is Here!
Source: Christoph Roser at AllAboutLean.com
As per Wikipedia*, “The 4th Industrial Revolution ….. marked by emerging technology breakthroughs in a
number of fields, including robotics, artificial intelligence, nanotechnology, quantum computing, biotechnology,
the Internet of Things, the Industrial Internet of Things (IIoT), decentralized consensus, fifth-generation wireless
technologies (5G), additive manufacturing/3D printing and fully autonomous vehicles.”
* https://en.wikipedia.org/wiki/Fourth_Industrial_Revolution
7
Scientists are disrupting the way we live!
Source: https://www.ladn.eu/tech-a-suivre/mobilite-2030-vehicules-volants-open-data/
8
Interest in Machine learning continues to grow
https://www.wipo.int/edocs/pubdocs/en/wipo_pub_1055.pdf
9
MACHINE LEARNING AND AI IS REVOLUTIONIZING FINANCE
10
Market impact at the speed of light!
10
11
• Machine learning is the scientific study of algorithms and statistical
models that computer systems use to effectively perform a specific task
without using explicit instructions, relying on patterns and inference
instead1
• Artificial intelligence is intelligence demonstrated by machines, in
contrast to the natural intelligence displayed by humans and animals1
Defining Machine Learning and AI
11
1. https://en.wikipedia.org/wiki/Machine_learning
2. Figure Source: http://www.fsb.org/wp-content/uploads/P011117.pdf
12
Machine Learning & AI in finance: A paradigm shift
12
Stochastic
Models
Factor Models
Optimization
Risk Factors
P/Q Quants
Derivative pricing
Trading Strategies
Simulations
Distribution
fitting
Quant
Real-time analytics
Predictive analytics
Machine Learning
RPA
NLP
Deep Learning
Computer Vision
Graph Analytics
Chatbots
Sentiment Analysis
Alternative Data
Data Scientist
13
The Virtuous Circle of
Machine Learning and AI
13
Smart
Algorithms
Hardware
Data
14
The rise of Big Data and Data Science
14
Image Source: http://www.ibmbigdatahub.com/sites/default/files/infographic_file/4-Vs-of-big-data.jpg
15
Smart Algorithms
15
Distributing Computing Frameworks Deep Learning Frameworks
1. Our labeled datasets were thousands of times too
small.
2. Our computers were millions of times too slow.
3. We initialized the weights in a stupid way.
4. We used the wrong type of non-linearity.
- Geoff Hinton
“Capital One was able to determine fraudulent credit
card applications in 100 milliseconds”*
* http://go.databricks.com/hubfs/pdfs/Databricks-for-FinTech-170306.pdf
16
Hardware
Speed up calculations with
1000s of processors
Scale computations with
infinite compute power
17
“Financial Technologies or “Fintech” is used to describe
a variety of
innovative business models
and
emerging technologies
that have the potential to transform the financial
services industry ”
Technology drives finance!
https://www.iosco.org/library/pubdocs/pdf/IOSCOPD554.pdf
18
http://www.analyticscertificate.com/fintech/
19
http://www.analyticscertificate.com/fintech/
20
http://www.analyticscertificate.com/fintech/
21
http://www.analyticscertificate.com/fintech/
22
Source: https://www.cbinsights.com/research/artificial-intelligence-top-startups/
23
• Automation to increase
• Digital transformation and move to the cloud finally happening
• Use of Synthetic data to increase
• Edge cases of AI put to truth test!
• Fintechs feeling the pressure to prove themselves!
• Human-in-the-loop AI to regain focus!
The changes have been drastic and sudden! What’s in
store for the industry is yet to be seen!
What does Covid2019 mean to adoption of AI and ML in
Financial services?
25
Let’s get under the hood
25
Source: https://www.pikrepo.com/fcsda/yellow-hot-rod-car-with-hood-open
Machine Learning Workflow
Data Scraping/
Ingestion
Data
Exploration
Data Cleansing
and Processing
Feature
Engineering
Model
Evaluation
& Tuning
Model
Selection
Model
Deployment/
Inference
Supervised
Unsupervised
Modeling
Data Engineer, Dev Ops Engineer
Data Scientist/QuantsSoftware/Web Engineer
• AutoML
• Model Validation
• Interpretability
Robotic Process Automation (RPA) (Microservices, Pipelines )
• SW: Web/ Rest API
• HW: GPU, Cloud
• Monitoring
• Regression
• KNN
• Decision Trees
• Naive Bayes
• Neural Networks
• Ensembles
• Clustering
• PCA
• Autoencoder
• RMS
• MAPS
• MAE
• Confusion Matrix
• Precision/Recall
• ROC
• Hyper-parameter
tuning
• Parameter Grids
Risk Management/ Compliance(All stages)
Analysts&
DecisionMakers
27
28
29
Claim:
• Machine learning is better for fraud
detection, looking for arbitrage
opportunities and trade execution
Caution:
• Beware of imbalanced class problems
• A model that gives 99% accuracy may still
not be good enough
1. Machine learning is not a generic solution to all problems
30
Claim:
• Our models work on
datasets we have tested on
Caution:
• Do we have enough data?
• How do we handle bias in
datasets?
• Beware of overfitting
• Historical Analysis is not
Prediction
2. A prototype model is not your production model
31
AI and Machine Learning in Production
https://www.itnews.com.au/news/hsbc-societe-generale-run-
into-ais-production-problems-477966
Kristy Roth from HSBC:
“It’s been somewhat easy - in a funny way - to
get going using sample data, [but] then you hit
the real problems,” Roth said.
“I think our early track record on PoCs or pilots
hides a little bit the underlying issues.
Matt Davey from Societe Generale:
“We’ve done quite a bit of work with RPA
recently and I have to say we’ve been a bit
disillusioned with that experience,”
“the PoC is the easy bit: it’s how you get that
into production and shift the balance”
32
Claim:
• It works. We don’t know how!
Caution:
• It’s still not a proven science
• Interpretability or “auditability” of
models is important
• Transparency in codebase is paramount
with the proliferation of opensource
tools
• Skilled data scientists who are
knowledgeable about algorithms and
their appropriate usage are key to
successful adoption
3. We are just getting started!
33
Claim:
• Machine Learning models are
more accurate than
traditional models
Caution:
• Is accuracy the right metric?
• How do we evaluate the
model? RMS or R2
• How does the model behave
in different regimes?
4. Choose the right metrics for evaluation
34
Claim:
• Machine Learning and AI will replace
humans in most applications
Caution:
• Beware of the hype!
• Just because it worked sometimes
doesn’t mean that the organization can
be on autopilot
• Will we have true AI or Augmented
Intelligence?
• Model risk and robust risk
management is paramount to the
success of the organization.
• We are just getting started!
5. The Robots are coming!
https://www.bloomberg.com/news/articles/2017-10-20/automation-
starts-to-sweep-wall-street-with-tons-of-glitches
#Disrupt19
Alternative investments: Interest rate predication for Peer-to-Peer Market places using ML
techniques
36
How Lending club works?
https://www.lendingclub.com/public/how-peer-lending-
works.action
37
The Data
37
https://www.kaggle.com/wendykan/lending-club-loan-data
38
Credit Risk pipeline
Data Ingestion
from Lending
Club
Pre-Processing
Feature
Engineering
Model
Development
and Tuning
Model
Deployment
Stage 1 Stage 2 Stage 3 Stage 4 Stage 5
39
39
#Disrupt19
Synthetic VIX data generation using Neural Networks
41
All scenarios haven’t
played out
• Stress scenarios
• What-if scenarios
Challenges with real datasets
Figure ref: http://www.actuaries.org/CTTEES_SOLV/Documents/StressTestingPaper.pdf
42
Missing values
• Missing at random
• Missing sequences
• Need data to fill frames
Challenges with real datasets
43
• Access
▫ Hard to find
▫ Rare class problems
▫ Privacy concerns
making it difficult to
share
Challenges with real datasets
44
Imbalanced
• Need more samples of rare
class
• Need proxies for data points
that were not observed or
recorded
Challenges with real datasets
45
Labels
• Human labeling is hard
• Synthetic label generators
Challenges with real datasets
46
GAN
https://developers.google.com/machine-
learning/gan/gan_structure
47
48
Demo: Synthetic VIX generation
Extreme scenario generation
Register at
https://qufallschool.splashthat.com/
Classes start
Oct 2020
49
Thank you!
Sri Krishnamurthy, CFA, CAP
Founder and CEO
QuantUniversity LLC.
srikrishnamurthy
www.qu.academy
Contact
Information, data and drawings embodied in this presentation are strictly a property of QuantUniversity LLC. and shall not be
distributed or used in any other publication without the prior written consent of QuantUniversity LLC.
50

Ml master class northeastern university

  • 1.
    Machine Learning andAI An intuitive Introduction 2020 Copyright QuantUniversity LLC. Presented By: Sri Krishnamurthy, CFA, CAP sri@quantuniversity.com www.qu.academy Oct 27thth, 2020 Online
  • 2.
    2 Speaker bio • Advisoryand Consultancy for Financial Analytics • Prior Experience at MathWorks, Citigroup and Endeca and 25+ financial services and energy customers. • Columnist for the Wilmott Magazine • Author of forthcoming book “Pragmatic AI and ML in Finance” • Teaches AI/ML and Fintech Related topics in the MS and MBA programs at Northeastern University, Boston • Reviewer: Journal of Asset Management Sri Krishnamurthy Founder and CEO QuantUniversity
  • 3.
    3 QuantUniversity • Boston-based DataScience, Quant Finance and Machine Learning training and consulting advisory • Trained more than 1000 students in Quantitative methods, Data Science and Big Data Technologies using MATLAB, Python and R • Building a platform for AI and Machine Learning Experimentation
  • 4.
    1. Key trendsin AI, Machine Learning & Fintech 2. An intuitive introduction to AI and ML 3. Case study ▫ Alternative investments: Interest rate predication for Peer-to-Peer Market places using ML techniques ▫ Scenario analysis: Synthetic VIX data generation using Neural Networks Agenda
  • 5.
    AI and MachineLearning in Finance
  • 6.
    6 The 4th Industrialrevolution is Here! Source: Christoph Roser at AllAboutLean.com As per Wikipedia*, “The 4th Industrial Revolution ….. marked by emerging technology breakthroughs in a number of fields, including robotics, artificial intelligence, nanotechnology, quantum computing, biotechnology, the Internet of Things, the Industrial Internet of Things (IIoT), decentralized consensus, fifth-generation wireless technologies (5G), additive manufacturing/3D printing and fully autonomous vehicles.” * https://en.wikipedia.org/wiki/Fourth_Industrial_Revolution
  • 7.
    7 Scientists are disruptingthe way we live! Source: https://www.ladn.eu/tech-a-suivre/mobilite-2030-vehicules-volants-open-data/
  • 8.
    8 Interest in Machinelearning continues to grow https://www.wipo.int/edocs/pubdocs/en/wipo_pub_1055.pdf
  • 9.
    9 MACHINE LEARNING ANDAI IS REVOLUTIONIZING FINANCE
  • 10.
    10 Market impact atthe speed of light! 10
  • 11.
    11 • Machine learningis the scientific study of algorithms and statistical models that computer systems use to effectively perform a specific task without using explicit instructions, relying on patterns and inference instead1 • Artificial intelligence is intelligence demonstrated by machines, in contrast to the natural intelligence displayed by humans and animals1 Defining Machine Learning and AI 11 1. https://en.wikipedia.org/wiki/Machine_learning 2. Figure Source: http://www.fsb.org/wp-content/uploads/P011117.pdf
  • 12.
    12 Machine Learning &AI in finance: A paradigm shift 12 Stochastic Models Factor Models Optimization Risk Factors P/Q Quants Derivative pricing Trading Strategies Simulations Distribution fitting Quant Real-time analytics Predictive analytics Machine Learning RPA NLP Deep Learning Computer Vision Graph Analytics Chatbots Sentiment Analysis Alternative Data Data Scientist
  • 13.
    13 The Virtuous Circleof Machine Learning and AI 13 Smart Algorithms Hardware Data
  • 14.
    14 The rise ofBig Data and Data Science 14 Image Source: http://www.ibmbigdatahub.com/sites/default/files/infographic_file/4-Vs-of-big-data.jpg
  • 15.
    15 Smart Algorithms 15 Distributing ComputingFrameworks Deep Learning Frameworks 1. Our labeled datasets were thousands of times too small. 2. Our computers were millions of times too slow. 3. We initialized the weights in a stupid way. 4. We used the wrong type of non-linearity. - Geoff Hinton “Capital One was able to determine fraudulent credit card applications in 100 milliseconds”* * http://go.databricks.com/hubfs/pdfs/Databricks-for-FinTech-170306.pdf
  • 16.
    16 Hardware Speed up calculationswith 1000s of processors Scale computations with infinite compute power
  • 17.
    17 “Financial Technologies or“Fintech” is used to describe a variety of innovative business models and emerging technologies that have the potential to transform the financial services industry ” Technology drives finance! https://www.iosco.org/library/pubdocs/pdf/IOSCOPD554.pdf
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
    23 • Automation toincrease • Digital transformation and move to the cloud finally happening • Use of Synthetic data to increase • Edge cases of AI put to truth test! • Fintechs feeling the pressure to prove themselves! • Human-in-the-loop AI to regain focus! The changes have been drastic and sudden! What’s in store for the industry is yet to be seen! What does Covid2019 mean to adoption of AI and ML in Financial services?
  • 25.
    25 Let’s get underthe hood 25 Source: https://www.pikrepo.com/fcsda/yellow-hot-rod-car-with-hood-open
  • 26.
    Machine Learning Workflow DataScraping/ Ingestion Data Exploration Data Cleansing and Processing Feature Engineering Model Evaluation & Tuning Model Selection Model Deployment/ Inference Supervised Unsupervised Modeling Data Engineer, Dev Ops Engineer Data Scientist/QuantsSoftware/Web Engineer • AutoML • Model Validation • Interpretability Robotic Process Automation (RPA) (Microservices, Pipelines ) • SW: Web/ Rest API • HW: GPU, Cloud • Monitoring • Regression • KNN • Decision Trees • Naive Bayes • Neural Networks • Ensembles • Clustering • PCA • Autoencoder • RMS • MAPS • MAE • Confusion Matrix • Precision/Recall • ROC • Hyper-parameter tuning • Parameter Grids Risk Management/ Compliance(All stages) Analysts& DecisionMakers
  • 27.
  • 28.
  • 29.
    29 Claim: • Machine learningis better for fraud detection, looking for arbitrage opportunities and trade execution Caution: • Beware of imbalanced class problems • A model that gives 99% accuracy may still not be good enough 1. Machine learning is not a generic solution to all problems
  • 30.
    30 Claim: • Our modelswork on datasets we have tested on Caution: • Do we have enough data? • How do we handle bias in datasets? • Beware of overfitting • Historical Analysis is not Prediction 2. A prototype model is not your production model
  • 31.
    31 AI and MachineLearning in Production https://www.itnews.com.au/news/hsbc-societe-generale-run- into-ais-production-problems-477966 Kristy Roth from HSBC: “It’s been somewhat easy - in a funny way - to get going using sample data, [but] then you hit the real problems,” Roth said. “I think our early track record on PoCs or pilots hides a little bit the underlying issues. Matt Davey from Societe Generale: “We’ve done quite a bit of work with RPA recently and I have to say we’ve been a bit disillusioned with that experience,” “the PoC is the easy bit: it’s how you get that into production and shift the balance”
  • 32.
    32 Claim: • It works.We don’t know how! Caution: • It’s still not a proven science • Interpretability or “auditability” of models is important • Transparency in codebase is paramount with the proliferation of opensource tools • Skilled data scientists who are knowledgeable about algorithms and their appropriate usage are key to successful adoption 3. We are just getting started!
  • 33.
    33 Claim: • Machine Learningmodels are more accurate than traditional models Caution: • Is accuracy the right metric? • How do we evaluate the model? RMS or R2 • How does the model behave in different regimes? 4. Choose the right metrics for evaluation
  • 34.
    34 Claim: • Machine Learningand AI will replace humans in most applications Caution: • Beware of the hype! • Just because it worked sometimes doesn’t mean that the organization can be on autopilot • Will we have true AI or Augmented Intelligence? • Model risk and robust risk management is paramount to the success of the organization. • We are just getting started! 5. The Robots are coming! https://www.bloomberg.com/news/articles/2017-10-20/automation- starts-to-sweep-wall-street-with-tons-of-glitches
  • 35.
    #Disrupt19 Alternative investments: Interestrate predication for Peer-to-Peer Market places using ML techniques
  • 36.
    36 How Lending clubworks? https://www.lendingclub.com/public/how-peer-lending- works.action
  • 37.
  • 38.
    38 Credit Risk pipeline DataIngestion from Lending Club Pre-Processing Feature Engineering Model Development and Tuning Model Deployment Stage 1 Stage 2 Stage 3 Stage 4 Stage 5
  • 39.
  • 40.
    #Disrupt19 Synthetic VIX datageneration using Neural Networks
  • 41.
    41 All scenarios haven’t playedout • Stress scenarios • What-if scenarios Challenges with real datasets Figure ref: http://www.actuaries.org/CTTEES_SOLV/Documents/StressTestingPaper.pdf
  • 42.
    42 Missing values • Missingat random • Missing sequences • Need data to fill frames Challenges with real datasets
  • 43.
    43 • Access ▫ Hardto find ▫ Rare class problems ▫ Privacy concerns making it difficult to share Challenges with real datasets
  • 44.
    44 Imbalanced • Need moresamples of rare class • Need proxies for data points that were not observed or recorded Challenges with real datasets
  • 45.
    45 Labels • Human labelingis hard • Synthetic label generators Challenges with real datasets
  • 46.
  • 47.
  • 48.
    48 Demo: Synthetic VIXgeneration Extreme scenario generation
  • 49.
  • 50.
    Thank you! Sri Krishnamurthy,CFA, CAP Founder and CEO QuantUniversity LLC. srikrishnamurthy www.qu.academy Contact Information, data and drawings embodied in this presentation are strictly a property of QuantUniversity LLC. and shall not be distributed or used in any other publication without the prior written consent of QuantUniversity LLC. 50