High Frequency Trading Systems Design and Testing

advertisement
The Growing Importance
of
Systems Design and Quality Assurance
in High-Frequency Trading Systems
December 2010
Proprietary and Confidential
Table of Contents








Background, Growth of HFT Systems
Low Latency Design Focus
Speed, Low Latency Messaging Considerations
Proximity Hosting / Co-Location to Matching Engines
The Big Challenge – Systems Design for Irrational Conditions
Trading in Highly Abnormal Market Conditions
The Importance and Role of Code Reviews, Quality Assurance
Conclusions
Tellefsen and Company, L.L.C.
Proprietary and Confidential
Background and Growth of HFT





High-Frequency Trading (HFT) is the execution of
computerized trading strategies, characterized by extremely
short position-holding periods.
Trading applications run on high-speed computers to
analyze market data, use algorithms to find trading
opportunities that may open up for only a fraction of a
second to several hours.
HFT began around 1999; by the early 2000s, HFT
accounted for less than 10% of equity trades.
Today, HFT accounts for over 70% of equity trades in the
US and is rapidly growing in popularity in Europe and Asia.
HFT is currently estimated to make up 56% of all equity
trades in the US and 38% in Europe. - Tabb Group
Tellefsen and Company, L.L.C.
Proprietary and Confidential
Low Latency Design Focus



In order to capitalize on arbitrage opportunities or to
find/exploit undervalued / overvalued assets, time to market
is key (i.e., speed).
HFT applications incorporating ultra-low-latency direct
market access technologies (“ULLDMA”) have became in
vogue.
Allowing irrational movements in short timeframes (“e.g.,
May 2010 Flash Crash”).
Tellefsen and Company, L.L.C.
Proprietary and Confidential
Proximity Hosting, Co-Location Near
Exchange Matching Engines




Low-latency and system turnaround time requirements for
HFT systems has influenced trading firms’ decisions about
their choice of networks and physical hardware location of
their servers.
Major exchanges established co-location data centers to
accommodate the demand for speed and to capitalize on
the value of proximity to their matching engines.
The closer the proximity to matching engines, the higher
the premium that exchanges and co-lo vendors can charge
to HFT firms.
The location and ULLDMA technology are available and
proven, however…
“Sometimes is doesn’t matter how fast you are running …
if you’re heading for a cliff”
Tellefsen and Company, L.L.C.
Proprietary and Confidential
The Big Challenge – Systems Design
For Irrational Conditions

There is a need to stress-test system designs for trends and
market extremes – e.g.:
–
–
–
–
A stock doesn’t move more than “X” ticks at a time
A stock doesn’t move more than “X” percent over a trading period (hour, day,
week, etc)
Classes of assets and individual issues have different price ranges
Design must be both broad and granular for logic checking

Design reviews should be done in consultation with market
structure experts and experienced trading system designers

HFT engines should NOT be trailblazers creating new high’s
or new lows for the day (outside of the primary market)
Tellefsen and Company, L.L.C.
Proprietary and Confidential
Trading in Highly Abnormal Market
Conditions


Once the system is designed to detect highly abnormal,
unrealistic market conditions, separate logic should be
created to handle them
Possible actions:
–
–
–
Slow down the sampling period – see if the market is making corrections and
trend is toward a normal price (take advantage of the correction)
Go into a “semi-automatic” mode – turn controls over to an experienced trader /
trading desk for review and release
Stop the train – don’t go off the cliff and become the target of a regulatory
investigation (prevent the train wreck).
Tellefsen and Company, L.L.C.
Proprietary and Confidential
The Importance and Role of Code
Reviews and QA

Conduct software walk-throughs with both software
engineers and subject matter experts:
–
–
How should the system react under conditions of normal market irregularities
How should the system react under conditions of abnormal behavior

Regression test the system over periods of low and high
volatility.

Back-test for highly irregular trading (high water mark
days):
–
–

October 19, 1987
May 6, 2010
Conduct QA reviews for defects in application design logic;
stress and regression test.
Tellefsen and Company, L.L.C.
Proprietary and Confidential
Conclusions

HFT designs and testing should anticipate irrational
movements in the market

Regression testing of trading applications for periods of
both low and high volatility

HFT systems should not (on their own) create new highs or
lows for the trading day

Augment internal code reviews and QA teams with experts
that have extensive market knowledge and software
development experience
Tellefsen and Company, L.L.C.
Proprietary and Confidential
Download