Introduction to Order Book, HFT (High Frequency Trading) and Simple Strategy: Buy Low Sell High


What is an Order Book?

In stock market or cryptocurrency exchange, we often see the following table of number entries which is known as “Order Book”.

bitcoin-orderbook Introduction to Order Book, HFT (High Frequency Trading) and Simple Strategy: Buy Low Sell High algorithms Buy Low Cryptocurrency High Frequency Trading (HFT) Sell High Strategy

Bitcoin Order Book

The red lines are selling orders while the green ones are buying orders. The Selling orders are on the top and the Buying orders are on the bottom.

The selling orders are ranked from highest to lowest where the lowest selling order is at the center of the order book. The buying orders are ranked from the highest to the lowest top to bottom where the center part is the highest buying order. If you look at the order book, the prices/tickers are sorted from top to the bottom regardless whether they are buying or selling order.

So, the exchange (stock or cryptocurrency) is to match the highest buying order with the lowest selling order. Once order/transaction is completed, the exchange will earn the fee – which is the main source of the monetization model for the exchanges (income).

The smallest unit of the price between any two orders is called ticker. For example, in the above bitcoin order book, the ticker is $0.01 USD.

The exchanges group the orders with the same price and fill the orders in the First-In-First-Out (FIFO) order. We can either place a Market Order or a Limit Order.

What is a Market Order?

A Market Order priorities fulfilling your order with the latest Market price. So the Market Orders are likely to be executed as long as there are enough quantity (regardless of amount).

What is a Limit Order?

A Limit Order ensures the price of execution is exactly the same as you specify. So, your Limit Order may be partially fulfilled or may not be executed at all. Your Limit Orders may be delayed due to lacking matched orders (buy vs sell, sell vs buy).

What is HFT (High Frequency Trading)?

The HFT aka High Frequency Trading – refers to using Exchanges’ API to do the trading via Buy/Sell orders, and make money by simple strategy Buy Low and Sell High.

The Simplest HFT Strategy – Buy Low Sell High

The Simplest HFT Strategy would be to place a equal number or buy and sell order at Lowest Sell and Highest Buy. If both orders are fulfilled, we make money – simple as that. For example, we place sell order of amount 100 at price 1.1 and also place a buy order of amount 100 at price 1. Then we will earn 100*(1.1-1)=10 if both orders are executed.

However, things are not always going as expected:

  • Timings: You might be slow as other party fulfills the order quicker than you.
  • Fees: The exchanges charge a fee once the order is completed/executed, so you need to take the fees into the HFT model, otherwise it might be a loss for you (the more orders fulfilled, the more loss you have)
  • Order Depth: If there are no enough matched orders (Order Depth), the orders will not be fulfilled/executed at all.

Recommendation: High-Frequency Trading (HFT) – Triangular Arbitrage Algorithm

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
697 words
Last Post: Manual RAID-1 using Two 18TB USB External Hard Drive (HDD)
Next Post: Teaching Kids Programming - Maximum Count of Positive Integer and Negative Integer in Sorted Array

The Permanent URL is: Introduction to Order Book, HFT (High Frequency Trading) and Simple Strategy: Buy Low Sell High

Leave a Reply