DavZim / RITCH

An R interface to the ITCH Protocol
https://davzim.github.io/RITCH/
Other
18 stars 5 forks source link

Export to CSV and order book sample functionality? #4

Closed DanielRonnstam closed 5 years ago

DanielRonnstam commented 5 years ago

Hi. I got a demo file from NASDAQ Nordic, containing full depth Level II market data for one trading day for all instruments on the Nordic markets. It's in ITCH v.3.03 format. I would like to convert this file (or other sample ITCH any version files with similar content), in the following way;

a) Each instrument gets its own CSV file with all messages for that instrument during the day(s).

b) Then I would like to sample each instrument's order book into another CSV file, so that I get the following format in each CSV for each instrument;

Does your script do (a) and/or (b)? If not, can it be modified? Or do you know of any other script that does this?

DavZim commented 5 years ago

Hi Daniel, currently this library only parses ITCH 5.0 and does not deal with 3.03. What you can do though, is look at the specification sheet of v3.03 and locally change the files Specifications.h and MessageTypes.cpp to accommodate version 3.03. See also #2

As each version of the ITCH protocol is different, the RITCH library can only parse certain versions without being changed (or updated).

Having loaded the 3.03 data into R then, it returns a data.table, thus you can use data.table to save it to distinct CSV files and construct the summary data. The summary data (b) is not the scope of this library, but I assume it should be doable in a couple of lines of code.

Does that help you?

DanielRonnstam commented 5 years ago

Fantastic !!!

I actually managed to download an ITCH demo file of 10 Gb from the link on your github page. It seems to be 5.0. I'm not a coder, but I have Python installed on my Win 10 computer which I can access via cmd. I think I installed R with it. Where can I find a description on how to install your R script to be accessed via Win 10 cmd?

Do you know of any script that will parse a your data.table I can modify to split up for each instrument in csv?

Sent with Shift https://tryshift.com/?utm_source=SentWithShift&utm_campaign=Sent%20with%20Shift%20Signature&utm_medium=Email%20Signature&utm_content=General%20Email%20Group

Den ons 20 mars 2019 kl 12:22 skrev DavZim notifications@github.com:

Hi Daniel, currently this library only parses ITCH 5.0 and does not deal with 3.03. What you can do though, is look at the specification sheet of v3.03 and locally change the Specifications.h https://github.com/DavZim/RITCH/blob/master/src/Specifications.h file to accommodate version 3.03. See also #2 https://github.com/DavZim/RITCH/issues/2

As each version of the ITCH protocol is different, the RITCH library can only parse certain versions without being changed (or updated).

Having loaded the 3.03 data into R then, it returns a data.table, thus you can use data.table to save it to distinct CSV files and construct the summary data. The summary data (b) is not the scope of this library, but I assume it should be doable in a couple of lines of code.

Does that help you?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DavZim/RITCH/issues/4#issuecomment-474789139, or mute the thread https://github.com/notifications/unsubscribe-auth/At7gLVuagfNSp_8PaqicQbKPAq-hUV-gks5vYhnrgaJpZM4b-3-W .

--

Sent with Shift https://tryshift.com/?utm_source=SentWithShift&utm_campaign=Sent%20with%20Shift%20Signature&utm_medium=Email%20Signature&utm_content=General%20Email%20Group

DavZim commented 5 years ago

If you open R (I would recommend you to also use RStudio as an IDE), you can install the package with install.packages("devtools") and then devtools::install_github("DavZim/RITCH"). See also the readme as well as data.tables introduction