Execution Algorithms: Why What & How

Trading basics

  • Market has buyers(Bid side) and sellers(Ask side)
  • Best bid price is the maximum price buyers are agreeing to buy a product.
  • Best Ask price is the minimum price sellers are agreeing to sell at.
  • A market order means placing the order at the best price demanded by the other party. For a buy order ,it is best ask price. For a sell order ,it is best bid price.
  • A limit order means placing an order with a price. For a buy limit order, it is the maximum price one is willing to spend to buy. For a sell limit order, it is the minimum price one is willing to get to sell.
  • Spread = Best Ask Price - Best Bid Price

Price

Book size

Best Ask Price

Best Bid Price

$92.01

$92.04

...

...

$92.10

$92.13

Spread

Why execution algorithms? 

Why should you care about execution?

Naive portfolio managers place market orders for execution.

  • They get a bad price for the trade.
  • Exchanges charge additional fees for market orders.
  • Potential gain if market moves in favorable direction is not captured.

You are losing money to HFT firms !

Bad price for trade: Market orders incur loss equal to spread.

For EDV,  Vanguard Extended Duration Trs ETF, you would loose 0.2% straight if you place market order.

  • EDV price= $110
  • Spread = $0.22
  • Loss % = 0.22/110*100 ~0.2%

Lets place a buy market order

$109.89

$110.11

What all passive buyers are willing to pay

What you paid

Bid Side

Ask Side

Sometimes, waiting before sending an order to exchange can be profitable.

Order got generated at this point

We would save a lot if we wait and buy at this point

Let us consider buying VTI shares.

Execution Algorithms: What are they, and their impact.

What are Execution Algorithms?

A set of rules, encoded in software, which ensures fill at better price.

Price Movement of SPY

  • For a buy order, it gets fill near green dots.
  • For a sell order, it gets filled near red dots.

Execution Algorithms can have significant impact in overall performance.

In high turnover portfolio management systems, savings by smart execution algorithms are significant.

  • AUM: $100, 000  with 8000% turnover annually.
  • Average price of equity:$50.
  • Average savings (by execution algorithms) per share: $0.05.

Let us take a simple case:

(cntd) Execution Algorithms can have significant impact in overall performance.

  • Net $ Traded =100,000*80
  • # of shares traded = (Net $ Traded)/50) = 100,000*80/50
  • Savings = (# of shares)*0.05 = $8K !!

Above calculation shows 8% increment in portfolio returns solely from execution algorithm savings.

Let us take a simple case:

  • AUM: $100, 000  with 8000% turnover annually.
  • Average price of equity:$50.
  • Average savings (by execution algorithms) per share: $0.05.
  • Lets consider a passive investor who does recurring deposits in his portfolio and pays advisory fees to his financial advisor.
  • Assume recurring deposit of $2000 each month for 5 years.
  • Assume  $300 as advisory fees for 5 years.
  • By a similar calculation, one can find that using execution algorithms can save up to 40% of advisory fees.

(cntd) Execution Algorithms can have significant impact in overall performance.

Savings could be even more !!

In previous analysis we did not incorporate market micro-structure adverse effects when executing large orders naively.

(cntd) Execution Algorithms can have significant impact in overall performance.

Why don't all portfolio management firms have execution algorithms? 

It is tough to set up one !!

How much work it seems to need :)

How much work it actually needs !

Courtsey: https://sosamelasilva.files.wordpress.com/2012/12/iceberg.jpg

Lots of money, skilled  and dedicated  workforce is a must for sustaining support for execution algorithms.

  • Deep pipelines: Setting it up include multiple chains of processes, communicating with each other. At the same time, one has to optimize for the latency for the entire process.
  • Expensive data requirements: Development of successful execution algorithms need processed data in the order of 10s of TBs. Obtaining them is costly. Maintaining them is costlier and tougher.
  • A Very high penalty for error: An ultra high level of scrutiny is needed to ensure no bugs exist in the trading pipeline. A single line of erroneous code could result in huge losses for the company.
  • Big players have the system in place, but they are not open to retail investors.

qplum has a 3 layer trading pipeline to ensure an optimal and secure execution.

At qplum we  have gone lengths to ensure we have high quality processed data for our execution algorithms

  • Historical tick by tick data of last 10 years of over 5000 instruments. We save their processed form as well so as to get indicator values at a timescale of micro to milliseconds.
  • We feed live tick by tick data to our execution algorithms.
  • Above two data availability necessitates the presence of several pipelines to ensure their fail-safe processing, storage, and usage.

How Execution Algorithms work? 

Execution algorithms predict future market movement and act accordingly.

  • Assume that it knows the price is going to go up in next hour.
  • If it has a sell order, it simply waits for an hour and then places the order in exchange. In the case of a buy order, it sends the order immediately.

Let us take a simple example to get the idea in.

Market Movement prediction is a data intensive job. Sophisticated AI systems are set up to solve this problem.

 Execution algorithm module: Overall structure

Market movement prediction

One of qplum's algorithms predicting when the price would go up

Starting of prediction duration

End of prediction duration

A red vertical bar means that at that time, price is at a local minima

Price movement for etf VSS shown with blue lines

Execution Algorithms

By Ashesh Mishra

Execution Algorithms

  • 1,440