Upload
pasan-de-silva
View
119
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Paper presented, - [ H. Litz, C. Leber, and B. Geib,"DSL programmable engine for high frequency trading acceleration," In Proceedings of the fourth workshop on High performance computational finance (WHPCF '11). ACM, New York, USA, November, 13, 2011, pp. 31-38. ] addresses the domain of High frequency trading Acceleration using FPGA solutions from the perspective of a HFT firm
Citation preview
DSL Programmable Engine for High Frequency Trading Acceleration
1
DSL Programmable Engine for High Frequency Trading
Acceleration
ByHeiner Litz, Christian Leber
& Benjamin Geib
University of Heidelberg
Presenter :– Pasan De Silva
UCSC05 – 12 2013
Authors
Heiner LitzPostdoctoral Research Fellow at Stanford University
2
Benjamin GeibPerformance Engineer at IMC financial
markets & asset management
Christian Leber.University of Heidelberg
DSL Programmable Engine for High Frequency Trading Acceleration
Basic trading infrastructure
3
Exchange
Market Participants
Feed Handler
DSL Programmable Engine for High Frequency Trading Acceleration
What is HFT
Describes a set of techniques
within electronic trading of stocks where
a large number of orders are injected into the market
at sub-millisecond round-trip execution times
4
DSL Programmable Engine for High Frequency Trading Acceleration
HFT
Do not hold significant positions. (On average HFT holds a stock for about 22 seconds)
Generates revenue by buying and selling at a high speed.
Huge Impact !!! Around 73% of the trading volume on the U.S.
equity market is due to HFT. But only 2% of 20 000 firms trade using HFT.
5
DSL Programmable Engine for High Frequency Trading Acceleration
Strategies of HFT
Cross-market arbitrage Liquidity providing (narrowing the bid
ask spread) makes money out of urgency of sellers
High volatility
All strategies require absolute lowest round trip latencies. Only the fastest HFT
will benefit.
6
DSL Programmable Engine for High Frequency Trading Acceleration
How to achieve speed
The most time consuming tasks are offloaded in to optimized hardware blocks.
No need to travel through additional stacks. Every thing is handled at hardware level.
7
DSL Programmable Engine for High Frequency Trading Acceleration
What is FPGAs
Field-Programmable Gate Array, a type of logic chip that can be programmed.
A semiconductor device that can be programmed after manufacturing. Instead of being restricted to any predetermined hardware function, an FPGA allows you to program product features and functions and reconfigure hardware for specific applications even after the product has been installed in the field
FPGAs can be reprogrammed to desired application or functionality requirements after manufacturing.
8
DSL Programmable Engine for High Frequency Trading Acceleration
FAST protocol
Outstanding orders are made visible to market participants
A feed carrying this information is multicasted to the market participants using standardized protocols and transmitted over UDP over Ethernet
Compression mechanisms to reduce bandwidth introduces significant CPU overhead.
Decoding FAST is a major bottleneck in HFT.
9
DSL Programmable Engine for High Frequency Trading Acceleration
Proposed approach
Offloading decoding IP, UDP and Eth to optimized hardware blocks
Directly Decode FAST messages in the hardware.
Introduce parallel hardware structures to enable simultaneous decoding of multiple streams.
10
DSL Programmable Engine for High Frequency Trading Acceleration
Trading Decision making decision to buy or sell a stock, can be a very
complex and resource consuming task.
a variety of given parameters and incoming variables are compared using mathematical and statistical approaches
Due to its complexity, the decision making process is not offloaded to the FPGA but kept in software.
11
DSL Programmable Engine for High Frequency Trading Acceleration
Trading accelerator architecture
12
DSL Programmable Engine for High Frequency Trading Acceleration
IP, UDP and ETH decoding in Hardware
To reduce the latency of market data processing decoding of the complete IP, UDP and Ethernet stack is off loaded into hardware.
The Ethernet MAC as well as decoding of the different protocol layers is handled by a number of internal modules.
13
DSL Programmable Engine for High Frequency Trading Acceleration
FAST decoding in Hardware
FAST decoding has also been offloaded into hardware.
Each feed handler can define own templates. A microcode engine is used that supports a set of
instructions which enables it to decode any variation of the FAST protocol.
microcode is derived from a specification written in a domain specific language (DSL)
DSL is specifically developed for this project. The DSL description is then passed to a compiler
which transforms it into binary microcode that can be executed by the microcode engine.
14
DSL Programmable Engine for High Frequency Trading Acceleration
Fast decoder
15
DSL Programmable Engine for High Frequency Trading Acceleration
Optimization baseline implementation provides an
aggregated latency of only 2.6 us to decode the Ethernet, UDP and FAST data stream and transfer it to user space where it can be accessed by software.
But the analysis shows,
D fast realistic > D max
Needs to optimize further.
16
DSL Programmable Engine for High Frequency Trading Acceleration
Optimization technique 01Custom Instruction Segments.
offer discrete microcode segments, not only for each template but also for each
{TID, PMAP} tuple. Can increase development O/H substantially. Interestingly, only 5 tuples represent a 92%
probability of occurrence. Discrete microcode segments for these tuples
and generic microcode segments for the rest.
17
DSL Programmable Engine for High Frequency Trading Acceleration
Only five tuples represent a 92% probability of occurrence
18
DSL Programmable Engine for High Frequency Trading Acceleration
Other optimization techniques
Branch pre calculation
Variable Length Field Processing
19
DSL Programmable Engine for High Frequency Trading Acceleration
Evaluation improvements. In total, the baseline approach offers a Dmax of
4.8Gbit/s could be improved by over 56% to a new Dmax, optimized of 7.5Gbit/s.
20
Multi-threaded Performance Results
21
DSL Programmable Engine for High Frequency Trading Acceleration
Positives Very useful high end research. Clear language usage Appropriate usage of graphs and images.
Too summarized. Highly complex. Poor related work section. Considerable level of duplications with their original
paper.
22
Negatives
DSL Programmable Engine for High Frequency Trading Acceleration
Thank you !!!
23
DSL Programmable Engine for High Frequency Trading Acceleration