0

I want to test my trading system by playing execution reports back into my application. Then I could verify that my order/position state is correct.

I found this somewhat related question: how to replay a quickfix log

The difference is that in the article the person was looking for a whole testing tool that would play back a log file. What I was wondering is whether there exists a utility that will take a string representing a FIX message and then just generate a FIX object (ex: ExecutionReport).

Does anything like this exist out there? Has everyone just been writing their own?

Community
  • 1
  • 1
eak12913
  • 303
  • 4
  • 15

1 Answers1

1

It sounds like you simply want a different kind of test tool.

If you've written your app in unit-test-friendly fashion, then you could simply write unit tests to create ExecReport objects and pass them as parameters into some ExecReport-processor component. (I'm guessing you're not designing for UTs, else you probably wouldn't need this suggestion.)

If not, then I think the best thing to do is write another app that your first app can connect to. You could create a simple Acceptor app that can use command-line commands to trigger ExecReports to be sent. If you're using QuickFIX/n (the C# port), you could steal code from QuickFIX/n's example apps "TradeClient" and "Executor".

Grant Birchmeier
  • 17,809
  • 11
  • 63
  • 98
  • Yes - My app is written exactly in the Unit Test friendly way. I have written "convenience methods" like getFilledLong(symbol, quantity, price) -> returns FIX42.ExecutionReport. I guess what I wanted is to be able to speed up my ability to generate the Unit test by using quickfixe's FIX log to just copy/paste directly from the logs. Instead of having to manually re-type. Just would make it easier for me to quickly verify what I've seen "in the wild" by copy/pasting selected execution reports right from my logs and into my unit test. – eak12913 Jan 21 '13 at 04:38
  • 1
    Ah, ok. In the C++ QuickFIX, it appears you can use the `Message(string)` constructor to create the message from a raw string. To get it as an ExecutionReport type, I think you can use the `ExecutionReport(Message)` constructor. (Note: I haven't tried these myself.) Depending on how your test works, you might need to alter sequence numbers (and then bodylength and checksum after that). – Grant Birchmeier Jan 22 '13 at 14:36
  • Yes! This is exactly what I was looking for. Looks like QuickfixN has the same constructor for Message. Thanks! – eak12913 Jan 23 '13 at 21:46
  • 1
    Wait, you're using QF/n? Why didn't you say so? I'm the lead maintainer for QF/n (really)! – Grant Birchmeier Jan 23 '13 at 22:01
  • Sorry that I was not more specific. I thought I mentioned it, but re-read my post and realized that I didn't. In any case thanks so much for the help! – eak12913 Jan 25 '13 at 15:47