execution algo^algo strategy

I think the “exec algo” type is lesser known.

  • VWAP is best known example
  • bulk orders
  • used by many big sell-sides (as well as buy-sides) to fill client orders
  • the machine acts as a robot rather than a strategist
  • goal is not to generate alpha, but efficient execution of a given bulk order

 

essential GTD know-how to build a HFT infrastructure#early 2015

Hi

(See also http://bigblog.tanbin.com/ post on HFT)

Just to share some observations and reflections. More than one Asia (and to a lesser extent US) recruiters have reached out to me as a potential lead-developer for a HFT engine, to be created from scratch. I believe there are not many old hands in Singapore. Even in the US, this is a relatively small circle. Not a commodity skill.

A small trading shop would have very different needs than a big bank, so their HFT engine will use off-the-shelf tools for most but the most critical, customized modules. (I had a brief blog post on it.) What are the 10 essential know-how i.e. Essential functionalities you must know how to create (prove)?

• executing strategy for order origination, i.e. machine trading
** market data processor
** order book? perhaps at the center of the engine
** not needed — how to come up with strategies
• in-sample testing
• barebones GUI, or perhaps command line interface?
• FIX or other exchange APIs
* store historical data for analysis. Perhaps SQL or KDB.
• data persistence without SQL

Low-level tech knowledge
• threading
• STL
• [W] Boost
• debugger
• [N] memory leak detection
• [N] unit testing
• [NW] socket programming

[N = Not needed in every shop, but often required by interviewer]
[W = my weakness, relatively speaking]

mean reversion, deviation detector, pattern recognition

Nothing, including real time mkt data analyzers, can predict the future. They can point out unusual deviations which often precede reversions to norm. In such a case timing is unpredictable though.

Case in point — When I saw historical highs in copper price, I thought it would drop (reversion) within hours, or at most couple of days, but it just kept rising and destroyed my position. (A necessary condition for my undoing is margin. No margin, no collapse.)

I guess China Aviation Oil might have something like this?

Such a reversion is one type of pattern. Some patterns have a strong rational, logical basis. Consider historical vol’s mean reversion pattern. Consider the widening spread on-the-run vs off-the-run.
Mean reversion is one type of deviation detector.

execution risk in a VWAP execution algo

Background: VWAP strategy is known to have minimal market impact but bad “execution risk”.

Suppose you are given a large (500,000 shares) Sell order. Suppose your goal is minimal market impact i.e. avoid pushing up the price. What execution strategy? I don't know about other strategies, but VWAP strategies generally participate according to market volume, so given a decent implementation the market impact is often … reduced.

I think the idea of the Exec risk is the _uncertainty_ of the final block price. If an implementation offers a very tight control and results in well-controlled final block price, then exec risk is small. http://www.cis.upenn.edu/~mkearns/finread/impshort.pdf explains with an example —

suppose MSFT trades 30 million shares on an average day. If a trader has three million MSFT shares to trade, a VWAP algorithm may be appropriate. However, if the trader

gets 30,000 shares of MSFT to trade, then the savings of market impact (by spreading the trade over the whole day) is not significant compared against the opportunity cost the trader could save by trading the stock within the next few minutes. Quick execution means the uncertainty (or std) in “final block price” is much reduced. With a small order you would achieve something close to the arrival price.

vwap execution chasing the wrong signal – my guess

A vwap algo starts with a “model profile”, which tells us each hour (or minute) of the trading day typically experiences how many percent of the total daily volume.

Then the algo tries to execute according to the model profile, executing 10% in the first hour. The actual market profile may show a spike in the second hour. Suppose 2nd hour usually gets below half of first hour according to the model profile, but we see it's going to more than double the first hour, because the past 5 minutes show a very high spike in volume.

Question is, should we increase our trade rate? I guess there's reason to do so. When the volume spikes, we should trade bigger chunks so as to let the spike “mask and absorb” our market impact. If we don't capture this spike, then 2nd hour might end up being 80% of daily volume, but we only put in 4% our quantity, so our remaining quantity would cause market impact.

However, it's also possible to chase the wrong signal. The spike might cause a large rise or (more likely in realistic panic-prone markets) drop in price, which could reverse soon. Suppose we are selling a big quantity and the spike causes a big drop. Our active participation would further deepen the drop. We might do better to patiently wait for a reversal.

HFT – some defining features

I learnt it from a seminar. I didn't do any research. Just some personal observations.

* HFT is different from a broker execution algo in terms of holding period. HFT never holds a position overnight.

* HFT is alpha-driven. In contrast, a sell-side trading engine is driven by customer flow.

** however, HFT doesn't use market orders as much as limit orders, so it may appear to be market-making.

* an HFT engine makes many, many trades in a day, but so does a broker execution algo.

* HFT usually makes no directional bet. In contrast, fundamental strategies have a view. I feel a sell-side often have a view and may hold inventory overnight.

I think the distinction can become unclear between HFT and execution algos.

slippage – several similar meanings

slippage = difference between 2 prices — the earlier quoted by an OTC dealer (FX, bond, swap…) vs the requote when you take that quote. In many quote-driven markets, all public quotes are always indicative.

slippage = difference between 2 prices – the EOD benchmark vwap vs your block order’s execution vwap, assuming order filled within a day.

slippage = difference between 2 prices – the price that triggered your trading signal vs execution price. see http://en.wikipedia.org/wiki/Implementation_shortfall