high speed networks - applications in finance

32
High Speed Networks Applications in Finance Omar Bashir @OmarBashir_40 [email protected]

Upload: omar-bashir

Post on 22-Jan-2018

401 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: High Speed Networks - Applications in Finance

High Speed Networks

Applications in Finance

Omar Bashir

@OmarBashir_40 [email protected]

Page 2: High Speed Networks - Applications in Finance

Introduction - Education

NED University of Engineering & Technology, Pakistan

BE (Avionics Systems Engineering) - 1989

Loughborough University of TechnologyMSc IT (Electronic Communications) – 1995

Loughborough UniversityPhD (Computer Networks) – 1998

Page 3: High Speed Networks - Applications in Finance

1989-2002

Introduction - Career

Communications Enabling Technologies

2002-2003

2003-2004 2004-2005

2005-2006

20062006-2010

2010-2016

Page 4: High Speed Networks - Applications in Finance

A Successful Trade

● Opportunity

● Information

● Connectivity

● Speed

Page 5: High Speed Networks - Applications in Finance

The Need For Speed

● US Funding Act (1790)– Address the devaluation of US war bonds.

● Trading at a nickel on a dollar in expectation of a default.

– Guaranteed, dollar for dollar, all debt of the Union and the states.

– Land messangers carried the notification.

● Innovative traders chartered fast boats– Front ran the messangers.

– Bought war bond for pennies on the dollar.

Page 6: High Speed Networks - Applications in Finance

The Need for Speed

● Napoleonic Wars (1815)– Panic in London on Napoleon’s successes.

– Financial markets crashed.– Dealers sold government bonds.

● Nathan Meyer Rothschild– Used fast carrier pigeons to get the news of Nepoleon’s

defeat.

– Bought all British financial products in the markets.

– Prices soared when official news finally arrived.

– Rothschild became the richest man in Europe.

Page 7: High Speed Networks - Applications in Finance

Evolution of Financial Technology

Wall Street with telegraph wires 1880s

Trader examining price ticker tapereceived via telegraph

Page 8: High Speed Networks - Applications in Finance

Evolution of Financial Technology

Prices and products on screens, trading via voice over phone

Page 9: High Speed Networks - Applications in Finance

Evolution of Financial Technology

Screen trading

Page 10: High Speed Networks - Applications in Finance

Evolution of Financial Technology

Data Center

Page 11: High Speed Networks - Applications in Finance

Evolution of Financial Technology

Algorithmic and High Frequency Trading

Page 12: High Speed Networks - Applications in Finance

Objectives

“The trading floors of banks and exchanges will have one man, one dog and one machine.

The machine to trade,

the dog to guard the machine,

and the man to feed the dog.”

Page 13: High Speed Networks - Applications in Finance

But these machines have to be connected to trade

and they have to be able to communicate at speed

Page 14: High Speed Networks - Applications in Finance

Computer Networks

Page 15: High Speed Networks - Applications in Finance

Protocol Layers

Page 16: High Speed Networks - Applications in Finance

WAN Optimisations● Each layer adds data and processing overheads.● Functionality overlap in protocol layers.● Carrier grade fibre optic networks have infinitesimally

low error rates.● Physical layer switching components.

– ADM (Add Drop Multiplexers)

– Cross connects

– Traffic across WAN carried over a virtual topology.

● Hence a reduced need for data link layer in WANs.● IP (network layer) carried directly over SONET, SDH

or DWDM.

Page 17: High Speed Networks - Applications in Finance

Racing Against Light

Co-Location (CoLo)

When signals travel at 671 million miles per hour, every mile matters.

Page 18: High Speed Networks - Applications in Finance

Racing Against Light

Physical Data Path Optimisation

Gigabit data rates with higher compression.Adaptive coding and modulation for low error rates.Forward error correction.

Page 19: High Speed Networks - Applications in Finance

Hardware Implementation of Protocols

Page 20: High Speed Networks - Applications in Finance

The Bitter Truth

● Data on the wire is serial, one bit at a time.● Application level message throughput more

significant to the application than the bit rate.– Message formats matter

– Example, transferring the number 157,

Format Message on the wire

Text (ASCII) 0011 0001 0011 0101 0011 0111

BCD 0000 0001 0101 0111

Binary 1001 1101

Which format gets the message delivered faster at the same bit rate ?

Page 21: High Speed Networks - Applications in Finance

Conventional Financial Protocols

● Primarily text-based– FIX (Financial Information Exchange)

● Tag=Value;Tag=Value;Tag=Value…..8=FIX.4.2<SOH>9=153<SOH>35=D<SOH>49=BLP<SOH>56=SCHB<SOH>34=1<SOH>50=30737<SOH>97=Y<SOH>52=20000809-20:20:50<SOH>11=90001008<SOH>1=10030003<SOH>21=2<SOH>55=TESTA<SOH>54=1<SOH>38=4000<SOH>40=2<SOH>59=0<SOH>44=30<SOH>47=I<SOH>60=20000809-18:20:32<SOH>10=061<SOH>

● Initially developed for pre-trade workflow, now extended to execution and post-trade processing.

– FpML (Financial Products Markup Language)● XML-based● Standard for dealing and processing of derivatives

Page 22: High Speed Networks - Applications in Finance

FpML Snippet<requestAllocation xmlns="http://www.fpml.org/FpML­5/confirmation" xmlns:xsi="http://www.w3.org/2001/XMLSchema­instance" fpmlVersion="5­0" xsi:schemaLocation="http://www.fpml.org/FpML­5/confirmation ../../fpml­main­5­0.xsd">  <header>    <messageId messageIdScheme="http://www.party2.com/message­id">123453212</messageId>    <sentBy>PARTY2US33</sentBy>    <creationTimestamp>2002­12­03T09:57:00Z</creationTimestamp>  </header>  <isCorrection>false</isCorrection>    <correlationId correlationIdScheme="http://www.party2.com/correlation­id">18671867</correlationId>    <sequenceNumber>1</sequenceNumber>    <blockTradeIdentifier>      <partyReference href="party2"/>      <tradeId tradeIdScheme="http://www.swapswire.com/spec/2001/trade­id­1­0">10000</tradeId>    </blockTradeIdentifier>    <allocations>      <allocation>        <allocationTradeId>          <partyReference href="party2"/>          <tradeId tradeIdScheme="http://www.swapswire.com/spec/2001/trade­id­1­0">30001</tradeId>        </allocationTradeId>        <partyReference href="party3"/>        <accountReference href="ACC2"/>        <allocatedFraction>0.40</allocatedFraction>

Page 23: High Speed Networks - Applications in Finance

Text-based Financial Protocols

● Holistic verbosity– Heavy in the band,

● Large packet sizes.

– Heavy on the box,● Parsing from text and mapping to internal application

structures.

● Potential solutions– Compression

● Easy on the band but still heavy on the box.

– Encoding● Can be succinct on the wire and naturally map to

application structures.

Page 24: High Speed Networks - Applications in Finance

Proprietary Binary Alternatives● ITCH

– Lightweight protocol for subscriptions.

– TCP and UDP based.

● OUCH– Order management protocol.

● RASHPort– Routing And Special Handling.

– Order management in options market.

● SoupBinTcp– TCP based lightweight point-to-point protocol.

– Used in conjunction with higher layer protocols.● ITCH and OUCH ride on it.

Page 25: High Speed Networks - Applications in Finance

FIX: The Next Generation

● Reducing semantic verbosity.– Redefining workflows to remove redundant

messages.

● Optimising message structures.● Binary encoding.

– SBE: Simple Binary Encoding.

– GPB: Google Protocol Buffers.

– ASN.1: Abstract Syntax Notation One.

Page 26: High Speed Networks - Applications in Finance

Transport Layer Optimisations

● UDP in a CoLo environment.– Broadcast/multicast support.– Lower protocol overhead in the band as well as the

box.● TCP across subnets

– Reliable communication.– Can be replaced by UDP if reliable links connect

venues and clients.● Building in-band reliability over UDP is sub-

optimal.

Page 27: High Speed Networks - Applications in Finance

Out of Band Reliability over UDP

Customer VenueSequenced UDP Message Streams

MessagePersistance

Message Store Flow

Message Store Flow

TCP TCP

Missing Message Queries and Results

Missing Message Queries and Results

Page 28: High Speed Networks - Applications in Finance
Page 29: High Speed Networks - Applications in Finance

Application Architecture and Implementation

Page 30: High Speed Networks - Applications in Finance

Trading Systems

● Best practices ensuring scalability, extensibility and flexibility.

● Focused optimisations,– Start optimising the slowest elements.

● Microservices– Functionally granular implementations.

● Keeping latency intensive processes out of critical path,– e.g. persistence.

Page 31: High Speed Networks - Applications in Finance

Conclusions

● Speed and agility provide competitive business advantage.

● Performance is a holistic concept,– Optimisations should focus on the entire information

and processing chain.

● Continuous monitoring and performance analysis essential for optimisations.

Page 32: High Speed Networks - Applications in Finance