SlideShare a Scribd company logo
1 of 48
Applications of Machine Learning
in High Frequency Trading
HELLO!We are :-
Aashish Jhamtani (15BM6JP01)
Ayan Sengupta (15BM6JP09)
Neeti Pokharna (15BM6JP27)
Siddhant Sanjeev (15BM6JP45)
Sujan Kumar Biswas (15BM6JP49)
What is High Frequency
Trading?
Let’s start with the first set of slides 1
“Mandatory Disclaimer
All characters and events depicted in this
project are entirely modeled. Any similarity to
actual events or stock price movements is
purely awesome.
“Using computer algorithms to rapidly trade securities
● Positions are held for seconds to minutes
● Reaction times to market changes are sub-millisecond
● HFT accounts for more than 60% of all trading volume in some
markets
● Due to market efficiency it is challenging to come up with robust
predictive models
● Columns include timestamp, price, order-flag, size, etc.
Challenges and Scope
◉ The special challenges for machine learning : due to very fine granularity of
data.
◉ A lack of understanding of how such low-level data relates to actionable
circumstances (such as profitably buying or selling shares, optimally
executing a large order, etc.).
◉ No prior intuitions about how (say) the distribution of liquidity in the order
book relates to future price movements, if at all.
SCOPE : a comparative study of various ML strategies and their performance on
the data obtained through the Bloomberg Terminal. Finally, to design a
successful strategy to operate in such a scenario.
How Does the Data Look
Like
WANT BIG IMPACT?
USE BIG IMAGE.
A PICTURE IS WORTH A THOUSAND WORDS
A complex idea can be
conveyed with just a
single still image.
Namely making it
possible to absorb large
amounts of data quickly.
Holt – Winter’s Model
Simple Exponential Smoothing is used for
applying as many as three low-pass filters with
exponential window functions. It was then used to
predict the output for the next tick and the MSE
was found to be : 253.9
Output curve is as shown :-
Feed Forward Model
A feed-forward neural network is an artificial neural
network where connections between the units
do not form a cycle. Here it was used to predict
the output for the next tick and the MSE was found
to be : 144.67
Output curve is as shown :-
News Sentiment Analysis
Stanford Parser was used to get the dependency
graph for a sentence.
Sentiment judged using senti-word-net.
Output graph is as shown :-
Black Schole’s Model
● Stock prices follows geometric Brownian motion i.e. returns follow lognormal distribution with
constant drift and volatility
● For one period binomial model call price under risk neutral probability measure Q in arbitrage
free market is
● The call price C(t,x) satisfies the equation
● Solving the above equation gives us
Limitations of Black Schole's R Simulation
● Log returns of stocks do not always follow normal distribution as shown in the graph below.
● Fixed risk free rate, no dividend and fixed volatility assumptions are not always valid.
● The market is not complete, because of the transaction cost i.e. not always possible to choose
suitable hedging portfolio (aH,bH) in risky and risk free assets.
● Out of the money performance of BS model is not as good as in the money performance.
● A fixed no-arbitrage price for any option on the stock.
Markov Diffusion Model
● The drift and volatility are finite state Markov chain in continuous time.
● For example - Assume drift and volatility both are 2-state processes. Then the stock price
follows Markov switching diffusion model -
● Then the arbitrage free European call price for maturity T, strike price K are two solutions -
Markov Diffusion Model R Simulation
• If at both states drift and volatility remains same, this model corresponds to Black and Scholes
model.
• The market is not complete because of the state transitions.
• The output is shown below :-
Jump Diffusion Process
• Jumps should occur in an instantaneous fashion, neglecting the possibility of a Delta hedge
• Probability of any jump occurring in a particular interval of time should be approximately
proportional to length of that time interval
• All future jumps should have no "memory" of past jumps
• The extra parameters ν and m represent the standard deviation of the lognormal jump process
and the scale factor for jump intensity, respectively.
Jump Diffusion Result Discussion
High RMSE (=26.7) since, Jump-diffusion model cannot incorporate possible dependence structure
among asset returns (the so-called “volatility clustering effect”), simply because the model assumes
independent increments. Here is the plot for the same :-
Support Vector Regression
• Motivation: Find a function that tries to predict dependent variable (Y) on the basis of
independent variables (X) such that deviation from predicted value and actual value is less than or
equal to a measure (ε) till which error is tolerated
• Methodology: Polynomial Kernel used - Radial Basis function kernel
• Advantage: In traditional methods, only Stock Price, Strike Price and Time to Maturity are used.
SVR can capture the effect of Risk free interest rate and volatility which are dynamic with time
• Conclusion: Decent RMSE (=19.56) compared to other parametric methods
Symmetrized Nearest Neighbour
• Semi-parametric estimation of liquidity effects on option pricing
• When obtaining volatility nonparametric function in money-ness intervals for which amount of
data is relatively small, use of multivariate kernel based on global smoothing parameter may
lead to poor estimation results
• When estimating in one point we calculate weight for rest of our observations by looking at
distance between values of empirical distribution at each point rather than distance between
points themselves
• Empirical distribution changes the random design to a uniform design with knots uniformly
spaced between zero and one
Symmetrized Nearest Neighbour Regression Results
Inputs:
• Money-ness
• Bid ask Spread
• Days until Expiration (T)
• Volatility calculated was given as input in BS
model
Conclusion: In-sample performance of model is
better compared to a competing model without
liquidity. However, out-of-sample performance is
quite disappointing resulting in high MSE
K Nearest Neighbour Implementation and Results
• Non-parametric algorithm that can be used for either classification or regression.
• For each data point, the algorithm finds the k closest observations, and then classifies the data
point to the majority.
• The data set was encoded so as to fit the KNN classifier to it. The data was compared to the
previous tick and if there was an increase from a previous value then the data was encoded as
1, 0 otherwise
• Accuracy was checked for the data and a corresponding confusion matrix was created for the
data
• Highest Accuracy was found for value of K=5
Artificial Neural Network : Conjugate Gradient
MOTIVATION :-
• Results suggest that machine learning can be used as a basis for effective option investment
strategies using several Multilayer Perceptron models.
• Existing models in finance for predicting the price of an option, most of which revolve around
the Black-Scholes model; however, these models tend to involve highly complex mathematics
and often make many assumptions about the underlying characteristics of the market.
ADVANTAGES:-
• Machine Learning techniques do not make any implicit assumptions about the relationships
between input variables. Using an Artificial Neural Network, we are able to let the learner
discover relationships that may not be included in standard models like Black-Scholes.
Artificial Neural Network : Conjugate Gradient (Cont…)
METHODOLOGY :-
From The data obtained by Bloomberg Terminal, we obtained the historical data of the following
attributes.
• Strike Price (X)
• Underlying Stock Price (S)
• 10-day Historical Volatility
• 30-day Historical Volatility
• Days until Expiration (T)
• The Market Price of the Option (P)
• The 10 previous days of stock prices
• Risk-free rate
• Expiration Price of Stock (E)
Apply ANN using these parameters
Artificial Neural Network : Conjugate Gradient (Cont…)
CONCLUSIONS :-
Using Artificial Neural Network on the test data for option pricing gives a more accurate result as
compared to the other base learner models.
For further improvements we can add the following parameters as the input to the specified model as
well.
• Measures of Volatility
• Previous Stock Prices
Although ANN using Conjugate Gradient is a very renowned and used Machine Learning method, it
doesn’t provide a very accurate result as Conjugate Gradient doesn’t account for the damping Least
Square Error..
Due to this problem we switch over to the Levenberg Marquardt Optimization in Neural Network
which takes care of the above specified problem.
Artificial Neural Network : Levenberg Marquardt
• Majorly used to solve non-linear least squares problems.
• Finds local minima instead of global minima.
• LMA interpolates between the Gauss-Newton Algorithm (GNA) and the method of gradient
descent.
TRADING
2
TRADING
Price appreciation,
Timing risk
Market impact
trade fast trade slowly
We want to balance market risk and market impact.
Market risk Market impact
We have to deal with …
DISCRETE TRADING MODEL
◉ Trading is possible at N discrete times
◉ No interest on cash position
◉ A trading strategy is given by (xi)i=0..N+1 where
xk = #units hold at t=k (i.e. we sell nk=xk-xk+1 at price Sk)
◉ Boundary conditions: x0 = X and xN+1 = 0
◉ Price dynamics:
Exogenous: Arithmetic Random Walk
Sk = Sk-1 + (k+), k=1..N
with k ~ N(0,1) i.i.d
Endogenous: Market Impact
HIDDEN MARKOV MODEL
◉Decide the “hidden” states: up trend, mean reverting, down trend
MEAN
REVERTING
μ ≈ 0
DOWN
μ >> 0
UP
μ >> 0
p11
p12
p13
p22
p21 p23
p33
p32
p31
TECHNICAL INDICATORS
BOLLINGER BANDS & STOCHASTIC OSCILLATORS
Stochastic Oscillator
◉Offers a measurement of deviance of
currency pair’s rate (price) from its
normal levels
◉Offers indications of when a currency
pair is overbought/oversold
◉Works well in markets that are not
trending, but rather just fluctuating
back and forth between an upper level
(resistance) and a lower level (support)
Bollinger Bands
◉Excellent range-bound indicator that
measures standard deviation from the
moving average
◉Operates under the logic that a currency
pair’s price is most likely to gravitate
towards its average, and hence when it
strays too far – such as two standard
deviations away – it is due to retrace back
to its moving average
“
Plots three
bands on a price
chart to create
two price
channels. The
security is said
to be overbought
if price line is
consistently
near or breaches
upper price
band. It may be
oversold if the
price line is
consistently
near or drops
below the lower
price band.
“ EMA
“
SMA
“
Overbought
position is
confirmed if
stochastic lines
cross above 80
and, at the
same time,
price line is
consistently
near upper
Bollinger Band.
At that level,
prices are
expected to
drop soon. The
opposite is also
true.
“
MA Type = EMA
“
MA Type = SMA
STRATEGY IS SIMPLE
The first condition you are
looking for is a candle breaking
the UPPER or LOWER Bollinger
Band
Look for stochastics to have
traveled above 80 line (for a
bullish candle traveling
outside upper Bollinger
Band), or below the 20 line
Wait for the next candle to
form before you get into
the trade
Once the next candle has formed
the stochastics lines should
have crossed and be heading
back towards the white line.
If the stochastic lines have
not yet crossed or they are
becoming further apart do
not take the trade, wait until
all of the conditions are met.
If the conditions have been
met, place a trade in the
opposite direction of the
previous candle
PERFORMANCE INDICATOR
Sharpe Ratio
Is the ratio of yearly return to yearly volatility
SHARPE RATIO TABLE TO COMPARE ALGORITHMS
Value
DataSet -0.00029266783
Black Scholes -0.1735110594
Jump Process -0.173409357
SNN & SVR -0.00012865643
PROFIT AND LOSS CURVE
CONCLUSIONS
• The out-of-sample performance is not comparable regardless of what option pricing model is employed in
the estimation
• Artificial Neural Network (Feed Forward) model gives best result among forecasting tools
• Semi-parametric implied volatility estimation is more effective than BS implied volatility
• Non-parametric method give better accuracy compared to parametric methods
• SVR takes less time and gives decent result among the non-parametric methods
• ANN able to capture effect of many more variables like dividend and historical volatilities but largely
depends on the volatility of data input
REFERENCES
• Machine Learning for Market Microstructure and High Frequency Trading
• Quest for Efficient Option Pricing Prediction model using Machine Learning Techniques - B.V. Phani, B.
Chandra, Vijay Raghav
• A Semiparametric Estimation of Liquidity Effects on Option Pricing - Eva Ferreira
• http://www.platonniaga.com/downloads/ea-
documents/Lesson%205%20Stochastics%20and%20Bollinger%20Bands.pdf
THANKS!

More Related Content

What's hot

GPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
GPU Accelerated Backtesting and Machine Learning for Quant Trading StrategiesGPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
GPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
Daniel Egloff
 
The QuantCon Keynote: "Counter Trend Trading – Threat or Complement to Trend ...
The QuantCon Keynote: "Counter Trend Trading – Threat or Complement to Trend ...The QuantCon Keynote: "Counter Trend Trading – Threat or Complement to Trend ...
The QuantCon Keynote: "Counter Trend Trading – Threat or Complement to Trend ...
Quantopian
 

What's hot (20)

Webinar Mean Reversion Strategies Presentation
Webinar Mean Reversion Strategies PresentationWebinar Mean Reversion Strategies Presentation
Webinar Mean Reversion Strategies Presentation
 
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin..."Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...
"Active Learning in Trading Algorithms" by David Fellah, Head of the EMEA Lin...
 
GPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
GPU Accelerated Backtesting and Machine Learning for Quant Trading StrategiesGPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
GPU Accelerated Backtesting and Machine Learning for Quant Trading Strategies
 
Beware of Low Frequency Data by Ernie Chan, Managing Member, QTS Capital Mana...
Beware of Low Frequency Data by Ernie Chan, Managing Member, QTS Capital Mana...Beware of Low Frequency Data by Ernie Chan, Managing Member, QTS Capital Mana...
Beware of Low Frequency Data by Ernie Chan, Managing Member, QTS Capital Mana...
 
Futures Trading Strategies on SGX - India chapter in AFACT in Singapore
Futures Trading Strategies on SGX - India chapter in AFACT in SingaporeFutures Trading Strategies on SGX - India chapter in AFACT in Singapore
Futures Trading Strategies on SGX - India chapter in AFACT in Singapore
 
Leveraging artificial intelligence to build algorithmic trading strategies
Leveraging artificial intelligence to build algorithmic trading strategiesLeveraging artificial intelligence to build algorithmic trading strategies
Leveraging artificial intelligence to build algorithmic trading strategies
 
Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...
Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...
Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...
 
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
 
The QuantCon Keynote: "Counter Trend Trading – Threat or Complement to Trend ...
The QuantCon Keynote: "Counter Trend Trading – Threat or Complement to Trend ...The QuantCon Keynote: "Counter Trend Trading – Threat or Complement to Trend ...
The QuantCon Keynote: "Counter Trend Trading – Threat or Complement to Trend ...
 
Algorithmic trading and Machine Learning by Michael Kearns, Professor of Comp...
Algorithmic trading and Machine Learning by Michael Kearns, Professor of Comp...Algorithmic trading and Machine Learning by Michael Kearns, Professor of Comp...
Algorithmic trading and Machine Learning by Michael Kearns, Professor of Comp...
 
From Backtesting to Live Trading by Vesna Straser at QuantCon 2016
From Backtesting to Live Trading by Vesna Straser at QuantCon 2016From Backtesting to Live Trading by Vesna Straser at QuantCon 2016
From Backtesting to Live Trading by Vesna Straser at QuantCon 2016
 
Classification of quantitative trading strategies webinar ppt
Classification of quantitative trading strategies webinar pptClassification of quantitative trading strategies webinar ppt
Classification of quantitative trading strategies webinar ppt
 
Algo Trading
Algo TradingAlgo Trading
Algo Trading
 
Algorithmic Trading
Algorithmic TradingAlgorithmic Trading
Algorithmic Trading
 
Algo trading(Minor Project) strategy EMA with Ipython
Algo trading(Minor Project) strategy EMA with IpythonAlgo trading(Minor Project) strategy EMA with Ipython
Algo trading(Minor Project) strategy EMA with Ipython
 
Algorithmic Trading Latest Trends & Developments Lecture By Dr. Lipa Roitman
Algorithmic Trading Latest Trends & Developments Lecture By Dr. Lipa RoitmanAlgorithmic Trading Latest Trends & Developments Lecture By Dr. Lipa Roitman
Algorithmic Trading Latest Trends & Developments Lecture By Dr. Lipa Roitman
 
Pairs Trading from NYC Algorithmic Trading Meetup November '13
Pairs Trading from NYC Algorithmic Trading Meetup November '13Pairs Trading from NYC Algorithmic Trading Meetup November '13
Pairs Trading from NYC Algorithmic Trading Meetup November '13
 
Algorithmic Trading
Algorithmic TradingAlgorithmic Trading
Algorithmic Trading
 
High frequency trading
High frequency tradingHigh frequency trading
High frequency trading
 
Modelling Trading Strategies In Equities Presentation
Modelling Trading Strategies In Equities PresentationModelling Trading Strategies In Equities Presentation
Modelling Trading Strategies In Equities Presentation
 

Similar to Applications of Machine Learning in High Frequency Trading

Big Data Project - Final version
Big Data Project - Final versionBig Data Project - Final version
Big Data Project - Final version
Mihir Sanghavi
 

Similar to Applications of Machine Learning in High Frequency Trading (20)

Modeling & Simulation Lecture Notes
Modeling & Simulation Lecture NotesModeling & Simulation Lecture Notes
Modeling & Simulation Lecture Notes
 
Data Structures - Lecture 1 [introduction]
Data Structures - Lecture 1 [introduction]Data Structures - Lecture 1 [introduction]
Data Structures - Lecture 1 [introduction]
 
Statistical Arbitrage
Statistical ArbitrageStatistical Arbitrage
Statistical Arbitrage
 
Differential Machine Learning Masterclass
Differential Machine Learning MasterclassDifferential Machine Learning Masterclass
Differential Machine Learning Masterclass
 
model simulating
model simulatingmodel simulating
model simulating
 
Forecasting stock market movement direction with support vector machine
Forecasting stock market movement direction with support vector machineForecasting stock market movement direction with support vector machine
Forecasting stock market movement direction with support vector machine
 
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...
What Is Multilayer Perceptron Classifier And How Is It Used For Enterprise An...
 
Models of Operational research, Advantages & disadvantages of Operational res...
Models of Operational research, Advantages & disadvantages of Operational res...Models of Operational research, Advantages & disadvantages of Operational res...
Models of Operational research, Advantages & disadvantages of Operational res...
 
XVA, The Front Office Way
XVA, The Front Office WayXVA, The Front Office Way
XVA, The Front Office Way
 
Predictive model based on Supervised ML
Predictive model based on Supervised MLPredictive model based on Supervised ML
Predictive model based on Supervised ML
 
Computational Finance Introductory Lecture
Computational Finance Introductory LectureComputational Finance Introductory Lecture
Computational Finance Introductory Lecture
 
Predicting House Prices: A Machine Learning Approach
Predicting House Prices: A Machine Learning ApproachPredicting House Prices: A Machine Learning Approach
Predicting House Prices: A Machine Learning Approach
 
Introduction to algorithmic aspect of auction theory
Introduction to algorithmic aspect of auction theoryIntroduction to algorithmic aspect of auction theory
Introduction to algorithmic aspect of auction theory
 
Probability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdfProbability and random processes project based learning template.pdf
Probability and random processes project based learning template.pdf
 
Graphs and Financial Services Analytics
Graphs and Financial Services AnalyticsGraphs and Financial Services Analytics
Graphs and Financial Services Analytics
 
Stock Market Prediction.pptx
Stock Market Prediction.pptxStock Market Prediction.pptx
Stock Market Prediction.pptx
 
Stock Market Analysis
Stock Market AnalysisStock Market Analysis
Stock Market Analysis
 
Concepts of predictive control
Concepts of predictive controlConcepts of predictive control
Concepts of predictive control
 
Case study of s&p 500
Case study of s&p 500Case study of s&p 500
Case study of s&p 500
 
Big Data Project - Final version
Big Data Project - Final versionBig Data Project - Final version
Big Data Project - Final version
 

More from Ayan Sengupta (7)

Elliptic Curve Cryptography: Arithmetic behind
Elliptic Curve Cryptography: Arithmetic behindElliptic Curve Cryptography: Arithmetic behind
Elliptic Curve Cryptography: Arithmetic behind
 
Pricing of Apple iPhone
Pricing of Apple iPhonePricing of Apple iPhone
Pricing of Apple iPhone
 
Case Study on Housing.com
Case Study on Housing.comCase Study on Housing.com
Case Study on Housing.com
 
Cab travel time prediction using ensemble models
Cab travel time prediction using ensemble modelsCab travel time prediction using ensemble models
Cab travel time prediction using ensemble models
 
Nike Stock Pitch: Analysis and Valuation
Nike Stock Pitch: Analysis and ValuationNike Stock Pitch: Analysis and Valuation
Nike Stock Pitch: Analysis and Valuation
 
2-Approximation Algorithm of Semi-Matching Problem
2-Approximation Algorithm of Semi-Matching Problem2-Approximation Algorithm of Semi-Matching Problem
2-Approximation Algorithm of Semi-Matching Problem
 
Existence and Uniqueness of Algebraic Closure
Existence and Uniqueness of Algebraic ClosureExistence and Uniqueness of Algebraic Closure
Existence and Uniqueness of Algebraic Closure
 

Recently uploaded

call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Kalyan Call Girls 🌐 9920725232 🌐 Make Your Dreams Come True With Mumbai E...
VIP Kalyan Call Girls 🌐 9920725232 🌐 Make Your Dreams Come True With Mumbai E...VIP Kalyan Call Girls 🌐 9920725232 🌐 Make Your Dreams Come True With Mumbai E...
VIP Kalyan Call Girls 🌐 9920725232 🌐 Make Your Dreams Come True With Mumbai E...
roshnidevijkn ( Why You Choose Us? ) Escorts
 
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
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
 

Recently uploaded (20)

Top Rated Pune Call Girls Dighi ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Dighi ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Dighi ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Dighi ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Booking open Available Pune Call Girls Talegaon Dabhade 6297143586 Call Hot ...
Booking open Available Pune Call Girls Talegaon Dabhade  6297143586 Call Hot ...Booking open Available Pune Call Girls Talegaon Dabhade  6297143586 Call Hot ...
Booking open Available Pune Call Girls Talegaon Dabhade 6297143586 Call Hot ...
 
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Sant Nagar (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
 
7 tips trading Deriv Accumulator Options
7 tips trading Deriv Accumulator Options7 tips trading Deriv Accumulator Options
7 tips trading Deriv Accumulator Options
 
Top Rated Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
Top Rated  Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...Top Rated  Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
Top Rated Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
 
VIP Kalyan Call Girls 🌐 9920725232 🌐 Make Your Dreams Come True With Mumbai E...
VIP Kalyan Call Girls 🌐 9920725232 🌐 Make Your Dreams Come True With Mumbai E...VIP Kalyan Call Girls 🌐 9920725232 🌐 Make Your Dreams Come True With Mumbai E...
VIP Kalyan Call Girls 🌐 9920725232 🌐 Make Your Dreams Come True With Mumbai E...
 
Vasai-Virar Fantastic Call Girls-9833754194-Call Girls MUmbai
Vasai-Virar Fantastic Call Girls-9833754194-Call Girls MUmbaiVasai-Virar Fantastic Call Girls-9833754194-Call Girls MUmbai
Vasai-Virar Fantastic Call Girls-9833754194-Call Girls 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 )
Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )
 
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
 
(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
 
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Banaswadi Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
(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 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...
 
(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
 
Vasai-Virar High Profile Model Call Girls📞9833754194-Nalasopara Satisfy Call ...
Vasai-Virar High Profile Model Call Girls📞9833754194-Nalasopara Satisfy Call ...Vasai-Virar High Profile Model Call Girls📞9833754194-Nalasopara Satisfy Call ...
Vasai-Virar High Profile Model Call Girls📞9833754194-Nalasopara Satisfy Call ...
 
Stock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfStock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdf
 
Top Rated Pune Call Girls Shikrapur ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
Top Rated  Pune Call Girls Shikrapur ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...Top Rated  Pune Call Girls Shikrapur ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
Top Rated Pune Call Girls Shikrapur ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
 
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
 
Top Rated Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...
 
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...
 

Applications of Machine Learning in High Frequency Trading

  • 1. Applications of Machine Learning in High Frequency Trading
  • 2. HELLO!We are :- Aashish Jhamtani (15BM6JP01) Ayan Sengupta (15BM6JP09) Neeti Pokharna (15BM6JP27) Siddhant Sanjeev (15BM6JP45) Sujan Kumar Biswas (15BM6JP49)
  • 3. What is High Frequency Trading? Let’s start with the first set of slides 1
  • 4. “Mandatory Disclaimer All characters and events depicted in this project are entirely modeled. Any similarity to actual events or stock price movements is purely awesome.
  • 5. “Using computer algorithms to rapidly trade securities ● Positions are held for seconds to minutes ● Reaction times to market changes are sub-millisecond ● HFT accounts for more than 60% of all trading volume in some markets ● Due to market efficiency it is challenging to come up with robust predictive models ● Columns include timestamp, price, order-flag, size, etc.
  • 6. Challenges and Scope ◉ The special challenges for machine learning : due to very fine granularity of data. ◉ A lack of understanding of how such low-level data relates to actionable circumstances (such as profitably buying or selling shares, optimally executing a large order, etc.). ◉ No prior intuitions about how (say) the distribution of liquidity in the order book relates to future price movements, if at all. SCOPE : a comparative study of various ML strategies and their performance on the data obtained through the Bloomberg Terminal. Finally, to design a successful strategy to operate in such a scenario.
  • 7. How Does the Data Look Like
  • 8. WANT BIG IMPACT? USE BIG IMAGE.
  • 9.
  • 10. A PICTURE IS WORTH A THOUSAND WORDS A complex idea can be conveyed with just a single still image. Namely making it possible to absorb large amounts of data quickly.
  • 11.
  • 12. Holt – Winter’s Model Simple Exponential Smoothing is used for applying as many as three low-pass filters with exponential window functions. It was then used to predict the output for the next tick and the MSE was found to be : 253.9 Output curve is as shown :-
  • 13. Feed Forward Model A feed-forward neural network is an artificial neural network where connections between the units do not form a cycle. Here it was used to predict the output for the next tick and the MSE was found to be : 144.67 Output curve is as shown :-
  • 14. News Sentiment Analysis Stanford Parser was used to get the dependency graph for a sentence. Sentiment judged using senti-word-net. Output graph is as shown :-
  • 15. Black Schole’s Model ● Stock prices follows geometric Brownian motion i.e. returns follow lognormal distribution with constant drift and volatility ● For one period binomial model call price under risk neutral probability measure Q in arbitrage free market is ● The call price C(t,x) satisfies the equation ● Solving the above equation gives us
  • 16. Limitations of Black Schole's R Simulation ● Log returns of stocks do not always follow normal distribution as shown in the graph below. ● Fixed risk free rate, no dividend and fixed volatility assumptions are not always valid. ● The market is not complete, because of the transaction cost i.e. not always possible to choose suitable hedging portfolio (aH,bH) in risky and risk free assets. ● Out of the money performance of BS model is not as good as in the money performance. ● A fixed no-arbitrage price for any option on the stock.
  • 17. Markov Diffusion Model ● The drift and volatility are finite state Markov chain in continuous time. ● For example - Assume drift and volatility both are 2-state processes. Then the stock price follows Markov switching diffusion model - ● Then the arbitrage free European call price for maturity T, strike price K are two solutions -
  • 18. Markov Diffusion Model R Simulation • If at both states drift and volatility remains same, this model corresponds to Black and Scholes model. • The market is not complete because of the state transitions. • The output is shown below :-
  • 19.
  • 20. Jump Diffusion Process • Jumps should occur in an instantaneous fashion, neglecting the possibility of a Delta hedge • Probability of any jump occurring in a particular interval of time should be approximately proportional to length of that time interval • All future jumps should have no "memory" of past jumps • The extra parameters ν and m represent the standard deviation of the lognormal jump process and the scale factor for jump intensity, respectively.
  • 21. Jump Diffusion Result Discussion High RMSE (=26.7) since, Jump-diffusion model cannot incorporate possible dependence structure among asset returns (the so-called “volatility clustering effect”), simply because the model assumes independent increments. Here is the plot for the same :-
  • 22.
  • 23. Support Vector Regression • Motivation: Find a function that tries to predict dependent variable (Y) on the basis of independent variables (X) such that deviation from predicted value and actual value is less than or equal to a measure (ε) till which error is tolerated • Methodology: Polynomial Kernel used - Radial Basis function kernel • Advantage: In traditional methods, only Stock Price, Strike Price and Time to Maturity are used. SVR can capture the effect of Risk free interest rate and volatility which are dynamic with time • Conclusion: Decent RMSE (=19.56) compared to other parametric methods
  • 24. Symmetrized Nearest Neighbour • Semi-parametric estimation of liquidity effects on option pricing • When obtaining volatility nonparametric function in money-ness intervals for which amount of data is relatively small, use of multivariate kernel based on global smoothing parameter may lead to poor estimation results • When estimating in one point we calculate weight for rest of our observations by looking at distance between values of empirical distribution at each point rather than distance between points themselves • Empirical distribution changes the random design to a uniform design with knots uniformly spaced between zero and one
  • 25. Symmetrized Nearest Neighbour Regression Results Inputs: • Money-ness • Bid ask Spread • Days until Expiration (T) • Volatility calculated was given as input in BS model Conclusion: In-sample performance of model is better compared to a competing model without liquidity. However, out-of-sample performance is quite disappointing resulting in high MSE
  • 26. K Nearest Neighbour Implementation and Results • Non-parametric algorithm that can be used for either classification or regression. • For each data point, the algorithm finds the k closest observations, and then classifies the data point to the majority. • The data set was encoded so as to fit the KNN classifier to it. The data was compared to the previous tick and if there was an increase from a previous value then the data was encoded as 1, 0 otherwise • Accuracy was checked for the data and a corresponding confusion matrix was created for the data • Highest Accuracy was found for value of K=5
  • 27. Artificial Neural Network : Conjugate Gradient MOTIVATION :- • Results suggest that machine learning can be used as a basis for effective option investment strategies using several Multilayer Perceptron models. • Existing models in finance for predicting the price of an option, most of which revolve around the Black-Scholes model; however, these models tend to involve highly complex mathematics and often make many assumptions about the underlying characteristics of the market. ADVANTAGES:- • Machine Learning techniques do not make any implicit assumptions about the relationships between input variables. Using an Artificial Neural Network, we are able to let the learner discover relationships that may not be included in standard models like Black-Scholes.
  • 28. Artificial Neural Network : Conjugate Gradient (Cont…) METHODOLOGY :- From The data obtained by Bloomberg Terminal, we obtained the historical data of the following attributes. • Strike Price (X) • Underlying Stock Price (S) • 10-day Historical Volatility • 30-day Historical Volatility • Days until Expiration (T) • The Market Price of the Option (P) • The 10 previous days of stock prices • Risk-free rate • Expiration Price of Stock (E) Apply ANN using these parameters
  • 29. Artificial Neural Network : Conjugate Gradient (Cont…) CONCLUSIONS :- Using Artificial Neural Network on the test data for option pricing gives a more accurate result as compared to the other base learner models. For further improvements we can add the following parameters as the input to the specified model as well. • Measures of Volatility • Previous Stock Prices Although ANN using Conjugate Gradient is a very renowned and used Machine Learning method, it doesn’t provide a very accurate result as Conjugate Gradient doesn’t account for the damping Least Square Error.. Due to this problem we switch over to the Levenberg Marquardt Optimization in Neural Network which takes care of the above specified problem.
  • 30. Artificial Neural Network : Levenberg Marquardt • Majorly used to solve non-linear least squares problems. • Finds local minima instead of global minima. • LMA interpolates between the Gauss-Newton Algorithm (GNA) and the method of gradient descent.
  • 32. TRADING Price appreciation, Timing risk Market impact trade fast trade slowly We want to balance market risk and market impact. Market risk Market impact We have to deal with …
  • 33. DISCRETE TRADING MODEL ◉ Trading is possible at N discrete times ◉ No interest on cash position ◉ A trading strategy is given by (xi)i=0..N+1 where xk = #units hold at t=k (i.e. we sell nk=xk-xk+1 at price Sk) ◉ Boundary conditions: x0 = X and xN+1 = 0 ◉ Price dynamics: Exogenous: Arithmetic Random Walk Sk = Sk-1 + (k+), k=1..N with k ~ N(0,1) i.i.d Endogenous: Market Impact
  • 34. HIDDEN MARKOV MODEL ◉Decide the “hidden” states: up trend, mean reverting, down trend MEAN REVERTING μ ≈ 0 DOWN μ >> 0 UP μ >> 0 p11 p12 p13 p22 p21 p23 p33 p32 p31
  • 35. TECHNICAL INDICATORS BOLLINGER BANDS & STOCHASTIC OSCILLATORS Stochastic Oscillator ◉Offers a measurement of deviance of currency pair’s rate (price) from its normal levels ◉Offers indications of when a currency pair is overbought/oversold ◉Works well in markets that are not trending, but rather just fluctuating back and forth between an upper level (resistance) and a lower level (support) Bollinger Bands ◉Excellent range-bound indicator that measures standard deviation from the moving average ◉Operates under the logic that a currency pair’s price is most likely to gravitate towards its average, and hence when it strays too far – such as two standard deviations away – it is due to retrace back to its moving average
  • 36. “ Plots three bands on a price chart to create two price channels. The security is said to be overbought if price line is consistently near or breaches upper price band. It may be oversold if the price line is consistently near or drops below the lower price band.
  • 39. “ Overbought position is confirmed if stochastic lines cross above 80 and, at the same time, price line is consistently near upper Bollinger Band. At that level, prices are expected to drop soon. The opposite is also true.
  • 42. STRATEGY IS SIMPLE The first condition you are looking for is a candle breaking the UPPER or LOWER Bollinger Band Look for stochastics to have traveled above 80 line (for a bullish candle traveling outside upper Bollinger Band), or below the 20 line Wait for the next candle to form before you get into the trade Once the next candle has formed the stochastics lines should have crossed and be heading back towards the white line. If the stochastic lines have not yet crossed or they are becoming further apart do not take the trade, wait until all of the conditions are met. If the conditions have been met, place a trade in the opposite direction of the previous candle
  • 43. PERFORMANCE INDICATOR Sharpe Ratio Is the ratio of yearly return to yearly volatility
  • 44. SHARPE RATIO TABLE TO COMPARE ALGORITHMS Value DataSet -0.00029266783 Black Scholes -0.1735110594 Jump Process -0.173409357 SNN & SVR -0.00012865643
  • 46. CONCLUSIONS • The out-of-sample performance is not comparable regardless of what option pricing model is employed in the estimation • Artificial Neural Network (Feed Forward) model gives best result among forecasting tools • Semi-parametric implied volatility estimation is more effective than BS implied volatility • Non-parametric method give better accuracy compared to parametric methods • SVR takes less time and gives decent result among the non-parametric methods • ANN able to capture effect of many more variables like dividend and historical volatilities but largely depends on the volatility of data input
  • 47. REFERENCES • Machine Learning for Market Microstructure and High Frequency Trading • Quest for Efficient Option Pricing Prediction model using Machine Learning Techniques - B.V. Phani, B. Chandra, Vijay Raghav • A Semiparametric Estimation of Liquidity Effects on Option Pricing - Eva Ferreira • http://www.platonniaga.com/downloads/ea- documents/Lesson%205%20Stochastics%20and%20Bollinger%20Bands.pdf