Execution Algorithms

How can we get the best price for our trade?

Trading facts

... that most people don't know

  • 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

What's the aim here?

Whether you are an investor

or a fund manager

and you don't want to be picked off by others

and you wish you could turn the tables

and use this stuff in your trading!

Why should we use execution algorithms? 

  • Earn money by trading at better prices
  • Earn the bid-ask spread and don't pay it
  • Get exchange rebates by placing limit orders
  • To not get picked off by high-frequency traders
  • A lot of high-return low-risk strategies
    become investment possibilities if we are
    able to execute our trades with no cost

Using machine learning to guess what could be the best time in the day to place the trade

Investor placed an order to buy 100 shares of an ETF "VTI"

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

Long-term investors don't need to pay the bid-ask spread

There are times when we could lose 0.2% straight if we place a "market-order". A long-term investor who is not looking to buy or sell immediately should be able to earn the spread by patiently placing limit orders

  • Current price = $110
  • Bid-Ask Spread = $0.22
  • Loss % = (0.22/110)*100 = 0.22%

If we place a market order to buy

$109.89

$110.11

What we would have paid if we had been patient with a limit order

What we paid

Bid Side

Ask Side

Example of a market order

What is an execution algorithm exactly?

Execution algorithms are machine-learning based strategies that look at all the petabytes of data in stock markets to guess intra-day price patterns.

Execution algorithms take requests from long-term investors about what they want to trade and figure out how best to place those orders.

Execution algorithms are intra-day trading high-frequency strategies that long-term investors can use to reduce the work of portfolio management.

How would an execution algorithm work?

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 a 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: The development of successful execution algorithms needs data in the order of 10s of TBs. Obtaining all this tick by tick market data is very 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 layered trading pipeline to ensure an optimal and secure execution.

At qplum, we have gone to great lengths to ensure we have high-quality 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 do 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

Using high-frequency-trading

... and not fighting it

Made with Slides.com