phil8192 / ob-analytics

R package intended for visualisation, analysis and reconstruction of limit order book data
Other
149 stars 45 forks source link

Closes #25 #29

Closed petr-fedorov closed 6 years ago

petr-fedorov commented 6 years ago

Below is the the input file for processData() which contains non-integral 'volume' events.csv.gz and which can be used for testing.

The current version of obAnalytics classifies events in the file as follows:

unknown flashed-limit resting-limit market-limit pacman market
994 16062 1350 38 33 311

After this patch:

unknown flashed-limit resting-limit market-limit pacman market
9 16062 1674 254 33 756

Please note that I have re-implemented processData() in Postgresql database using different algorithm(s) (I fully reconstruct order book in time, match events using information from live_trades API etc ) and the correct classification of the given events is:

unknown flashed-limit resting-limit market-limit pacman market
1 16062 1669 443 33 580

The Postgresql's version of 'events' (as well as depth, depth.summary and trades) are in the file below correct.rda.gz.

Here is the example of the visual differences between datasets:

The patched processData() version: incorrect

Postgresql version :

correct

phil8192 commented 6 years ago

thanks @petr-fedorov