File size: 6,416 Bytes
978164b
a329a6c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
978164b
 
 
 
a329a6c
978164b
a329a6c
978164b
a329a6c
978164b
df2449d
a329a6c
df2449d
 
 
 
978164b
a329a6c
 
 
 
 
 
978164b
 
a329a6c
 
 
978164b
df2449d
978164b
a329a6c
978164b
df2449d
978164b
 
 
 
a329a6c
 
 
 
 
 
 
 
 
 
978164b
df2449d
a329a6c
df2449d
a329a6c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
---
configs:
  - config_name: AAPL_1levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_AAPL_2012-06-21_1/*_message_1.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_AAPL_2012-06-21_1/*_orderbook_1.csv"
  - config_name: AAPL_5levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_AAPL_2012-06-21_5/*_message_5.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_AAPL_2012-06-21_5/*_orderbook_5.csv"
  - config_name: AAPL_10levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_AAPL_2012-06-21_10/*_message_10.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_AAPL_2012-06-21_10/*_orderbook_10.csv"
  - config_name: AAPL_30levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_AAPL_2012-06-21_30/*_message_30.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_AAPL_2012-06-21_30/*_orderbook_30.csv"
  - config_name: AAPL_50levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_AAPL_2012-06-21_50/*_message_50.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_AAPL_2012-06-21_50/*_orderbook_50.csv"
  - config_name: AMZN_1levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_AMZN_2012-06-21_1/*_message_1.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_AMZN_2012-06-21_1/*_orderbook_1.csv"
  - config_name: AMZN_5levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_AMZN_2012-06-21_5/*_message_5.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_AMZN_2012-06-21_5/*_orderbook_5.csv"
  - config_name: AMZN_10levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_AMZN_2012-06-21_10/*_message_10.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_AMZN_2012-06-21_10/*_orderbook_10.csv"
  - config_name: GOOG_1levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_GOOG_2012-06-21_1/*_message_1.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_GOOG_2012-06-21_1/*_orderbook_1.csv"
  - config_name: GOOG_5levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_GOOG_2012-06-21_5/*_message_5.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_GOOG_2012-06-21_5/*_orderbook_5.csv"
  - config_name: GOOG_10levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_GOOG_2012-06-21_10/*_message_10.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_GOOG_2012-06-21_10/*_orderbook_10.csv"
  - config_name: INTC_1levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_INTC_2012-06-21_1/*_message_1.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_INTC_2012-06-21_1/*_orderbook_1.csv"
  - config_name: INTC_5levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_INTC_2012-06-21_5/*_message_5.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_INTC_2012-06-21_5/*_orderbook_5.csv"
  - config_name: INTC_10levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_INTC_2012-06-21_10/*_message_10.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_INTC_2012-06-21_10/*_orderbook_10.csv"
  - config_name: MSFT_1levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_MSFT_2012-06-21_1/*_message_1.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_MSFT_2012-06-21_1/*_orderbook_1.csv"
  - config_name: MSFT_5levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_MSFT_2012-06-21_5/*_message_5.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_MSFT_2012-06-21_5/*_orderbook_5.csv"
  - config_name: MSFT_10levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_MSFT_2012-06-21_10/*_message_10.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_MSFT_2012-06-21_10/*_orderbook_10.csv"
  - config_name: MSFT_30levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_MSFT_2012-06-21_30/*_message_30.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_MSFT_2012-06-21_30/*_orderbook_30.csv"
  - config_name: MSFT_50levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_MSFT_2012-06-21_50/*_message_50.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_MSFT_2012-06-21_50/*_orderbook_50.csv"
  - config_name: SPY_30levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_SPY_2012-06-21_30/*_message_30.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_SPY_2012-06-21_30/*_orderbook_30.csv"
  - config_name: SPY_50levels
    data_files:
      - split: message
        path: "LOBSTER_SampleFile_SPY_2012-06-21_50/*_message_50.csv"
      - split: orderbook
        path: "LOBSTER_SampleFile_SPY_2012-06-21_50/*_orderbook_50.csv"
---

# LOBSTER Sample Data

LOBSTER (Limit Order Book System) sample L3 order book data for June 21, 2012.

## Dataset Description

LOBSTER provides limit order book data from NASDAQ TotalView-ITCH messages.

- **AAPL**: 1, 5, 10, 30, 50 levels
- **AMZN**: 1, 5, 10 levels
- **GOOG**: 1, 5, 10 levels
- **INTC**: 1, 5, 10 levels
- **MSFT**: 1, 5, 10, 30, 50 levels
- **SPY**: 30, 50 levels

## Configurations

Each ticker/level combination has its own configuration with two splits:
- **message**: Order book events (time-series of market events)
- **orderbook**: Order book snapshots at each event time

## File Structure

Each ticker has two CSV files:

1. **Message file** (`*_message_*.csv`): Order book events
   - Columns: time, event_type, order_id, size, price, direction
   - Types: 1=New, 2=Cancel, 3=Delete, 4=Exec(Visible), 5=Exec(Hidden), 7=Halt

2. **Orderbook file** (`*_orderbook_*.csv`): Order book snapshots
   - Columns: ask_price_1, ask_size_1, bid_price_1, bid_size_1, ... (up to N levels)
   - Prices in fixed-point (multiply by 10^-4)

## Usage

```python
from datasets import load_dataset

# Load a specific ticker configuration
dataset = load_dataset("your-username/lobster-sample-data", "AAPL_10levels")

# Access message data
messages = dataset["message"]

# Access orderbook data
orderbooks = dataset["orderbook"]
```

## Source

Data provided by [LOBSTER](https://lobsterdata.com/) - Limited Order Book System.