I had the following coding question in a quant shop interview recently. I have no experience with quant finance, so I was hoping to get some insight on if this problem actually represents some real world trading problem.

Essentially, the question was something like this:

Suppose you have 2 vendors (can't remember if they used the term "vendor" or "exchange" but I don't think it matters for the problem) with different stocking trading data. Timestamps are given in the data. If the price and quantity are the same, then they're considered equal. This comparison can initially be done using a static comparison, and then using dynamic comparison. One followup was what if we allowed editing of the quantity and price? And another followup was adding additional vendors on top of the existing 2.

There was a huge language barrier issue, and I spent a lot of time trying to figure out what the interviewer was asking me to code, and I still don't quite understand it. What I remember is mentioned above, and I was hoping someone can tell me if is modeled after some real world trading problem?

  • $\begingroup$ Comparing prices across exchanges sounds like something that comes up in quant trading. Not sure what you mean by static vs dynamic comparison, in which language were you suppose to program? $\endgroup$
    – Bob Jansen
    Feb 3 at 13:33
  • $\begingroup$ @BobJansen It was a generic software engineer interview for a quant finance firm. It was only a 45 min interview so the intention wasn't to build a full system or anything that complicated. Any language works -- I used C++. I just didn't really understand what the interviewer was asking due to the language barrier and perhaps my lack of familiarity with this subject area, and also didn't know if this was modeled after some real system or just some toy question for the purpose of interviewing $\endgroup$
    – user70981
    Feb 3 at 15:25
  • $\begingroup$ @BobJansen Isn't there a difference between "vendor" and "exchange?" IIRC, the interviewer used the term "vendor?" By static comparison, I meant performing the comparison assumign the prices & quantities aren't mutated, and dynamic means they can be mutated. $\endgroup$
    – user70981
    Feb 3 at 15:26
  • $\begingroup$ It is not something that is covered in schools or in textbooks, but the data environment for quant finance can be complicated, with different sources of data, messy data issues, etc. So it is a realistic real world programming example that you would need to do tests, comparisons, experiments with different data sources. But it is not something really taught or discussed much. $\endgroup$
    – nbbo2
    Feb 4 at 9:34
  • 1
    $\begingroup$ looks like an open ended data validation problem. Places like JS ask these types of questions to test your critical thinking, communication and coding all at the same time. There are teams within infa devs who are responsible for data and could face these problems when choosing between data vendors or combining data from different vendors to maximize accuracy. $\endgroup$
    – quantinho
    Feb 5 at 6:15

1 Answer 1


I wasn't there so I can only guess but I think the below is reasonable:

  1. Exchanges is where trades trade and in this context data vendors are often third parties that deliver historical data on all kind of stuff used by the quants so this might be interview question material;
  2. It does happen that the data feeds don't exactly agree. Data can be missing or there can be other errors but you can certainly expect timestamps to differ if they record when the data is received by the vendor. The recorded order of events may change between vendors;
  3. Before using the data you want to know it's accurate;
  4. Therefore you could simply compare two trade feeds trade1.price1 == trade2.price && trade1.quantity == trade2.quantity. Maybe this was asked as a warm-up question;
  5. You could further improve the matching by checking whether different orders were recorded by looking at the previous or next trades in the two feeds. Maybe this was meant by dynamic.

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.