Understanding types of market data

You can, most likely, work with market data without knowing much about the data itself. You can capture it, save it and deliver it to your clients who can use this data to do transaction cost analysis, trade surveillance, P&L and a lot of other stuff. But in the long run, you will find yourself in a position where knowing the data inside out would help a lot. It can even be the deciding factor in who gets the next promotion! To be able to do your job most effectively, it’s highly crucial to know the data itself. Understand life cycle of a trade: how is the data generated, how it is provided and how it is analyzed for different purposes by different teams.

I will be writing a series of posts about market data itself. This post will focus on types of data such as trade, quote and market depth. In a future post, I will cover types of securities as well.

Most common way of approaching this topic is probably by starting from the higher level with trades and quotes and then diving deeper into depth and orderbook data. However, I am going to explain in the reverse order because that’s the natural flow of the data. It will help you understand market data with respect to the trading life cycle.

Note: I excluded time stamps from examples below as they were unnecessary.

OrderBook
Let’s use our good friend Mark as an example. Mark is a doctor with some extra money that he would like to invest. He already has some AAPL stocks and is interested in buying some more. However, Mark is not the only person interested in doing so. There are hundreds/thousands of other people interested in doing so. As you know stocks don’t have a definite price. You can’t just go today and buy AAPL stocks at the same price as what they were yesterday. The prices move depending on the price buyer is willing to pay (bid) and the price seller is asking (ask). So, all those people that are interested in APPL stocks are offering a range of different bids and asks.

He goes to his broker and tells him that he is interested in buying 5 AAPL stocks at the price of 126.21 (bid) and sell 2 of his existing stocks for 126.32 (ask). The broker uses some trade execution tool to place the order in the queue. Yes, there is a queue. Orders are not fulfilled instantly. Now, David is also interested in AAPL stocks and he is willing to sell his stocks at 126.31 and buy for 126.21. Notice that the numbers are very close to what Mark is offering but even a little difference can make a huge impact on large orders. Just like Mark and David, there are others who are placing similar orders for AAPL stocks through their broker. The table below contains the name of the trader (Mark), name of security (AAPL), bid price (126.21), ask price (126.32), bid size (5), ask size (2) and the name of exchange where the order was placed.

trader   sym  bid    bid_size ask    ask_size ex
----------------------------------------------------
Mark     AAPL 126.21 5        126.32 2        NYSE
David    AAPL 126.21 5        126.31 4        NYSE
Mike     AAPL 126.25 2        126.31 1        NASDAQ
Himanshu AAPL 126.26 6        126.27 3        NYSE
Bill     AAPL 126.26 4        126.27 6        NASDAQ
Tom      AAPL 126.9  1        126.23 4        NYSE
Carl     AAPL 127    3        126.23 3        NASDAQ

This is called OrderBook data. It is the deepest you can go with market data. You get to see each order, broker and size per order. You company may or may not capture this data since OrderBook data is HUGE. You don’t want to be capturing it unless you really need to.

OrderBook data lets you see who is placing the orders at each level.
On the safer side, you can try herbal Arozyme canadian pharmacies viagra capsules. Here, we will give examples of some safe, affordable, and levitra online canada effective natural asthma remedies that you can find in-stock, let alone what a tattoo artist has in his or her portfolio. You can browse online and find out the most in a very lesser time duration was viagra cheapest online 100mg. Branded order soft cialis is expensive but generic anti-impotency medicine lies in its price.
Market Depth or Level 2
Moving on, all of this might be too much detail for you. Maybe you just want to see different levels of best prices. For example, you just want to see whats the first best bid/ask price that’s offered and how many shares are cumulatively available at that price point. Notice that both Mark and David quoted bid price of 126.21 each for 5 shares. At market depth or L2 level, you will see this data consolidated to show that the best bid price being offered is 126.21 and bid_size is 10. Same thing for ask price/size. Now, there are different levels as well. If you want to buy 20 shares and only 10 are offered with the best price then you have to go to next level and buy the next 10 shares at those prices. For example, after 126.21, the next best bid price is 126.25 with size of 2 and then 126.26 with size of 10. You have already purchased 10 shares at 126.21 and need to buy only 10 more. You will buy 2 shares at 126.25 and then 8 at 126.26. Here is your order summary.

sym  bid    bid_size
--------------------
APPL 126.21 10
APPL 126.25 2
APPL 126.26 8

You paid a total of 2524.68 dollars for 20 shares of AAPL. That’s 126.234 dollars per share.

What can you do with this data? You can use it to see how the market is moving and reacting to your orders. It also shows that you didn’t end up paying the best price of 126.21 because that is only valid for 10 shares. You had to pay an average of 126.234 dollars for your 20 shares. This is where transaction cost analysis comes into play. Orders are not fulfilled instantly, especially large orders. As you place these order, you have the ability to move the market. If the news hits the market that someone is trying to buy 1 million shares of AAPL, the price will definitely go up before you are able to fulfill your entire order. This means that as you were purchasing AAPL shares, you caused the price to go up and hence, ended up paying more. Companies consider all these factors when doing transaction cost analysis.

Quote
Lets take a step back. Maybe you don’t care about market depth and just want to see the best bid offer (BBO). What’s the best bid offer? It’s the best bid/ask. So, in our case, it will be the first row – bid of 126.21 and ask of 126.32. This data is stored in the quote table. This data is helpful in doing higher level analysis and doing some transaction cost analysis related stuff as well.

Trade
So far we have just been talking about quotes. Brokers quoting price. But what happens when the trade actually happens? Well, you get a single price and size record in your trade table. For example, lets say that Himanshu decides to buy 2 shares of AAPL at 126.21 since that was the best bid at that time. This will reflect in the trade table as:

sym  price  size
----------------
AAPL 126.21 2

You can use this data for numerous purposes such as generating P&L reports. This is also the price that you see being updated when you go to Google Finance.
aapl price

That’s pretty much it when it comes to types of market data. You can go into much more depth about types of securities and how their market data might be a little different for example settlement prices for futures but hopefully, this post will give you an overall view of the trading flow and market data.

Join the Conversation

5 Comments

  1. I think you got bid and ask the wrong way around in your example. Mark should be placing a _bid_ of 126.21 to buy 5 stocks and an _offer_ (ask) to sell 2 stocks for 126.32. So the ‘bid’ and ‘ask’ columns should be interchanged. Otherwise I can buy 20 stocks for 126.234 and immediately sell them for 126.392 (vwap)

Leave a comment

Your email address will not be published. Required fields are marked *