1
$\begingroup$

I have data from exchange in transaction log format that indicating:

  • price
  • volume
  • timestamp

That element indicating that timestamp transaction was made on price of size volume.

My question is how to convert that feed into tick-by-tick based data including:

  • timestamp
  • ask price
  • bid price
  • volume

That element indicating that timestamp transaction was made of size volume, and after that prices buy/sell prices are on level ask price and bid price for create future transaction.

Thanks for help!

$\endgroup$
4
  • $\begingroup$ You can't. Your incoming data looks like the day's closing price. There is no way to derive the quotes from that. $\endgroup$ Nov 15, 2013 at 16:07
  • $\begingroup$ @chrisaycook, frequency are not by day, but every transaction exchanged, multiple elements per second. $\endgroup$
    – Svisstack
    Nov 15, 2013 at 16:09
  • $\begingroup$ @chrisaycook: i'm finding some solution to recreate from that stream some order book, or when it is not possible then maybe some estimation? $\endgroup$
    – Svisstack
    Nov 15, 2013 at 16:11
  • 1
    $\begingroup$ If you don't know what the quotes are, then you can't recreate the quotes. The trades don't tell you anything. There could be hidden liquidity. The bids and asks could have moved around a lot. Etc. You can't just recreate the quotes given a list of trades. $\endgroup$ Nov 15, 2013 at 16:12

1 Answer 1

4
$\begingroup$

Trades don't indicate the quote. Consider a market like this:

bid     ask
100.01  100.02

You see a trade for 100.02. Then you see another trade for 100.02. This second trade could have been taking more from the ask. However, if the earlier trade had wiped-out the ask, then the quotes may have been updated to

bid     ask
100.02  100.03

I.e., the second trade took from the bid. But since all you saw was 100.02, you don't know whether is was from the bid or ask.

On top of that, an illiquid stock could have been displayed at

bid     ask
100.01  100.05

A trade for 100.02 would have been against hidden liquidity and you would never know.

So in conclusion, trades cannot be used to derive quotes. They are two different pieces of information. (Conversely, quotes cannot be used to derive trades, since disappearing liquidity may indicate either trades or cancelations, and you'd have no way of knowing.) If you want quotes, then you have to get quote data.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.