SlideShare a Scribd company logo
1 of 30
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Latency War - the Present & The Future
Gaurav Raizada
Quantinsti
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
It's the Latency, Stupid
Well known and referenced article
“a network link with low bandwidth can be made
better with money, but network link with bad latency
cannot be helped”
This was the scene in 1996, when bandwidth was the
constraint. Speeds were in Kbps.
Cheshire later become Wizard at Apple. Pioneering Zeroconf
http://rescomp.stanford.edu/~cheshire/rants/Latency.html
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Misnomer – Bad Terminology
Would you say that a Boeing 747 is three times "faster" than a Boeing
737? Of course not. They both cruise at around 500 miles per hour.
The difference is that the 747 carries 500 passengers where as the
737 only carries 150. The Boeing 747 is three times bigger than the
Boeing 737, not faster.
Now, if you wanted to go from New York to London, the Boeing 747 is
not going to get you there three times faster. It will take just as long as
the 737.
In fact, if you were really in a hurry to get to London quickly, you'd
take Concorde, which cruises around 1350 miles per hour. It only
seats 100 passengers though, so it's actually the smallest of the three.
Size and speed are not the same thing.
On the other hand, If you had to transport 1500 people and you only
had one aeroplane to do it, the 747 could do it in three trips where
the 737 would take ten, so you might say the Boeing 747 can
transport large numbers of people three times faster than a Boeing
737, but you would never say that a Boeing 747 is three times faster
than a Boeing 737.
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
System Architecture of a Traditional Trading System
• Traditionally a trading system would consist of
– A system to read data from the market
– A storehouse of historical data
– A tool to analyse historical data
– A system where the trader can input his trading decisions
– A system to route orders to the exchange
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
System Architecture of a Traditional Trading System
• The server – which is mostly a data store
Workshop on Algorithmic & High Frequency Trading
Order Manager
Market Data
Operational Data Store
Exchange
Data
Warehouse
/
Storehouse
of
historical
data
Data Vendor
Trader’s tool
Main Centre of operations –
analyzing market data wrt to
historical data in operational
data store and generating
orders
Server Exchange
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
System Architecture of a Traditional Trading System
• If data operations are simple… operational data store can be in
application layer (trader’s pc)
Workshop on Algorithmic & High Frequency Trading
Order Manager
Market Data
Operation
al Data
Store
Exchange
Data
Warehouse
/
Storehouse
of
historical
data
Data Vendor
Trader’s tool
Main Centre of operations –
analyzing market data wrt to
historical data in operational
data store and generating
orders
Application Server Exchange
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
System Architecture of an Automated Trading System
• With the advent of DMA & automated trading, the
following changes in architecture took place:
– Latency between Event Occurrence & Order Generation had to be
reduced to an order of milliseconds and lower.
– Order Management had to be made more robust to handle generation
of thousands of orders in a second
– Risk Management had to be done in real time and without human
intervention
Workshop on Algorithmic & High Frequency Trading
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
System Architecture of an Automated Trading System
• To be able to back-test strategies, two components are
required: (ii) a simulator destination instead of an actual
exchange
Workshop on Algorithmic & High Frequency Trading
Application
Order Manager
Market Data
Complex Event Processing
engine
Exchange 1
Storage
Application Server Exchange
Strategy
Settings
UI
State Mgmt
(PnL +
Position)
Order /
Execution
Monitor
Within
application
RMS
Maths
Calc
RMS
Admin
Monitor
Exchange 2
F
I
X
F
I
X
Data
Normalizer
Order
Router
Back
office
record
MktData
Store
Event
History
Adaptor for
third party
apps – R,
Matlab, etc
Data
Retrieval
Data Vendor
Replay of
stored
data
Simulator
exchange
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Introduction to low latency
• Technology – State of Art
• Approach to latency improvement
• Latest in Low Latency -approaches and technologies
being deployed to achieve low latency
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Why aim for Low Latency or Lowest ?
• It may be necessary to lower latency just to remain competitive
• The strategy demands low latency, perhaps.
• It may be desirable to improve latency to stop getting picked off by competitors
• With introduction of Colocations and increasing focus in remaining fastest in the
market, significant capital is invested. However it can all go waste, if correct
technology is not identified and implemented.
• The issue is that latency is difficult to quantify. As a result the value of latency
improvement, though easily understood, is extremely difficult to quantify
• Lower latency systems cost a lot more to build and deploy. Hence the objective
should be to find the right balance between investment and return on investment
in low latency
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Latencies – Strategy wise
Citihub, 2009
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Current Scenario
• Synchronized Markets – Correlated
• Volumes and Trades have increased
• Orders per Trade has increased drastically
• Synchronized Trading Patterns
• Need to increase throughput and lower latency
simultaneously
• CPUs not getting faster – since 2007. Only cores are
being added, not the frequency. Moore’s Law is
failing
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Performance Degradation with Throughput
http://www.ibm.com/developerworks/websphere/library/techarticles/0706_lou/0706_lou.html
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Causes of Degradation
• Massive headroom to allow for bursts typically 10:1 (like bridges and dams)
• Can be triggered by a shortage of any one of it’s resources:
– CPU cycles
– Memory
– I/O channel capacity
– Disk transfers
– Network transfers
• Shortage of one can trigger another e.g. shortage of memory causing CPU
Typical system response time against throughput and I/O thrashing
• Distributed deployments add an order of magnitude more complexity
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Amdahl’s law
• Amdahl's law, also
known as Amdahl's
argument,is used to find
the maximum expected
improvement to an
overall system when
only part of the system is
improved. It is often
used in parallel
computing to predict the
theoretical maximum
speedup using multiple
processors.
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Network Effects
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Latency by Distance
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Spread Networks
Estimated roundtrip time for an ordinary cable is 14.5 milliseconds,
giving users of Spread Networks a slight advantage.
In October 2012, Spread Networks announced latency
improvements, bringing the estimated roundtrip time from 13.1
milliseconds to 12.98 milliseconds.
Some companies, such as McKay Brothers and Tradeworx, are using
air-based transmission to offer lower estimated roundtrip times (9
milliseconds and 8.5 milliseconds respectively) that are very close
to the theoretical minimum possible (about 7.5-8 milliseconds).
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Microbursts
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Corvil Analysis
“For this feed, how much bandwidth is needed to protect
99.99% of packets from loss with no more than 100
microseconds of latency to be experienced during the busy 1
second of the trading day”
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Latency Recommendations
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Latency Breakdown
• Latency can be broken down into the following components
• L = P + N + S + I + AP
– P is Propagation time - sending the bits along the wire,
speed of light constrained
– N is Network packet processing – routing, switching and
protection
– S is Serialization time - pulling the bits on/off the wire
– I is Interrupt handling time – receiving the packet on a
server
– AP is Application Processing time
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Technology Mix
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Costs in Time (Years) for Time Reduction (micro-seconds)
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Tips
• Servers – Fastest Cores, Cache,
• Operating Systems – RT kernels
• Fastest Network Infra (Switches, Routers )
• Retune the TCP stack
• Program Runtime – isolcpus, stack bypass
• Solid State Drives
• Latency Tuning – TCP_NODELAY, sendfile(2), Lock
Free Codes
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Sample Solution Path
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Important dates
http://www.quantinsti.com/importantdates.html
*Scholarships: http://www.quantinsti.com/scholarships.html
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Program Delivery
• Weekends only program
– 3 hrs sessions on Saturday & Sunday both
– 4 months long program
– Practical Oriented
– 100 contact hours including practical sessions
• Convenience – Conducted online
• Open Source
• Virtual Classroom integration
• Student Portal
• Faculty supervision
• Placement assistance
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Q&A
• Please type your questions in the chat window.
• For more information visit:
Youtube channel : http://www.youtube.com/quantinsti
LinkedIn group :
http://www.linkedin.com/groups?gid=3412051
Facebook : https://www.facebook.com/quantinsti
© Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited
Thanks!
THANK YOU
Contact us at:
Email: contact@quantinsti.com or sales@quantinsti.com
Phone: +91-22-61691400, +91-9920448877

More Related Content

What's hot

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
 
Hacking The Trading Floor
Hacking The Trading FloorHacking The Trading Floor
Hacking The Trading Floor
iffybird_099
 

What's hot (20)

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...
 
Order book dynamics in high frequency trading
Order book dynamics in high frequency tradingOrder book dynamics in high frequency trading
Order book dynamics in high frequency trading
 
Algorithmic trading
Algorithmic tradingAlgorithmic trading
Algorithmic trading
 
How to design quant trading strategies using “R”?
How to design quant trading strategies using “R”?How to design quant trading strategies using “R”?
How to design quant trading strategies using “R”?
 
Changing Notions of Risk Management in Financial Markets
Changing Notions of Risk Management in Financial MarketsChanging Notions of Risk Management in Financial Markets
Changing Notions of Risk Management in Financial Markets
 
Careers in Finance for Tech Graduates
Careers in Finance for Tech GraduatesCareers in Finance for Tech Graduates
Careers in Finance for Tech Graduates
 
Changing Notions of Risk Management in Financial Markets
Changing Notions of Risk Management in Financial MarketsChanging Notions of Risk Management in Financial Markets
Changing Notions of Risk Management in Financial Markets
 
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
 
Empirical Analysis of Limit Order Books
Empirical Analysis of Limit Order BooksEmpirical Analysis of Limit Order Books
Empirical Analysis of Limit Order Books
 
Modelling Trading Strategies In Equities Presentation
Modelling Trading Strategies In Equities PresentationModelling Trading Strategies In Equities Presentation
Modelling Trading Strategies In Equities Presentation
 
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
 
Hacking The Trading Floor
Hacking The Trading FloorHacking The Trading Floor
Hacking The Trading Floor
 
Algorithmic Trading
Algorithmic TradingAlgorithmic Trading
Algorithmic Trading
 
High frequency trading
High frequency tradingHigh frequency trading
High frequency trading
 
A Flash Crash Simulator: Analyzing HFT's Impact on Market Quality
A Flash Crash Simulator: Analyzing HFT's Impact on Market QualityA Flash Crash Simulator: Analyzing HFT's Impact on Market Quality
A Flash Crash Simulator: Analyzing HFT's Impact on Market Quality
 
Webinar Mean Reversion Strategies Presentation
Webinar Mean Reversion Strategies PresentationWebinar Mean Reversion Strategies Presentation
Webinar Mean Reversion Strategies Presentation
 
The Genesis of an Order Type by Dan Aisen, Co-founder and Quantitative Develo...
The Genesis of an Order Type by Dan Aisen, Co-founder and Quantitative Develo...The Genesis of an Order Type by Dan Aisen, Co-founder and Quantitative Develo...
The Genesis of an Order Type by Dan Aisen, Co-founder and Quantitative Develo...
 
The Present and Future of High Frequency Trading
The Present and Future of High Frequency TradingThe Present and Future of High Frequency Trading
The Present and Future of High Frequency Trading
 
High-Frequency Trading and 2010 Flash Crash
High-Frequency Trading and 2010 Flash CrashHigh-Frequency Trading and 2010 Flash Crash
High-Frequency Trading and 2010 Flash Crash
 
Algorithmic trading
Algorithmic tradingAlgorithmic trading
Algorithmic trading
 

Similar to Latency war the present & the future

ETE405-lec9.pdf
ETE405-lec9.pdfETE405-lec9.pdf
ETE405-lec9.pdf
mashiur
 
Data Miniaturization- Implications for Mobile Devices - John Archbold, WindSp...
Data Miniaturization- Implications for Mobile Devices - John Archbold, WindSp...Data Miniaturization- Implications for Mobile Devices - John Archbold, WindSp...
Data Miniaturization- Implications for Mobile Devices - John Archbold, WindSp...
mfrancis
 
Hello Streams Overview
Hello Streams OverviewHello Streams Overview
Hello Streams Overview
psanet
 
Real World Use Cases and Success Stories for In-Memory Data Grids (TIBCO Acti...
Real World Use Cases and Success Stories for In-Memory Data Grids (TIBCO Acti...Real World Use Cases and Success Stories for In-Memory Data Grids (TIBCO Acti...
Real World Use Cases and Success Stories for In-Memory Data Grids (TIBCO Acti...
Kai Wähner
 

Similar to Latency war the present & the future (20)

Why I should Model my Network
Why I should Model my NetworkWhy I should Model my Network
Why I should Model my Network
 
Keeping SharePoint Always On
Keeping SharePoint Always OnKeeping SharePoint Always On
Keeping SharePoint Always On
 
Incapsula: How to Increase SaaS Websites’ Uptime and Accelerate Performance
Incapsula: How to Increase SaaS Websites’ Uptime and Accelerate PerformanceIncapsula: How to Increase SaaS Websites’ Uptime and Accelerate Performance
Incapsula: How to Increase SaaS Websites’ Uptime and Accelerate Performance
 
Does Big Data Spell Big Costs- Impetus Webinar
Does Big Data Spell Big Costs- Impetus WebinarDoes Big Data Spell Big Costs- Impetus Webinar
Does Big Data Spell Big Costs- Impetus Webinar
 
Real time applications using the R Language
Real time applications using the R LanguageReal time applications using the R Language
Real time applications using the R Language
 
Open Sourcing GemFire - Apache Geode
Open Sourcing GemFire - Apache GeodeOpen Sourcing GemFire - Apache Geode
Open Sourcing GemFire - Apache Geode
 
An Introduction to Apache Geode (incubating)
An Introduction to Apache Geode (incubating)An Introduction to Apache Geode (incubating)
An Introduction to Apache Geode (incubating)
 
Accelerating HPC with Ethernet
Accelerating HPC with EthernetAccelerating HPC with Ethernet
Accelerating HPC with Ethernet
 
Tectonic Shift: A New Foundation for Data Driven Business
Tectonic Shift: A New Foundation for Data Driven BusinessTectonic Shift: A New Foundation for Data Driven Business
Tectonic Shift: A New Foundation for Data Driven Business
 
ETE405-lec9.pdf
ETE405-lec9.pdfETE405-lec9.pdf
ETE405-lec9.pdf
 
Assessing Network Readiness
Assessing Network ReadinessAssessing Network Readiness
Assessing Network Readiness
 
HTTP/2 and a Faster Web
HTTP/2 and a Faster WebHTTP/2 and a Faster Web
HTTP/2 and a Faster Web
 
Data Miniaturization- Implications for Mobile Devices - John Archbold, WindSp...
Data Miniaturization- Implications for Mobile Devices - John Archbold, WindSp...Data Miniaturization- Implications for Mobile Devices - John Archbold, WindSp...
Data Miniaturization- Implications for Mobile Devices - John Archbold, WindSp...
 
Paul Polakos (Bel Labs, Alcatel-Lucent, USA) - Network Virtualisation
Paul Polakos (Bel Labs, Alcatel-Lucent, USA) - Network VirtualisationPaul Polakos (Bel Labs, Alcatel-Lucent, USA) - Network Virtualisation
Paul Polakos (Bel Labs, Alcatel-Lucent, USA) - Network Virtualisation
 
Larry Ellison Introduces Oracle Database In-Memory
Larry Ellison Introduces Oracle Database In-MemoryLarry Ellison Introduces Oracle Database In-Memory
Larry Ellison Introduces Oracle Database In-Memory
 
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
 
Final sip is so much more! webinar
Final sip is so much more! webinarFinal sip is so much more! webinar
Final sip is so much more! webinar
 
Hello Streams Overview
Hello Streams OverviewHello Streams Overview
Hello Streams Overview
 
WebRTC Customer Experience Optimizations - Kranky Geek Presentation
WebRTC Customer Experience Optimizations  - Kranky Geek PresentationWebRTC Customer Experience Optimizations  - Kranky Geek Presentation
WebRTC Customer Experience Optimizations - Kranky Geek Presentation
 
Real World Use Cases and Success Stories for In-Memory Data Grids (TIBCO Acti...
Real World Use Cases and Success Stories for In-Memory Data Grids (TIBCO Acti...Real World Use Cases and Success Stories for In-Memory Data Grids (TIBCO Acti...
Real World Use Cases and Success Stories for In-Memory Data Grids (TIBCO Acti...
 

More from 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
 
Masterclass: Natural Language Processing in Trading with Terry Benzschawel & ...
Masterclass: Natural Language Processing in Trading with Terry Benzschawel & ...Masterclass: Natural Language Processing in Trading with Terry Benzschawel & ...
Masterclass: Natural Language Processing in Trading with Terry Benzschawel & ...
QuantInsti
 

More from 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
 
Masterclass: Natural Language Processing in Trading with Terry Benzschawel & ...
Masterclass: Natural Language Processing in Trading with Terry Benzschawel & ...Masterclass: Natural Language Processing in Trading with Terry Benzschawel & ...
Masterclass: Natural Language Processing in Trading with Terry Benzschawel & ...
 
Algorithmic Trading in FX Market By Dr. Alexis Stenfors
Algorithmic Trading in FX Market By Dr. Alexis StenforsAlgorithmic Trading in FX Market By Dr. Alexis Stenfors
Algorithmic Trading in FX Market By Dr. Alexis Stenfors
 

Recently uploaded

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Recently uploaded (20)

Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 

Latency war the present & the future

  • 1. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Latency War - the Present & The Future Gaurav Raizada Quantinsti
  • 2. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited It's the Latency, Stupid Well known and referenced article “a network link with low bandwidth can be made better with money, but network link with bad latency cannot be helped” This was the scene in 1996, when bandwidth was the constraint. Speeds were in Kbps. Cheshire later become Wizard at Apple. Pioneering Zeroconf http://rescomp.stanford.edu/~cheshire/rants/Latency.html
  • 3. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Misnomer – Bad Terminology Would you say that a Boeing 747 is three times "faster" than a Boeing 737? Of course not. They both cruise at around 500 miles per hour. The difference is that the 747 carries 500 passengers where as the 737 only carries 150. The Boeing 747 is three times bigger than the Boeing 737, not faster. Now, if you wanted to go from New York to London, the Boeing 747 is not going to get you there three times faster. It will take just as long as the 737. In fact, if you were really in a hurry to get to London quickly, you'd take Concorde, which cruises around 1350 miles per hour. It only seats 100 passengers though, so it's actually the smallest of the three. Size and speed are not the same thing. On the other hand, If you had to transport 1500 people and you only had one aeroplane to do it, the 747 could do it in three trips where the 737 would take ten, so you might say the Boeing 747 can transport large numbers of people three times faster than a Boeing 737, but you would never say that a Boeing 747 is three times faster than a Boeing 737.
  • 4. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited System Architecture of a Traditional Trading System • Traditionally a trading system would consist of – A system to read data from the market – A storehouse of historical data – A tool to analyse historical data – A system where the trader can input his trading decisions – A system to route orders to the exchange
  • 5. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited System Architecture of a Traditional Trading System • The server – which is mostly a data store Workshop on Algorithmic & High Frequency Trading Order Manager Market Data Operational Data Store Exchange Data Warehouse / Storehouse of historical data Data Vendor Trader’s tool Main Centre of operations – analyzing market data wrt to historical data in operational data store and generating orders Server Exchange
  • 6. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited System Architecture of a Traditional Trading System • If data operations are simple… operational data store can be in application layer (trader’s pc) Workshop on Algorithmic & High Frequency Trading Order Manager Market Data Operation al Data Store Exchange Data Warehouse / Storehouse of historical data Data Vendor Trader’s tool Main Centre of operations – analyzing market data wrt to historical data in operational data store and generating orders Application Server Exchange
  • 7. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited System Architecture of an Automated Trading System • With the advent of DMA & automated trading, the following changes in architecture took place: – Latency between Event Occurrence & Order Generation had to be reduced to an order of milliseconds and lower. – Order Management had to be made more robust to handle generation of thousands of orders in a second – Risk Management had to be done in real time and without human intervention Workshop on Algorithmic & High Frequency Trading
  • 8. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited System Architecture of an Automated Trading System • To be able to back-test strategies, two components are required: (ii) a simulator destination instead of an actual exchange Workshop on Algorithmic & High Frequency Trading Application Order Manager Market Data Complex Event Processing engine Exchange 1 Storage Application Server Exchange Strategy Settings UI State Mgmt (PnL + Position) Order / Execution Monitor Within application RMS Maths Calc RMS Admin Monitor Exchange 2 F I X F I X Data Normalizer Order Router Back office record MktData Store Event History Adaptor for third party apps – R, Matlab, etc Data Retrieval Data Vendor Replay of stored data Simulator exchange
  • 9. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Introduction to low latency • Technology – State of Art • Approach to latency improvement • Latest in Low Latency -approaches and technologies being deployed to achieve low latency
  • 10. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Why aim for Low Latency or Lowest ? • It may be necessary to lower latency just to remain competitive • The strategy demands low latency, perhaps. • It may be desirable to improve latency to stop getting picked off by competitors • With introduction of Colocations and increasing focus in remaining fastest in the market, significant capital is invested. However it can all go waste, if correct technology is not identified and implemented. • The issue is that latency is difficult to quantify. As a result the value of latency improvement, though easily understood, is extremely difficult to quantify • Lower latency systems cost a lot more to build and deploy. Hence the objective should be to find the right balance between investment and return on investment in low latency
  • 11. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Latencies – Strategy wise Citihub, 2009
  • 12. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Current Scenario • Synchronized Markets – Correlated • Volumes and Trades have increased • Orders per Trade has increased drastically • Synchronized Trading Patterns • Need to increase throughput and lower latency simultaneously • CPUs not getting faster – since 2007. Only cores are being added, not the frequency. Moore’s Law is failing
  • 13. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Performance Degradation with Throughput http://www.ibm.com/developerworks/websphere/library/techarticles/0706_lou/0706_lou.html
  • 14. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Causes of Degradation • Massive headroom to allow for bursts typically 10:1 (like bridges and dams) • Can be triggered by a shortage of any one of it’s resources: – CPU cycles – Memory – I/O channel capacity – Disk transfers – Network transfers • Shortage of one can trigger another e.g. shortage of memory causing CPU Typical system response time against throughput and I/O thrashing • Distributed deployments add an order of magnitude more complexity
  • 15. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Amdahl’s law • Amdahl's law, also known as Amdahl's argument,is used to find the maximum expected improvement to an overall system when only part of the system is improved. It is often used in parallel computing to predict the theoretical maximum speedup using multiple processors.
  • 16. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Network Effects
  • 17. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Latency by Distance
  • 18. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Spread Networks Estimated roundtrip time for an ordinary cable is 14.5 milliseconds, giving users of Spread Networks a slight advantage. In October 2012, Spread Networks announced latency improvements, bringing the estimated roundtrip time from 13.1 milliseconds to 12.98 milliseconds. Some companies, such as McKay Brothers and Tradeworx, are using air-based transmission to offer lower estimated roundtrip times (9 milliseconds and 8.5 milliseconds respectively) that are very close to the theoretical minimum possible (about 7.5-8 milliseconds).
  • 19. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Microbursts
  • 20. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Corvil Analysis “For this feed, how much bandwidth is needed to protect 99.99% of packets from loss with no more than 100 microseconds of latency to be experienced during the busy 1 second of the trading day”
  • 21. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Latency Recommendations
  • 22. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Latency Breakdown • Latency can be broken down into the following components • L = P + N + S + I + AP – P is Propagation time - sending the bits along the wire, speed of light constrained – N is Network packet processing – routing, switching and protection – S is Serialization time - pulling the bits on/off the wire – I is Interrupt handling time – receiving the packet on a server – AP is Application Processing time
  • 23. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Technology Mix
  • 24. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Costs in Time (Years) for Time Reduction (micro-seconds)
  • 25. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Tips • Servers – Fastest Cores, Cache, • Operating Systems – RT kernels • Fastest Network Infra (Switches, Routers ) • Retune the TCP stack • Program Runtime – isolcpus, stack bypass • Solid State Drives • Latency Tuning – TCP_NODELAY, sendfile(2), Lock Free Codes
  • 26. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Sample Solution Path
  • 27. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Important dates http://www.quantinsti.com/importantdates.html *Scholarships: http://www.quantinsti.com/scholarships.html
  • 28. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Program Delivery • Weekends only program – 3 hrs sessions on Saturday & Sunday both – 4 months long program – Practical Oriented – 100 contact hours including practical sessions • Convenience – Conducted online • Open Source • Virtual Classroom integration • Student Portal • Faculty supervision • Placement assistance
  • 29. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Q&A • Please type your questions in the chat window. • For more information visit: Youtube channel : http://www.youtube.com/quantinsti LinkedIn group : http://www.linkedin.com/groups?gid=3412051 Facebook : https://www.facebook.com/quantinsti
  • 30. © Copyright 2010-2014 QuantInsti Quantitative Learning Private Limited Thanks! THANK YOU Contact us at: Email: contact@quantinsti.com or sales@quantinsti.com Phone: +91-22-61691400, +91-9920448877