Article Reviews, Trading

ACM Articles on HFT Technology and Algorithms

There are two interesting articles on HFT at ACM (links here and here). They contain various tidbits of information. The figures quoted are pretty interesting, as they really show how competitive the space has become, and how much money and brain power has been thrown into the field with the allure of big money.

HFT Requirements

  • Tick-to-Trade Latency
    • 50 microseconds latency (equivalent to access latency for a solid-state drive, blink of a human eye takes ~300 ms).
    • Tick-to-trade is the time it takes to receive a packet at the network interface, process the packet and run through the business logic of trading, and send a trade packet back out on the network interface.
  • Able to see and process every update in the best bid and ask prices, including the best bid and ask sizes
    • ~215,000 quote updates per second on the NYSE
  • Efficient parsing
    • ASICs can parse market data and send executions in 740 nanoseconds (compared to human reaction time to a visual stimulus of ~190 million nanoseconds).
  • Efficient memory handling
    • Use minimal amount of data and parameters
    • Store in fast memory, e.g. L1 cache
  • Customization
    • Real-time kernels with bypass drivers
    • Custom code on the switches using FPGA

HFT Technology Stack

  • Co-Location
    • Need to co-locate in at least 6 data centers in New York to be competitive in equities.
    • Other assets would need co-location in New York, Chicago, London, etc.
    • Length of cable within the same building is a competitive advantage.
  • Networking
    • Within data center: NAT and cross-connect
    • Outside data center: Two sets of links, a high-throughput 10GbE private p2p fiber, and a low-throughput fast path using millimeter and microwave (lower latency).
  • Feed handler
    • Parses market data feeds and constructs a “clean” book, now a commodity hardware product.
  • Tickerplant
    • Distributes market data feeds to internal systems based on their subscriptions.

Queue Life

  • Definitions
    • bs0 = size on the best bid; as0 = size on the best ask
    • bs1 = size on the 2nd best bid; as1 = size on the 2nd best ask
    • Bid imbalance = pUP = bs0 / (bs0 + as0)
    • Ask imbalance = pDN = as0 / (bs0 + as0)
  • Speed at which an order gets to the front depends on
    • Rate at which trades take orders off the front of the queue
      • Probability of execution at the bid is related to queue size.
      • E.g. probability of executions at the bid = 0.47 * pUP ^ (-1.593)
    • Rate of cancelling of other orders
      • The closer your order gets to the front of the queue, the less likely an order in front of it will cancel, so your progression slows.

Making the Spread

  • If your order is executed and there is still a large queue at that price, you have a free option to collect the spread. If your orders on the opposite queue is executed, you make the spread.
  • If the queue you were executed on gets too small, you scratch the trade by actively hitting the orders behind you.

Exchange Technology

  • Order Gateway now using proprietary binary protocols instead of FIX to improve latency.
  • Market Data Gateway distributes using UDP Multicast for co-located customers (usually binary or easy-to-parse text format), TCP for non-co-located customers. FX market data is distributed over TCP in FIX format.

One-Pass Algorithms

  • Receive one data point at a time and use it to update a set of factors. After the update, discard the data point, keep the updated factors in memory.
  • alpha = the rate at which old information is forgotten, range (0, 1)
    • As alpha approaches 1, the measures / signals are smoother but it may lag the underlying trend.
  • Running Mean of Liquidity
    • Factor that predicts the available liquidity, defined as the sum of the sizes at the best bid and the best ask, at a fixed horizon in the future. Useful in estimating what order size is likely to execute at the best quotes at a given latency.
    • SMA is a two-pass algorithm because each data point needs to be accessed twice, once to add to the MA and then again to drop it out of the moving average. EMA is a one-pass algorithm.
    • If the time series has heavy tails, the exponential smoothed average might be dominated by an extreme observation. To solve this long-term memory effect, do frequent restarting of the estimation procedure.
  • Running Volatility Estimation
    • Factor that predicts the realized volatility over a fixed horizon in the future. Useful in quantifying the short-term risk of holding inventory.
    • An online one-pass algorithm can estimate the volatility using an exponential weight scheme.
  • Running Linear Regression
    • Factor that predicts the expected P&L of a long-short position in two related assets. Useful in constructing a signal indicating when a long-short position is likely to be profitable.
    • A one-pass algorithm for exponentially weighted linear regression can be used, known as recursive least squares with exponential forgetting.

Model Life

  • By 2010, most of the models at that time were running at half-lives of 3 to 6 months.



No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Copyright © 2005-2014 All Rights Reserved.

Enter your email address to follow this blog and receive notifications of new posts by email.

Blog Stats

  • 399,034 hits
%d bloggers like this: