If you are engaged in development software for trading systems there can be a necessity of the FIX engine log analysis. There are a lot of reasons, the most simple – define how much there correspond parameters of the developed application of the validity. This mean: your database speaks you one supposedly warrants, openly have been sent so much so much, closed so much, and actually all can be differently. If the parameters received at the analysis of a database will differ from the parameters received at the analysis FIX engine logs – it is time to sound alarm. Someone says lies, and most likely this someone – your application:).
Log file of FIX engine usually represents a set of text lines. The choice of the tool for their analysis has come at once – certainly, Perl:). One of problems consists that supports FIX for Perl simply are not present. There is a plenty of the servers written in every possible languages (basically, it Java or C ++) among which it is possible to meet even Ruby and Python (I so understand, the craze), but hotly favourite by us Perl is not present. All right, not a problem. We can write analysis of text data even if there are no working on Perl engines.
There was a problem of analysis of a file for trades with one well known forex broker. The basic application from our party has been written on Java with use of QuickFIX/J engine. Obtained trades data are stored in the separate file which growing quickly enough. At the moment of start of a test script the size of log file exceeded the 1.5 GB. The script run on all lines, choosing all necessary types of the message and analyzing conditions of orders has been developed really quickly. The result (for a day) is printed the report of a sales volume with format usage.
The script is not ideal in view of a hardcoded binding of variables and there is a direct dependence from our broker (they have a little expanded standard protocol with the own types of variables) but the general idea is more or less clear.
In any case the script has made the work and has made it quickly. I think that the choice Perl as the tool of the analysis was more than is justified in view of speed of development and the general code understanding. Conclusions – I was very happy.
Source code and original article located here