0% found this document useful (0 votes)
33 views28 pages

Machine Learning for Trading Strategies

Uploaded by

sherlockplus650b
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views28 pages

Machine Learning for Trading Strategies

Uploaded by

sherlockplus650b
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Courses in this Machine

Learning series
1. Introduction to Trading with
Machine Learning on Google
Cloud (this course)

2. Using Machine Learning in Trading


and Finance

3. Reinforcement Learning for


Trading Strategies
Recommended target
audience
● Data analysts, data scientists, and
machine learning engineers that want
to learn how to apply their knowledge
to financial use cases, specifically
trading, using Google Cloud

● Financial advisors and traders who are


interested in applying Machine
Learning for trading strategies and
decision making. These individuals will
need to have previous knowledge of
the foundational concepts of ML.
Module Overview: Intro to Trading with Machine
Learning on Google Cloud
● Machine Learning in Finance and
your first model using Google Cloud

● Trading Fundamentals: Quant


Theory, Arbitrage, and Back-testing

● Supervised Learning with BigQuery


ML and ARIMA models

● Introduction to Neural Networks and


Deep Learning
Specific Qwiklabs you will complete in this intro course
● Building a Regression Model in AI Platform Notebooks with Python
○ Load data from BigQuery into a Pandas DataFrame
○ Build a linear regression model in Scikit-Learn

● Building a Regression Model in BigQuery ML for AAPL Stock Data


○ Use SQL and BigQuery ML to build and evaluate AAPL stock model

● Building an ARIMA Model for a Financial Dataset


○ Pull data from Google Cloud Storage into a Pandas dataframe
○ Learn how to prepare raw stock closing data for an ARIMA model
○ Apply the Dickey-Fuller test
○ Build an ARIMA model using the statsmodels library
Lab environment will be actual Google Cloud accounts
Each lab provides you a real
Google Cloud project for a
limited time

You will have two browser


windows:
● One with a lab
walkthrough,
● Another is Google Cloud at
[Link]
We will use Python3 in Jupyter Notebooks on AI Platform

Each lab corresponds to a


public .ipynb file that you will
work through

All lab instructions and code


are publicly available:
[Link]
oudPlatform/training-data-a
nalyst/tree/master/courses/a
i-for-finance
What is not covered in this intro course
● Building and implementing the next highly-profitable DJIA futures high-frequency
trading algorithm

● Modeling with TensorFlow 2.X → That is course #2 in this series

● Advanced ML and data science topics → courses #2 and #3


○ Hyperparameter tuning
○ LSTM time-series models
○ Reinforcement learning models

● Prerequisites
○ Python basics → See References links
○ Machine learning 101 (what are features etc.) → See References links
A Brief History of Machine
Learning in Quantitative
Trading and Finance
Learning Objectives
● Distinguish between the three
types of data-driven analysis

● Identify the major use cases for


ML in trading, investment and
finance

● Identify applications with the


highest growth potential for ML
and AI
Agenda
Evolution of quantitative
modeling techniques

Machine learning history and


use cases

Where is the use of ML likely to


grow the most?
Early approaches use static
data models and statistics
1. Financial markets are simple, relatively
static, data generating processes
2. Use historical data and a statistical
algorithm to identify features and loadings
that approximate this process
3. Integrate the model into an
order-execution strategy
4. Monitor PnL and shut down if loss exceeds
tolerance
5. Start creating a new market model
Modern approaches use Machine
Learning to model fluid market
behaviors and complexity
1. Financial markets are a dynamic, evolving
collection of behaviors
2. Use historical data to train a model and
adjusts features and loadings to improve
predictive power
3. Integrate the model into an
order-execution strategy
4. Retrain and retest continually with new
data to capture the market’s current state
Reinforcement Learning attempts
to mimic human intelligence
1. Financial markets are a dynamic, evolving
collection of behaviors
2. Use historical data to create a set of
policies for an agent that distinguishes
good from bad decisions in all market
states
3. Allow the agent to automatically adjust
strategy based on previous experience
and the market’s current state
4. Monitor PnL and shut down if exceeds loss
tolerance
Agenda
Evolution of quantitative
modeling techniques

Machine learning history and


use cases

Where is the use of ML likely to


grow the most?
Machine Learning Use Cases

● Algorithmic trading

● Portfolio management

● Loan underwriting

● Fraud detection
AI and ML in Algorithmic
Trading
● Pattern Formation

● Predictive Trading

● Increased Trading Speed (HFT)


Use of AI and ML in Algorithmic Trading Timeline
● 1982 James Simons starts quant investment firm Renaissance Technologies
● 1987 Black Monday 22% one-day crash in S&P 500 caused by automated “program
trading”
● 1988 David Shaw founds D.E. Shaw and is an early adopter of AI among its hedge funds
● 2010 Flash Crash occurs on May 6. In 36 minutes, the S&P crashed 8%, before a rebound
● 2012 Knight Capital loses $440 million in 45 minutes after deploying unverified
trading software
● 2017 Two Sigma hedge fund which uses ML, crosses the $50 billion in assets under
management
● 2018 Renaissance Technologies, citing reduced profitability, reduces the use of
pattern-based strategies for futures trading in its Renaissance Institutional Diversified
Alpha (RIDA) fund by more than 60%
Portfolio Management

● Robo advisors

● User created profiles

● Tailored portfolio allocations for


the mass market

● Lower fees
Loan Underwriting

● Individual borrower credit data

● Demographic clusters and trends

● Constant recalibration of credit


allocations and interest rates

● Require large historical and


current data sets
Fraud Detection

● Growing number of transactions


and users

● Require detailed user transaction


history

● Real time fraud prevention

● Loss minimization
Agenda
Evolution of quantitative
modeling techniques

Machine learning history and


use cases

Where is the use of ML likely to


grow the most?
High Potential ML Use Cases

● Financial products
recommendation (Robo-advising)

● Sentiment analysis

● Security
High Potential ML Use Cases

● Financial products
recommendation (Robo-advising)

● Sentiment analysis

● Security
High Potential ML Use Cases

● Financial products
recommendation (Robo-advising)

● Sentiment analysis

● Security
ML Potential Downsides

● ML models are difficult to


interpret

● Relationship between predictions


and factors is unclear

● Lending decisions can’t be tied to


specific borrower credit data

● Possible discrimination based on


prohibited criteria
Improving ML Model Interpretability

● Unlocking the black box

● Relating individual predictions to


entire model

● Explainable AI

How to deploy interpretable models on


Google Cloud Platform

Explainable AI code
Recap
● Choosing what to model depends on
what your goal is and what data you
have available
● Exogenous = fundamental data on
performance and competitiveness
● Endogenous = historical share price
price and trading volume
● Trading Fundamentals: Quant Theory,
Arbitrage, and Back-testing
● Supervised Learning with BigQuery
ML and ARIMA models
Preview of Future Topics
● Building models with TensorFlow 2.X
● LSTM models for time-series
prediction

You might also like