-2
$\begingroup$

From the website https://www.algoseek.com/equities/, we can get a sample of the full depth market/tick data. From the paper https://arxiv.org/pdf/1710.03870.pdf page 8, I would like to extract the market orders and limit orders separately with timestamp of 1 second . Is it possible to do such a thing? If so, how?

$\endgroup$
  • 1
    $\begingroup$ I'm voting to close this question as off-topic because this is a programming question. $\endgroup$ – Helin Aug 9 '18 at 23:40
  • $\begingroup$ @Helin This is not programming question. I asked theorically how to do it. $\endgroup$ – user1050421 Aug 9 '18 at 23:42
  • $\begingroup$ You've asked basically the same question 4 times, voting to close $\endgroup$ – Kch Aug 10 '18 at 1:07
  • 1
    $\begingroup$ I'm voting to close this question as off-topic because its a programming question, or a data request question, or the same question thats been asked by the same user lots more times $\endgroup$ – Attack68 Aug 10 '18 at 18:56
2
$\begingroup$
  1. download the data

  2. open Jupyter Notebook

import pandas as pd

data = pd.read_csv('IBM.FullDepth.20140128.csv', parse_dates=[['Date', 'Timestamp']])

data['EventType'].unique()

array(['ADD BID', 'ADD ASK', 'DELETE ASK', 'DELETE BID', 'TRADE ASK', 'EXECUTE BID', 'FILL BID', 'TRADE BID', 'FILL ASK', 'EXECUTE ASK', 'CROSS', 'CANCEL ASK', 'CANCEL BID'], dtype=object)

grouped = data.groupby(pd.Grouper(key='Date_Timestamp', freq='1s'))
groups = grouped.groups
keys = list(groups.keys())

df=grouped.get_group(keys[0])
df[df.EventType=='ADD BID']

enter image description here

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.