SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
Terry Benzschawel & Ishan Shah
January 14, 2020
Masterclass: Natural Language Processing
in Trading
Algorithmic & Quantitative Trading Institute
Established in 2010
Who are we?
Team
We are a group of traders, coders, analysts who love to teach and share their experience.
Mission
To bridge the gap between theory and practice.
Vision
All retail investors use Quant & Algorithmic trading by upskilling themselves and by simplifying technology.
How we help
Online classroom training for serious learners seeking to get a better role or start their own trading
business. 6-months long, 300+ hours content, personal learning coach, hands-on project work, 17+
faculty members, verified certification
Self-paced interactive courses on various topics, Python & Excel based modelling, courses offered by
various experts in the domain.
blueshift-support@quantinsti.com
quantra@quantinsti.com
connect@quantinsti.com
Free backtesting platform with daily and minute data from NSE, NYSE
● Train a machine learning model to calculate a sentiment from a news
headline.
● Implement and compare the word embeddings methods such as Bag of Words
(BoW), TF-IDF, Word2Vec and BERT.
● Predict the stock returns and bond returns from the news headlines.
● Describe the applications of natural language processing.
● Automate and paper trade the strategies covered in the course.
Natural Language Processing in Trading
URL: https://quantra.quantinsti.com/course/natural-language-processing-trading
SELF-PACED ONLINE COURSE
LEVELDURATION
8 hours
Terry Benzschawel is the Founder and Principal at Benzschawel
Scientific, LLC. Before that, he had worked with Citigroup's
Institutional Clients Business, as a Managing Director, heading
the Quantitative Credit Trading group. He has also authored two
books on Credit Modeling.
AUTHORED BY
Advanced
INTERACTIVE
EXERCISES
LIFETIME
ACCESS
DOWNLOADABLE
STRATEGY CODES
CERTIFICATE FROM
QUANTINSTI
COURSE FEATURES WHAT LEARNERS SAY ABOUT QUANTRA
“Quantra is a marvellous source for Alpha strategies and a powerhouse
of great instructors with market experience. Also, Quantra gives a clear
research path so that one can research his own Alphas. I recommend it
for traders and researchers.”
Níkolas Pareschi
Instructor at Investidor de Sucesso, Brazil
Speakers Introduction
Terry Benzschawel is the Founder and Principal at Benzschawel
Scientific, LLC. Terry has worked as a credit strategist with a focus on
client-oriented solutions across all credit markets. Before that, he
had worked in Chase Manhattan and Citi to build algorithms to
predict corporate bankruptcy and to detect credit fraud on card
transactions. He has authored two books on Credit Modeling.
Terry Benzschawel
Founder and Principal at Benzschawel
Scientific, LLC
Ishan Shah
AVP, Content & Research at
QuantInsti
Ishan Shah is AVP and leads the content & research team at
Quantra by QuantInsti. Prior to that, he worked with Barclays in
the Global Markets team & with Bank of America Merrill Lynch.
He has a rich experience in financial markets spanning across
various asset classes in different roles.
Poll - 1
Do you use Sentiment Analysis in Trading?
A. I do
B. I don’t
C. Never heard of ‘Sentiment Analysis in Trading’
Agenda
➔ How is Natural Language Processing applied in financial markets?
➔ Different word embedding methods
➔ Aggregating Daily Sentiment Score on Quantra learning portal
➔ How does Quantra learning portal provide a unique learning experience?
How is Natural Language Processing applied in financial markets?
Natural language processing in financial applications is most often used to gauge the sentiment (positive, negative
or neutral) of a given headline or text. In addition to directional sentiment, applications also often use a measure of
relevance to the asset or asset class in question. Once these measures are obtained, they are often summed over a
given period to make predictions about subsequent market moves.
Natural Language Processing in Financial Markets
● Natural language processing in financial markets has most often been applied in equity markets to predict
prices changes over a day or days.
● Recently, attempts are being made to apply NLP to predict price changes in corporate bond markets.
● The general approach consists of first turning words in written text, say in news headlines or stories, into their
digital representations. This is called “embedding.”
● Next, these embedded texts are used to generate sentiment scores (positive, negative, or neutral) relative to the
market(s) whose returns they are trying to predict.
● The sentiment scores related to the market are summed over a period (e.g., a day) and used to predict the next
period’s price change.
Word Embedding Methods
Word embedding is the process of converting text into a digital representation in the computer. In the next few slides
I highlight several of the most important methods. It is important to note that this is a rapidly evolving field with many
innovations.
Word Embedding Methods
● Bag of Words
● Term Frequency-Inverse Document Frequency (TF-IDF)
● Word-2-Vec
● Embeddings from Language (ELMo) Model
● Bidirectional Encoder Representation from Transformers (BERT)
Bag of Words
● Bag of Words (BoW) is an algorithm that counts how many times a word appears in a document
- Those word counts allow us to compare documents and gauge their similarities for applications like search and document
classification
● Bag of Words (BoW) is an algorithm that counts how many times a word appears in a document
- Those word counts allow us to compare documents and gauge their similarities for applications like search and document
classification
- Each of the documents in the corpus is represented by columns of equal length
- Those are word count vectors, and output stripped of context
- The frequency of each word is effectively converted to represent the probabilities of those words’ occurrence in the document
- Probabilities that surpass certain levels will activate nodes in the network and influence the document’s classification
Term Frequency-Inverse Document Frequency (TF-IDF)
● With TF-IDF, words are given weight – TF-IDF measures relevance, not frequency
- Word counts are replaced with TF-IDF scores across the whole dataset
● TF-IDF measures the number of times that words appear in a given document (that’s “term frequency”).
- Because words such as “and” or “the” appear frequently in all documents, those must be discounted
- That’s the inverse-document frequency part. The more documents a word appears in, the less valuable that word is as a signal
to differentiate any given document
- That’s intended to leave only the frequent and distinctive words as markers
- Each word’s TF-IDF relevance is a normalized data format that also adds up to one.
- Those marker words are then fed to the neural net as features in order to determine the topic covered by the document that
contains them
Word2Vec
● Word2Vec models are two-layer neural networks that are trained to reconstruct linguistic contexts of words.
● Word2vec takes as its input a large corpus of text and produces a vector space, typically of several hundred dimensions,
with each unique word in the corpus being assigned a corresponding vector in the space
● Word vectors are positioned in the vector space such that words that share common contexts in the corpus are located in
close proximity to one another in the space.
- It doesn’t distinguish the different meaning of a word with the same tokens
- For example, the word “bank” can relate to the financial institution or a river bank. The traditional word2vec is not able to
capture this granularity
● Word2vec trains words against other words that neighbor them in the input corpus
- It does so using context to predict a target word (continuous bag of words - CBOW) or using a word to predict a target context,
which is called skip-gram
Word2Vec
● Word2vec trains words against other words that neighbor them
in the input corpus
- It does so using context to predict a target word (continuous
bag of words - CBOW) or using a word to predict a target
context, which is called skip-gram
● Train the network by feeding it word pairs found in training
documents
- The network learns the statistics from the number of times each
pairing shows up
- For example, the network is probably going to get many more
training samples of (“Soviet”, “Union”) than it is of (“Soviet”,
“Sasquatch”)
- After training, if you give the network “Soviet” as input
Embeddings from Language (ELMo) Model
● ELMo uses bi-directional LSTMs to generate features for downstream tasks, which bring two advantages:
1. ELMo representations are purely character based and can learn the complex characteristic of word usage
2. Learn the change of word usage according to the different context in which it is used
●The bi-directional LSTM consists of 2 parts: a forward LM and a backward LM
- The forward LM tries to predict the next word given all the previous words from left to right:
- For each position k, the LSTM outputs a context-dependent representation where j=1,...,L and the top layer
is applied on a Softmax function to predict the next word t k+1
The BERT Model Architecture
● Bidirectional Encoder Representation from Transformers
● Unsupervised Pre-training
● Pre-train deep bidirectional representations by jointly
conditioning on both left and right context in all layers
● Instead of the recurrent neural network, it uses attention to
boost the speed with which these models can be trained, lends
itself to parallelization
● Can be extended to an intense layer and improve accuracy
● The word-embedding trained from BERT is for a
general-language purpose by a set of standard NLP techniques
such as work masking and contextual predictions
Sentiment Classification
Source: Reuters
Aggregating Daily Sentiment Score
Jan 15
9:30 am
Jan 15
4:00 pm
Jan 14
9:30 am
Jan 14
4:00 pm
Poll - 2
Calculate the correct sentiment class from the below data at Day 2, 9:30 am:
The option format is
Day | Time | Sentiment Score
A. Day 1 | 3 pm | 1
B. Day 1 | 7 pm | -1
C. Day 2 | 10 am | -1
D. Day 2 | 5 pm | 0
1. Positive or 1
2. Negative or -1
3. Neutral or 0
4. Cannot be determined
Trading Strategy
Summary
● This introductory webinar describes the use of Natural Language Processing (NLP) techniques in the context
of building trading strategies for 1-day horizons for the corporate bond market and equities markets using
news headlines.
● We described various methods for converting text into digital representations and for extracting sentiment
scores from those embeddings.
● Looking ahead to the course, we find that approaches using the latest advances in NLP are better suited to
predict future returns in credit indices, by using news headlines directly as inputs, instead of news headline
sentiments
Why I recommend Quantra for learning?
● The Quantra program on NLP provides a unique blend of underlying theory, practical applications and
programming exercises.
● Attendees will come away with a broad understanding of natural language processing techniques, their
implementation, and the challenges in applying those techniques to problems in finance.
● The applications described in the training program are actual applications to problems in predicting corporate
bond returns.
● The instructors in the program include pioneers in the field of machine learning in finance who have
successfully applied those methods to real world problems and share that experience in the lessons.
Webinar Video Recording
Video
● Train a machine learning model to calculate a sentiment from a news
headline.
● Implement and compare the word embeddings methods such as Bag of Words
(BoW), TF-IDF, Word2Vec and BERT.
● Predict the stock returns and bond returns from the news headlines.
● Describe the applications of natural language processing.
● Automate and paper trade the strategies covered in the course.
Natural Language Processing in Trading
URL: https://quantra.quantinsti.com/course/natural-language-processing-trading
SELF-PACED ONLINE COURSE
LEVELDURATION
8 hours
Terry Benzschawel is the Founder and Principal at Benzschawel
Scientific, LLC. Before that, he had worked with Citigroup's
Institutional Clients Business, as a Managing Director, heading
the Quantitative Credit Trading group. He has also authored two
books on Credit Modeling.
AUTHORED BY
Advanced
INTERACTIVE
EXERCISES
LIFETIME
ACCESS
DOWNLOADABLE
STRATEGY CODES
CERTIFICATE FROM
QUANTINSTI
COURSE FEATURES WHAT LEARNERS SAY ABOUT QUANTRA
“Quantra is a marvellous source for Alpha strategies and a powerhouse
of great instructors with market experience. Also, Quantra gives a clear
research path so that one can research his own Alphas. I recommend it
for traders and researchers.”
Níkolas Pareschi
Instructor at Investidor de Sucesso, Brazil
Thank You!
quantra@quantinsti.com

Mais conteúdo relacionado

Mais procurados

JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
ijcsit
 
BEGIN TITLE THREE INCHES FROM TOP OF PAPER
BEGIN TITLE THREE INCHES FROM TOP OF PAPERBEGIN TITLE THREE INCHES FROM TOP OF PAPER
BEGIN TITLE THREE INCHES FROM TOP OF PAPER
butest
 

Mais procurados (8)

Crowdsource Earnings Predictions and the Quantopian Research Platform
Crowdsource Earnings Predictions and the Quantopian Research PlatformCrowdsource Earnings Predictions and the Quantopian Research Platform
Crowdsource Earnings Predictions and the Quantopian Research Platform
 
STOCK MARKET PREDICTION
STOCK MARKET PREDICTIONSTOCK MARKET PREDICTION
STOCK MARKET PREDICTION
 
Paradigms of trading strategies formulation
Paradigms of trading strategies formulationParadigms of trading strategies formulation
Paradigms of trading strategies formulation
 
Stock market trend prediction using k nearest neighbor(knn) algorithm
Stock market trend prediction using k nearest neighbor(knn) algorithmStock market trend prediction using k nearest neighbor(knn) algorithm
Stock market trend prediction using k nearest neighbor(knn) algorithm
 
FINANCE RESEARCH REPORT SYNOPSIS
FINANCE RESEARCH REPORT SYNOPSISFINANCE RESEARCH REPORT SYNOPSIS
FINANCE RESEARCH REPORT SYNOPSIS
 
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
JUMPING RISK IN TAIWAN AND TAIEX OPTION RETURN IN TAIWAN
 
BEGIN TITLE THREE INCHES FROM TOP OF PAPER
BEGIN TITLE THREE INCHES FROM TOP OF PAPERBEGIN TITLE THREE INCHES FROM TOP OF PAPER
BEGIN TITLE THREE INCHES FROM TOP OF PAPER
 
Big Data, Machine Learning and Capital Markets
Big Data, Machine Learning and Capital MarketsBig Data, Machine Learning and Capital Markets
Big Data, Machine Learning and Capital Markets
 

Semelhante a Masterclass: Natural Language Processing in Trading with Terry Benzschawel & Ishan Shah

How can text-mining leverage developments in Deep Learning? Presentation at ...
How can text-mining leverage developments in Deep Learning?  Presentation at ...How can text-mining leverage developments in Deep Learning?  Presentation at ...
How can text-mining leverage developments in Deep Learning? Presentation at ...
jcscholtes
 
Doc format.
Doc format.Doc format.
Doc format.
butest
 

Semelhante a Masterclass: Natural Language Processing in Trading with Terry Benzschawel & Ishan Shah (20)

LLM.pdf
LLM.pdfLLM.pdf
LLM.pdf
 
How can text-mining leverage developments in Deep Learning? Presentation at ...
How can text-mining leverage developments in Deep Learning?  Presentation at ...How can text-mining leverage developments in Deep Learning?  Presentation at ...
How can text-mining leverage developments in Deep Learning? Presentation at ...
 
AI生成工具的新衝擊 - MS Bing & Google Bard 能否挑戰ChatGPT-4領導地位
AI生成工具的新衝擊 - MS Bing & Google Bard 能否挑戰ChatGPT-4領導地位AI生成工具的新衝擊 - MS Bing & Google Bard 能否挑戰ChatGPT-4領導地位
AI生成工具的新衝擊 - MS Bing & Google Bard 能否挑戰ChatGPT-4領導地位
 
Reflective Plan Examples
Reflective Plan ExamplesReflective Plan Examples
Reflective Plan Examples
 
Fast and accurate sentiment classification us and naive bayes model b516001
Fast and accurate sentiment classification  us and naive bayes model b516001Fast and accurate sentiment classification  us and naive bayes model b516001
Fast and accurate sentiment classification us and naive bayes model b516001
 
Natural Language Processing .pdf
Natural Language Processing .pdfNatural Language Processing .pdf
Natural Language Processing .pdf
 
STOCKGRAM : DEEP LEARNING MODEL FOR DIGITIZING FINANCIAL COMMUNICATIONS VIA N...
STOCKGRAM : DEEP LEARNING MODEL FOR DIGITIZING FINANCIAL COMMUNICATIONS VIA N...STOCKGRAM : DEEP LEARNING MODEL FOR DIGITIZING FINANCIAL COMMUNICATIONS VIA N...
STOCKGRAM : DEEP LEARNING MODEL FOR DIGITIZING FINANCIAL COMMUNICATIONS VIA N...
 
STOCKGRAM : DEEP LEARNING MODEL FOR DIGITIZING FINANCIAL COMMUNICATIONS VIA N...
STOCKGRAM : DEEP LEARNING MODEL FOR DIGITIZING FINANCIAL COMMUNICATIONS VIA N...STOCKGRAM : DEEP LEARNING MODEL FOR DIGITIZING FINANCIAL COMMUNICATIONS VIA N...
STOCKGRAM : DEEP LEARNING MODEL FOR DIGITIZING FINANCIAL COMMUNICATIONS VIA N...
 
Top 10 Must-Know NLP Techniques for Data Scientists
Top 10 Must-Know NLP Techniques for Data ScientistsTop 10 Must-Know NLP Techniques for Data Scientists
Top 10 Must-Know NLP Techniques for Data Scientists
 
Deciphering voice of customer through speech analytics
Deciphering voice of customer through speech analyticsDeciphering voice of customer through speech analytics
Deciphering voice of customer through speech analytics
 
Language Modeling.docx
Language Modeling.docxLanguage Modeling.docx
Language Modeling.docx
 
MACHINE-DRIVEN TEXT ANALYSIS
MACHINE-DRIVEN TEXT ANALYSISMACHINE-DRIVEN TEXT ANALYSIS
MACHINE-DRIVEN TEXT ANALYSIS
 
Advancements in Hindi-English Neural Machine Translation: Leveraging LSTM wit...
Advancements in Hindi-English Neural Machine Translation: Leveraging LSTM wit...Advancements in Hindi-English Neural Machine Translation: Leveraging LSTM wit...
Advancements in Hindi-English Neural Machine Translation: Leveraging LSTM wit...
 
INFORMATION RETRIEVAL FROM TEXT
INFORMATION RETRIEVAL FROM TEXTINFORMATION RETRIEVAL FROM TEXT
INFORMATION RETRIEVAL FROM TEXT
 
NBLex: emotion prediction in Kannada-English code-switchtext using naïve baye...
NBLex: emotion prediction in Kannada-English code-switchtext using naïve baye...NBLex: emotion prediction in Kannada-English code-switchtext using naïve baye...
NBLex: emotion prediction in Kannada-English code-switchtext using naïve baye...
 
Natural language processing PPT presentation
Natural language processing PPT presentationNatural language processing PPT presentation
Natural language processing PPT presentation
 
sentiment analysis
sentiment analysis sentiment analysis
sentiment analysis
 
Doc format.
Doc format.Doc format.
Doc format.
 
NATURAL LANGUAGE PROCESSING.pptx
NATURAL LANGUAGE PROCESSING.pptxNATURAL LANGUAGE PROCESSING.pptx
NATURAL LANGUAGE PROCESSING.pptx
 
Machine Tanslation
Machine TanslationMachine Tanslation
Machine Tanslation
 

Mais de QuantInsti

ChatGPT and Machine Learning in Trading
ChatGPT and Machine Learning in TradingChatGPT and Machine Learning in Trading
ChatGPT and Machine Learning in Trading
QuantInsti
 
Introduction to Quantitative Factor Investing
Introduction to Quantitative Factor InvestingIntroduction to Quantitative Factor Investing
Introduction to Quantitative Factor Investing
QuantInsti
 
Machine Learning for Options Trading
Machine Learning for Options TradingMachine Learning for Options Trading
Machine Learning for Options Trading
QuantInsti
 
Portfolio Assets Allocation with Machine Learning
Portfolio Assets Allocation with Machine LearningPortfolio Assets Allocation with Machine Learning
Portfolio Assets Allocation with Machine Learning
QuantInsti
 
Price Action Trading - An Introduction
Price Action Trading - An IntroductionPrice Action Trading - An Introduction
Price Action Trading - An Introduction
QuantInsti
 
Introduction to Systematic Options Trading
Introduction to Systematic Options TradingIntroduction to Systematic Options Trading
Introduction to Systematic Options Trading
QuantInsti
 
Competitive Edges in Algorithmic Trading
Competitive Edges in Algorithmic TradingCompetitive Edges in Algorithmic Trading
Competitive Edges in Algorithmic Trading
QuantInsti
 
Volatility Trading: Trading The Fear Index VIX
Volatility Trading: Trading The Fear Index VIXVolatility Trading: Trading The Fear Index VIX
Volatility Trading: Trading The Fear Index VIX
QuantInsti
 
Big Data And The Future Of Retail Investing
Big Data And The Future Of Retail InvestingBig Data And The Future Of Retail Investing
Big Data And The Future Of Retail Investing
QuantInsti
 
Backtest of Short Straddles on SPX Index
Backtest of Short Straddles on SPX IndexBacktest of Short Straddles on SPX Index
Backtest of Short Straddles on SPX Index
QuantInsti
 
Pairs Trading In the Brazilian Stock Market
Pairs Trading In the Brazilian Stock MarketPairs Trading In the Brazilian Stock Market
Pairs Trading In the Brazilian Stock Market
QuantInsti
 
How To Set Up Automated Trading
How To Set Up Automated TradingHow To Set Up Automated Trading
How To Set Up Automated Trading
QuantInsti
 
How To Set Up Automated Trading
How To Set Up Automated TradingHow To Set Up Automated Trading
How To Set Up Automated Trading
QuantInsti
 
Quantitative Data Analysis of Cryptocurrencies
Quantitative Data Analysis of CryptocurrenciesQuantitative Data Analysis of Cryptocurrencies
Quantitative Data Analysis of Cryptocurrencies
QuantInsti
 
Introduction to Quantitative Trading - Investment Management Club of Yale Uni...
Introduction to Quantitative Trading - Investment Management Club of Yale Uni...Introduction to Quantitative Trading - Investment Management Club of Yale Uni...
Introduction to Quantitative Trading - Investment Management Club of Yale Uni...
QuantInsti
 
How to automate an options day trading strategy
How to automate an options day trading strategyHow to automate an options day trading strategy
How to automate an options day trading strategy
QuantInsti
 
Predict daily stock prices with random forest classifier, technical indicator...
Predict daily stock prices with random forest classifier, technical indicator...Predict daily stock prices with random forest classifier, technical indicator...
Predict daily stock prices with random forest classifier, technical indicator...
QuantInsti
 
How Pandemics Impact the Financial Markets - A Quantitative Analysis
How Pandemics Impact the Financial Markets - A Quantitative AnalysisHow Pandemics Impact the Financial Markets - A Quantitative Analysis
How Pandemics Impact the Financial Markets - A Quantitative Analysis
QuantInsti
 
Webinar on Algorithmic Trading - Why make the move? with Vivek Krishnamoorthy...
Webinar on Algorithmic Trading - Why make the move? with Vivek Krishnamoorthy...Webinar on Algorithmic Trading - Why make the move? with Vivek Krishnamoorthy...
Webinar on Algorithmic Trading - Why make the move? with Vivek Krishnamoorthy...
QuantInsti
 
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
QuantInsti
 

Mais de QuantInsti (20)

ChatGPT and Machine Learning in Trading
ChatGPT and Machine Learning in TradingChatGPT and Machine Learning in Trading
ChatGPT and Machine Learning in Trading
 
Introduction to Quantitative Factor Investing
Introduction to Quantitative Factor InvestingIntroduction to Quantitative Factor Investing
Introduction to Quantitative Factor Investing
 
Machine Learning for Options Trading
Machine Learning for Options TradingMachine Learning for Options Trading
Machine Learning for Options Trading
 
Portfolio Assets Allocation with Machine Learning
Portfolio Assets Allocation with Machine LearningPortfolio Assets Allocation with Machine Learning
Portfolio Assets Allocation with Machine Learning
 
Price Action Trading - An Introduction
Price Action Trading - An IntroductionPrice Action Trading - An Introduction
Price Action Trading - An Introduction
 
Introduction to Systematic Options Trading
Introduction to Systematic Options TradingIntroduction to Systematic Options Trading
Introduction to Systematic Options Trading
 
Competitive Edges in Algorithmic Trading
Competitive Edges in Algorithmic TradingCompetitive Edges in Algorithmic Trading
Competitive Edges in Algorithmic Trading
 
Volatility Trading: Trading The Fear Index VIX
Volatility Trading: Trading The Fear Index VIXVolatility Trading: Trading The Fear Index VIX
Volatility Trading: Trading The Fear Index VIX
 
Big Data And The Future Of Retail Investing
Big Data And The Future Of Retail InvestingBig Data And The Future Of Retail Investing
Big Data And The Future Of Retail Investing
 
Backtest of Short Straddles on SPX Index
Backtest of Short Straddles on SPX IndexBacktest of Short Straddles on SPX Index
Backtest of Short Straddles on SPX Index
 
Pairs Trading In the Brazilian Stock Market
Pairs Trading In the Brazilian Stock MarketPairs Trading In the Brazilian Stock Market
Pairs Trading In the Brazilian Stock Market
 
How To Set Up Automated Trading
How To Set Up Automated TradingHow To Set Up Automated Trading
How To Set Up Automated Trading
 
How To Set Up Automated Trading
How To Set Up Automated TradingHow To Set Up Automated Trading
How To Set Up Automated Trading
 
Quantitative Data Analysis of Cryptocurrencies
Quantitative Data Analysis of CryptocurrenciesQuantitative Data Analysis of Cryptocurrencies
Quantitative Data Analysis of Cryptocurrencies
 
Introduction to Quantitative Trading - Investment Management Club of Yale Uni...
Introduction to Quantitative Trading - Investment Management Club of Yale Uni...Introduction to Quantitative Trading - Investment Management Club of Yale Uni...
Introduction to Quantitative Trading - Investment Management Club of Yale Uni...
 
How to automate an options day trading strategy
How to automate an options day trading strategyHow to automate an options day trading strategy
How to automate an options day trading strategy
 
Predict daily stock prices with random forest classifier, technical indicator...
Predict daily stock prices with random forest classifier, technical indicator...Predict daily stock prices with random forest classifier, technical indicator...
Predict daily stock prices with random forest classifier, technical indicator...
 
How Pandemics Impact the Financial Markets - A Quantitative Analysis
How Pandemics Impact the Financial Markets - A Quantitative AnalysisHow Pandemics Impact the Financial Markets - A Quantitative Analysis
How Pandemics Impact the Financial Markets - A Quantitative Analysis
 
Webinar on Algorithmic Trading - Why make the move? with Vivek Krishnamoorthy...
Webinar on Algorithmic Trading - Why make the move? with Vivek Krishnamoorthy...Webinar on Algorithmic Trading - Why make the move? with Vivek Krishnamoorthy...
Webinar on Algorithmic Trading - Why make the move? with Vivek Krishnamoorthy...
 
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
Backtesting And Live Trading With Interactive Brokers Using Python With Dr. H...
 

Último

VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
Best VIP Call Girls Morni Hills Just Click Me 6367492432
Best VIP Call Girls Morni Hills Just Click Me 6367492432Best VIP Call Girls Morni Hills Just Click Me 6367492432
Best VIP Call Girls Morni Hills Just Click Me 6367492432
motiram463
 
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
priyasharma62062
 
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
dipikadinghjn ( Why You Choose Us? ) Escorts
 

Último (20)

7 tips trading Deriv Accumulator Options
7 tips trading Deriv Accumulator Options7 tips trading Deriv Accumulator Options
7 tips trading Deriv Accumulator Options
 
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
 
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
VIP Independent Call Girls in Andheri 🌹 9920725232 ( Call Me ) Mumbai Escorts...
 
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls Service Pune ₹7.5k Pick Up & Drop With Cash Payment 9352852248 Cal...
Call Girls Service Pune ₹7.5k Pick Up & Drop With Cash Payment 9352852248 Cal...Call Girls Service Pune ₹7.5k Pick Up & Drop With Cash Payment 9352852248 Cal...
Call Girls Service Pune ₹7.5k Pick Up & Drop With Cash Payment 9352852248 Cal...
 
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
VIP Call Girl in Mumbai Central 💧 9920725232 ( Call Me ) Get A New Crush Ever...
 
Best VIP Call Girls Morni Hills Just Click Me 6367492432
Best VIP Call Girls Morni Hills Just Click Me 6367492432Best VIP Call Girls Morni Hills Just Click Me 6367492432
Best VIP Call Girls Morni Hills Just Click Me 6367492432
 
Kharghar Blowjob Housewife Call Girls NUmber-9833754194-CBD Belapur Internati...
Kharghar Blowjob Housewife Call Girls NUmber-9833754194-CBD Belapur Internati...Kharghar Blowjob Housewife Call Girls NUmber-9833754194-CBD Belapur Internati...
Kharghar Blowjob Housewife Call Girls NUmber-9833754194-CBD Belapur Internati...
 
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
 
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
CBD Belapur Expensive Housewife Call Girls Number-📞📞9833754194 No 1 Vipp HIgh...
 
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
 
falcon-invoice-discounting-unlocking-prime-investment-opportunities
falcon-invoice-discounting-unlocking-prime-investment-opportunitiesfalcon-invoice-discounting-unlocking-prime-investment-opportunities
falcon-invoice-discounting-unlocking-prime-investment-opportunities
 
Webinar on E-Invoicing for Fintech Belgium
Webinar on E-Invoicing for Fintech BelgiumWebinar on E-Invoicing for Fintech Belgium
Webinar on E-Invoicing for Fintech Belgium
 
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
 
Cybersecurity Threats in Financial Services Protection.pptx
Cybersecurity Threats in  Financial Services Protection.pptxCybersecurity Threats in  Financial Services Protection.pptx
Cybersecurity Threats in Financial Services Protection.pptx
 
(Sexy Sheela) Call Girl Mumbai Call Now 👉9920725232👈 Mumbai Escorts 24x7
(Sexy Sheela) Call Girl Mumbai Call Now 👉9920725232👈 Mumbai Escorts 24x7(Sexy Sheela) Call Girl Mumbai Call Now 👉9920725232👈 Mumbai Escorts 24x7
(Sexy Sheela) Call Girl Mumbai Call Now 👉9920725232👈 Mumbai Escorts 24x7
 
(INDIRA) Call Girl Srinagar Call Now 8617697112 Srinagar Escorts 24x7
(INDIRA) Call Girl Srinagar Call Now 8617697112 Srinagar Escorts 24x7(INDIRA) Call Girl Srinagar Call Now 8617697112 Srinagar Escorts 24x7
(INDIRA) Call Girl Srinagar Call Now 8617697112 Srinagar Escorts 24x7
 
Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )
Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )
Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )
 
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
 
Toronto dominion bank investor presentation.pdf
Toronto dominion bank investor presentation.pdfToronto dominion bank investor presentation.pdf
Toronto dominion bank investor presentation.pdf
 

Masterclass: Natural Language Processing in Trading with Terry Benzschawel & Ishan Shah

  • 1. Terry Benzschawel & Ishan Shah January 14, 2020 Masterclass: Natural Language Processing in Trading
  • 2. Algorithmic & Quantitative Trading Institute Established in 2010
  • 3. Who are we? Team We are a group of traders, coders, analysts who love to teach and share their experience. Mission To bridge the gap between theory and practice. Vision All retail investors use Quant & Algorithmic trading by upskilling themselves and by simplifying technology.
  • 4. How we help Online classroom training for serious learners seeking to get a better role or start their own trading business. 6-months long, 300+ hours content, personal learning coach, hands-on project work, 17+ faculty members, verified certification Self-paced interactive courses on various topics, Python & Excel based modelling, courses offered by various experts in the domain. blueshift-support@quantinsti.com quantra@quantinsti.com connect@quantinsti.com Free backtesting platform with daily and minute data from NSE, NYSE
  • 5. ● Train a machine learning model to calculate a sentiment from a news headline. ● Implement and compare the word embeddings methods such as Bag of Words (BoW), TF-IDF, Word2Vec and BERT. ● Predict the stock returns and bond returns from the news headlines. ● Describe the applications of natural language processing. ● Automate and paper trade the strategies covered in the course. Natural Language Processing in Trading URL: https://quantra.quantinsti.com/course/natural-language-processing-trading SELF-PACED ONLINE COURSE LEVELDURATION 8 hours Terry Benzschawel is the Founder and Principal at Benzschawel Scientific, LLC. Before that, he had worked with Citigroup's Institutional Clients Business, as a Managing Director, heading the Quantitative Credit Trading group. He has also authored two books on Credit Modeling. AUTHORED BY Advanced INTERACTIVE EXERCISES LIFETIME ACCESS DOWNLOADABLE STRATEGY CODES CERTIFICATE FROM QUANTINSTI COURSE FEATURES WHAT LEARNERS SAY ABOUT QUANTRA “Quantra is a marvellous source for Alpha strategies and a powerhouse of great instructors with market experience. Also, Quantra gives a clear research path so that one can research his own Alphas. I recommend it for traders and researchers.” Níkolas Pareschi Instructor at Investidor de Sucesso, Brazil
  • 6. Speakers Introduction Terry Benzschawel is the Founder and Principal at Benzschawel Scientific, LLC. Terry has worked as a credit strategist with a focus on client-oriented solutions across all credit markets. Before that, he had worked in Chase Manhattan and Citi to build algorithms to predict corporate bankruptcy and to detect credit fraud on card transactions. He has authored two books on Credit Modeling. Terry Benzschawel Founder and Principal at Benzschawel Scientific, LLC Ishan Shah AVP, Content & Research at QuantInsti Ishan Shah is AVP and leads the content & research team at Quantra by QuantInsti. Prior to that, he worked with Barclays in the Global Markets team & with Bank of America Merrill Lynch. He has a rich experience in financial markets spanning across various asset classes in different roles.
  • 7. Poll - 1 Do you use Sentiment Analysis in Trading? A. I do B. I don’t C. Never heard of ‘Sentiment Analysis in Trading’
  • 8. Agenda ➔ How is Natural Language Processing applied in financial markets? ➔ Different word embedding methods ➔ Aggregating Daily Sentiment Score on Quantra learning portal ➔ How does Quantra learning portal provide a unique learning experience?
  • 9. How is Natural Language Processing applied in financial markets? Natural language processing in financial applications is most often used to gauge the sentiment (positive, negative or neutral) of a given headline or text. In addition to directional sentiment, applications also often use a measure of relevance to the asset or asset class in question. Once these measures are obtained, they are often summed over a given period to make predictions about subsequent market moves.
  • 10. Natural Language Processing in Financial Markets ● Natural language processing in financial markets has most often been applied in equity markets to predict prices changes over a day or days. ● Recently, attempts are being made to apply NLP to predict price changes in corporate bond markets. ● The general approach consists of first turning words in written text, say in news headlines or stories, into their digital representations. This is called “embedding.” ● Next, these embedded texts are used to generate sentiment scores (positive, negative, or neutral) relative to the market(s) whose returns they are trying to predict. ● The sentiment scores related to the market are summed over a period (e.g., a day) and used to predict the next period’s price change.
  • 11. Word Embedding Methods Word embedding is the process of converting text into a digital representation in the computer. In the next few slides I highlight several of the most important methods. It is important to note that this is a rapidly evolving field with many innovations. Word Embedding Methods ● Bag of Words ● Term Frequency-Inverse Document Frequency (TF-IDF) ● Word-2-Vec ● Embeddings from Language (ELMo) Model ● Bidirectional Encoder Representation from Transformers (BERT)
  • 12. Bag of Words ● Bag of Words (BoW) is an algorithm that counts how many times a word appears in a document - Those word counts allow us to compare documents and gauge their similarities for applications like search and document classification ● Bag of Words (BoW) is an algorithm that counts how many times a word appears in a document - Those word counts allow us to compare documents and gauge their similarities for applications like search and document classification - Each of the documents in the corpus is represented by columns of equal length - Those are word count vectors, and output stripped of context - The frequency of each word is effectively converted to represent the probabilities of those words’ occurrence in the document - Probabilities that surpass certain levels will activate nodes in the network and influence the document’s classification
  • 13. Term Frequency-Inverse Document Frequency (TF-IDF) ● With TF-IDF, words are given weight – TF-IDF measures relevance, not frequency - Word counts are replaced with TF-IDF scores across the whole dataset ● TF-IDF measures the number of times that words appear in a given document (that’s “term frequency”). - Because words such as “and” or “the” appear frequently in all documents, those must be discounted - That’s the inverse-document frequency part. The more documents a word appears in, the less valuable that word is as a signal to differentiate any given document - That’s intended to leave only the frequent and distinctive words as markers - Each word’s TF-IDF relevance is a normalized data format that also adds up to one. - Those marker words are then fed to the neural net as features in order to determine the topic covered by the document that contains them
  • 14. Word2Vec ● Word2Vec models are two-layer neural networks that are trained to reconstruct linguistic contexts of words. ● Word2vec takes as its input a large corpus of text and produces a vector space, typically of several hundred dimensions, with each unique word in the corpus being assigned a corresponding vector in the space ● Word vectors are positioned in the vector space such that words that share common contexts in the corpus are located in close proximity to one another in the space. - It doesn’t distinguish the different meaning of a word with the same tokens - For example, the word “bank” can relate to the financial institution or a river bank. The traditional word2vec is not able to capture this granularity ● Word2vec trains words against other words that neighbor them in the input corpus - It does so using context to predict a target word (continuous bag of words - CBOW) or using a word to predict a target context, which is called skip-gram
  • 15. Word2Vec ● Word2vec trains words against other words that neighbor them in the input corpus - It does so using context to predict a target word (continuous bag of words - CBOW) or using a word to predict a target context, which is called skip-gram ● Train the network by feeding it word pairs found in training documents - The network learns the statistics from the number of times each pairing shows up - For example, the network is probably going to get many more training samples of (“Soviet”, “Union”) than it is of (“Soviet”, “Sasquatch”) - After training, if you give the network “Soviet” as input
  • 16. Embeddings from Language (ELMo) Model ● ELMo uses bi-directional LSTMs to generate features for downstream tasks, which bring two advantages: 1. ELMo representations are purely character based and can learn the complex characteristic of word usage 2. Learn the change of word usage according to the different context in which it is used ●The bi-directional LSTM consists of 2 parts: a forward LM and a backward LM - The forward LM tries to predict the next word given all the previous words from left to right: - For each position k, the LSTM outputs a context-dependent representation where j=1,...,L and the top layer is applied on a Softmax function to predict the next word t k+1
  • 17. The BERT Model Architecture ● Bidirectional Encoder Representation from Transformers ● Unsupervised Pre-training ● Pre-train deep bidirectional representations by jointly conditioning on both left and right context in all layers ● Instead of the recurrent neural network, it uses attention to boost the speed with which these models can be trained, lends itself to parallelization ● Can be extended to an intense layer and improve accuracy ● The word-embedding trained from BERT is for a general-language purpose by a set of standard NLP techniques such as work masking and contextual predictions
  • 19. Aggregating Daily Sentiment Score Jan 15 9:30 am Jan 15 4:00 pm Jan 14 9:30 am Jan 14 4:00 pm
  • 20. Poll - 2 Calculate the correct sentiment class from the below data at Day 2, 9:30 am: The option format is Day | Time | Sentiment Score A. Day 1 | 3 pm | 1 B. Day 1 | 7 pm | -1 C. Day 2 | 10 am | -1 D. Day 2 | 5 pm | 0 1. Positive or 1 2. Negative or -1 3. Neutral or 0 4. Cannot be determined
  • 22. Summary ● This introductory webinar describes the use of Natural Language Processing (NLP) techniques in the context of building trading strategies for 1-day horizons for the corporate bond market and equities markets using news headlines. ● We described various methods for converting text into digital representations and for extracting sentiment scores from those embeddings. ● Looking ahead to the course, we find that approaches using the latest advances in NLP are better suited to predict future returns in credit indices, by using news headlines directly as inputs, instead of news headline sentiments
  • 23. Why I recommend Quantra for learning? ● The Quantra program on NLP provides a unique blend of underlying theory, practical applications and programming exercises. ● Attendees will come away with a broad understanding of natural language processing techniques, their implementation, and the challenges in applying those techniques to problems in finance. ● The applications described in the training program are actual applications to problems in predicting corporate bond returns. ● The instructors in the program include pioneers in the field of machine learning in finance who have successfully applied those methods to real world problems and share that experience in the lessons.
  • 25. ● Train a machine learning model to calculate a sentiment from a news headline. ● Implement and compare the word embeddings methods such as Bag of Words (BoW), TF-IDF, Word2Vec and BERT. ● Predict the stock returns and bond returns from the news headlines. ● Describe the applications of natural language processing. ● Automate and paper trade the strategies covered in the course. Natural Language Processing in Trading URL: https://quantra.quantinsti.com/course/natural-language-processing-trading SELF-PACED ONLINE COURSE LEVELDURATION 8 hours Terry Benzschawel is the Founder and Principal at Benzschawel Scientific, LLC. Before that, he had worked with Citigroup's Institutional Clients Business, as a Managing Director, heading the Quantitative Credit Trading group. He has also authored two books on Credit Modeling. AUTHORED BY Advanced INTERACTIVE EXERCISES LIFETIME ACCESS DOWNLOADABLE STRATEGY CODES CERTIFICATE FROM QUANTINSTI COURSE FEATURES WHAT LEARNERS SAY ABOUT QUANTRA “Quantra is a marvellous source for Alpha strategies and a powerhouse of great instructors with market experience. Also, Quantra gives a clear research path so that one can research his own Alphas. I recommend it for traders and researchers.” Níkolas Pareschi Instructor at Investidor de Sucesso, Brazil