-1
$\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$
4
  • 1
    $\begingroup$ I'm voting to close this question as off-topic because this is a programming question. $\endgroup$
    – Helin
    Commented Aug 9, 2018 at 23:40
  • $\begingroup$ @Helin This is not programming question. I asked theorically how to do it. $\endgroup$ Commented Aug 9, 2018 at 23:42
  • $\begingroup$ You've asked basically the same question 4 times, voting to close $\endgroup$
    – Kch
    Commented Aug 10, 2018 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
    Commented Aug 10, 2018 at 18:56

1 Answer 1

3
$\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$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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