KarelZe/tclf

Jurkatis 2020

Closed this issue · 3 comments

Hey, first of all very nice and interesting work. Also thanks for making code public. :)

I just have a question. Are you familiar with Jurkatis, S., (2020)? [1]
I feel like some of the reasoning of chaining rules of the FI algorithm using quotes, depth and ticks are very similar. Though i am not yet informed enough to comment on the differences and how it may apply to the options market in contrast to the stock market (which is what Jurkatis focused on).
I am still trying to procure data for both markets to make some experiments but finding ground truth for the aggressor side for these markets is not easy.

Very interested in your thoughts about that. If this is the wrong forum, i am sorry and it can be disregarded.

[1] Jurkatis, S., 2020. Inferring trade directions in fast markets. Journal of Financial Markets, Vol 58, 100635

Thanks @strcat32 for the praise and your question.

Connection between Jurkatis and Grauer et al.
I'm only superficially familiar with the full information classification algorithm (fica) of Jurkatis [^1]. From my understanding both approaches are indeed related:

  • both approaches use trade size, quoted sizes, and the trade price to infer trade direction. In particular the step unique match in fica (see figure 1 step 2 in paper) is similar to the trade size rule (see rules#trade-size-rule) with reversed sign. 🙂 The fica algorithm, however, also considers timing, which is not true for Grauer et al.
  • both approaches use some sort of stacking mechanism with i.e., tick test as last resort (Jurkatis: CLNV algorithm step + tick test, Grauer et al.: arbitrary + tick test).

There also some notable differences:

  • the depth and trade size rules, as presented, could be combined with arbitrary rules e.g., EMO, LR (see rules/#stacked-rule), while fica as an algorithm, is closed in itself.
  • data requirements of the algorithms greatly differ.

For more detailed insights, I guess it's best to reach out to the authors directly. They are more eligible to comment on conceptual differences and their reasoning.

Obtaining True Labels
Obtaining true labels is indeed a problem.🥵 Here are some approaches scholars came up with:

  • Odders-White[^2] bases her definition of the trade initiator on the party, who places the order first last. She has access to order data including order submission times. By comparing the order arrival times that led to an trasaction, she is able to infer the true label.
  • Lee and Radhakrishna[^3] base their definition of the trade initiator on the order type. By using the order type and focusing on order types e.g., non-stopped market orders, for which the true label can be inferred unambigiously, they obtain the true trade initiator.
  • Grauer et al.[^4] define the trade initiator as the party (i.e., customers) opposite to the market maker. They then filter for customer buys or sells, for which they can infer the true label. Please be aware of overfitting if you apply a similar logic and perform robustness checks/tests for bias.
  • Some researchers use no true labels at all and rather use the predicted label of an existing trade classification algorithm e.g., LR algorithm as a reference. I'd try to avoid such an approach, as it can bias results.
  • ...

As you can see, all approaches have some imperfections, I'd base the decision on the data, to which you got access to.

Hope this helps.

Best,
Markus

[1]: Jurkatis, S., 2020. Inferring trade directions in fast markets. Journal of Financial Markets, Vol 58, 100635
[2]: Odders-White, E. R. (2000). On the occurrence and consequences of inaccurate trade classification. Journal of Financial Markets3(3), 259–286. https://doi.org/10.1016/S1386-4181(00)00006-9 
[3]: Lee, C., & Radhakrishna, B. (2000). Inferring investor behavior: Evidence from TORQ data. Journal of Financial Markets, 3(2), 83–111. doi:10.1016/S1386-4181(00)00002-1
[4]: Grauer, C., Schuster, P., & Uhrig-Homburg, M. (2023). Option trade classificationhttps://doi.org/10.2139/ssrn.4098475

Hey,

thank you for your very extensive answer and overview. Much appreciated. :)

Regarding the trade size rule, i might have misunderstood something.

trade size rule

So my understanding is when for example the trade size matches the contemporaneous ask size, this is most likely an aggressive buyer crossing the spread to buy the lowest offer immediately, taking the offer of the book. This would be classified as 1 (Buy) in Jurkatis "unique match" arm of the FI algorithm.

But as you linked this trade rule is reversed in your and Grauer et. al. approach to classifying in the options market with the rationale that it happens more often that the aggressor of a trade tries to price improve with a limit order on the other side of the book and apparently market makers often allow this and do not force the trade to cross the book?
I guess this rationale is based on empirical observations based on the "true label" techniques you later mention?

applicability

Another thing i was thrown off by is the reverse tick test as a fallback. Of course from a pure research perspective it makes sense if it improves the score of the model.
But somehow it feels wrong to rely on forward looking information. What happens after the trade in my view is part of the ground truth and "causal" outcome of what the trade was at that point in time.
This is like trying to classify cloud formations that lead to rain the next day and using the water level of the next day (t+1) to improve classification of rainmaking cloud formations. If you get my drift:)
A concrete example would be a high frequency estimator for which that rule cannot be used. But i might be to pessimistic here, because it is not like there are no uses for it. Just a caveat that is notable in my opinion.

ground truth

Thank you for listing some interesting approaches to obtain usable labels. I was thinking about these, but i might go a whole different route.
Maybe i do not focus in obtaining a true classification model, but maybe i focus more on other targets like future market impact, spread, liquidity, weighted midprice movement and the explanatory power of classified volume.
Both problems must not necessarily have the same answer. Which could be an interesting comparison. Maybe there are even more ways to classify and "tag" volume and the interdependence between options and stock market has a lot research potential.

I am at the moment acquiring a ton of stock+options trades and quotes from SIP and OPRA data (which was the only thing affordable for me).

Your work (amongst others of course) and comments here have massively helped me. Thank you again! :)

Thanks @strcat.

Tradesize Rule
I agree with your understanding on the fica algorithm by Jurkatis. An example would be a market buy order matched against an existing limit sell order, hence 1=buy. This is also what you'd expect for a definition of the trade initiator as in Odders-White (1. bullet in comment above) (last order) and Lee and Radhakrishna (2. bullet in comment above) (market buy order).

I also agree with your understanding on the trade size rule. The authors empirically motivate the tradesize rule by the use of limit orders filled by market makers. Recall from the previous comment on true labels, that their definition of the trade initiator is the party opposite to the market maker. The rationale is, that the market maker or broker only provides liquidity to the investor and the trade would not exist without the initial investor’s demand. Picking up our previous example, the limit sell order would be filled by the marketmaker, hence -1=sell. Therefore, the reversed sign makes sense.

Just to be clear, I did not contribute to the Grauer et. al paper. I just worked on related research with some of the authors.

All in all, I'd use a definition for the true label that works best for you and choose classification approaches accordingly. It might also be wise to perform an explanatory data analysis to learn about order types, trading frequency and execution of trades within the spread. Guess its also enlightening for a discussion.

Reverse Tick test
In the option market tick tests (reverse and standard) typically perform poorly (see Savickas & Wilson)1 or Grauer et al.2 . A frequently cited reason, is the lower market liquidity, hence, infrequent previous/subsequent trade prices to compare against.

In the work of Grauer et al., the choice of the tick test is empircally motivated, as far as I know. Overall, the differences between the reverse and standard tick test are minor for their work. This is due to the fact, that only few trades are classified by the rev. tick test and that both perform poorly/similar to a random guess (strategy=random in the library).

Depending on the setting, forward looking indicators may not be a good idea. If you are in an online setting, be sure to use past indicators only.

Application Study
I think it makes sense to also target price impact, spread, liquidity, weighted midprice movement etc., at least as an application study. From my experience, most authors estimate the effective spread, as it's simple, commonly used, and therefore allows for comparisons between papers.

Good luck with your paper. Once you published a draft, feel free to open an issue here, so that we can share it in our community page.

Best,
Markus

PS: Just noticed a typo in my comment above regarding Odders-White's definition, which is now fixed.

Footnotes

  1. Savickas, R., & Wilson, A. J. (2003). On inferring the direction of option trades. Journal of Financial and Quantitative Analysis, 38, 881–902. doi:10.2307/4126747

  2. Grauer, C., Schuster, P., & Uhrig-Homburg, M. (2023). Option trade classificationhttps://doi.org/10.2139/ssrn.4098475