lobkit 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lobkit-0.2.1/src/lobkit.egg-info → lobkit-0.2.2}/PKG-INFO +50 -39
- {lobkit-0.2.1 → lobkit-0.2.2}/README.md +49 -38
- {lobkit-0.2.1 → lobkit-0.2.2}/pyproject.toml +1 -1
- {lobkit-0.2.1 → lobkit-0.2.2/src/lobkit.egg-info}/PKG-INFO +50 -39
- {lobkit-0.2.1 → lobkit-0.2.2}/LICENSE +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/setup.cfg +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit/__init__.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit/analysis.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit/book.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit/features.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit/market_making.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit/plotting.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit/recorder.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit/simulator.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit.egg-info/SOURCES.txt +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit.egg-info/dependency_links.txt +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit.egg-info/requires.txt +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/src/lobkit.egg-info/top_level.txt +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/tests/test_book.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/tests/test_features_sim.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/tests/test_market_making.py +0 -0
- {lobkit-0.2.1 → lobkit-0.2.2}/tests/test_recorder.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lobkit
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Limit order book reconstruction, order-flow analytics and market-making simulation
|
|
5
5
|
Author: Yousuf Hossain Shafeen
|
|
6
6
|
License-Expression: MIT
|
|
@@ -170,35 +170,40 @@ simulated and live tables shows which effects are mechanical consequences of the
|
|
|
170
170
|
and which require informed traders. Record at least 15 minutes; the script warns when there is
|
|
171
171
|
too little data to say anything.
|
|
172
172
|
|
|
173
|
-
Results for one session
|
|
174
|
-
|
|
175
|
-
mid changed
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
|
183
|
-
|
|
184
|
-
|
|
|
185
|
-
|
|
|
186
|
-
|
|
|
173
|
+
Results for one session, two instruments recorded side by side: BTCUSDT and ETHUSDT, 2 hours each
|
|
174
|
+
on 2026-11-01 from 04:29 local time. BTCUSDT: 187,746 quote updates, 18,463 trades; the price
|
|
175
|
+
stayed within a 162 USDT range and the mid changed 2,176 times, about once every 3.3 seconds.
|
|
176
|
+
ETHUSDT: 127,805 quote updates, 14,136 trades; an 8 USDT range and 2,931 mid changes. Both books
|
|
177
|
+
tick in cents, so a tick is 0.13 basis points of the BTC price but 0.44 of the ETH price, and the
|
|
178
|
+
ETH best queues are deep (31.5 ETH on average against 2.5 BTC). That session is one sample, not a
|
|
179
|
+
study, and the recordings are not in the repository (market data is never committed), so treat
|
|
180
|
+
these numbers as an illustration of the pipeline.
|
|
181
|
+
|
|
182
|
+
| Result | BTCUSDT, 1 s buckets | ETHUSDT, 1 s buckets | Simulated |
|
|
183
|
+
|---|---|---|---|
|
|
184
|
+
| Δmid on OFI | β = 0.203 USDT per BTC, **R² = 0.59**, t = 102 | β = 0.0008 USDT per ETH, **R² = 0.70**, t = 129 | R² = 0.42 at 1 s (Study 5), 0.66 at 10 s |
|
|
185
|
+
| Impact coefficient vs 1/depth | R² = 0.91 across depth quintiles | R² = 0.87 | R² = 0.93 (10 s) |
|
|
186
|
+
| P(next move up), imbalance < 0.1 → > 0.9 | 0.09 → 0.93, monotone | 0.09 → 0.84, dips at 0.5–0.6 | monotone |
|
|
187
|
+
| Next 1 s move from queue imbalance | out-of-sample R² 2.0% | 4.6% | 0.7% (next 10 s) |
|
|
188
|
+
| Multi-level OFI, best 1 → 10 levels (5 s) | out-of-sample R² 0.33 → 0.38 | 0.45 → 0.47 | 0.66 → 0.88, 1 → 5 levels (10 s) |
|
|
189
|
+
| Micro-price vs mid, next price change | Stoikov −0.6% MSE, naive −0.03% | **Stoikov −10.8%**, naive −4.2% | Stoikov −6.6%, naive −1.3% |
|
|
187
190
|
|
|
188
191
|

|
|
189
192
|
|
|
190
|
-
**What survives contact with a real book.** The contemporaneous OFI relation is
|
|
191
|
-
|
|
192
|
-
thin. Queue imbalance predicts the next move at the extremes, and
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
**What
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
193
|
+
**What survives contact with a real book.** The contemporaneous OFI relation is stronger live
|
|
194
|
+
than in the simulator at 1-second buckets on both instruments, and impact is larger when the book
|
|
195
|
+
is thin. Queue imbalance predicts the direction of the next move at the extremes, and has a little
|
|
196
|
+
out-of-sample power over the next second.
|
|
197
|
+
|
|
198
|
+
**What depends on the book.** On ETHUSDT the Stoikov micro-price forecasts the next price change
|
|
199
|
+
with 10.8% less squared error than the mid, more than in the simulator, and the edge fades with
|
|
200
|
+
the horizon (4.3% after 5 moves, 0.9% after 20). On BTCUSDT it does not: −0.6%. The BTC book
|
|
201
|
+
often thins out for an instant: the spread was above 1 USDT (100 ticks) in 1,131 updates over 305
|
|
202
|
+
episodes, up to 17.4 USDT, while the ETH spread never exceeded 0.45 USDT. Those blowouts dominate
|
|
203
|
+
a squared-error comparison and wreck the naive micro-price (its gap to the mid has an
|
|
204
|
+
out-of-sample R² of −0.77 for the next second on BTC). Deeper levels add only a few points of R²
|
|
205
|
+
on either book, much less than in the simulator: the levels behind the best quote are a cent apart
|
|
206
|
+
and mostly small resting orders.
|
|
202
207
|
|
|
203
208
|
## Study 4: the market maker inside the order book
|
|
204
209
|
|
|
@@ -252,24 +257,30 @@ other venue's order flow explain, and whether either venue's flow or return pred
|
|
|
252
257
|
known: a simulated venue B that copies venue A 300 ms late. They find the delay exactly
|
|
253
258
|
(correlation 1.00 at +300 ms) and the direction: only B's next move is predictable from A.
|
|
254
259
|
|
|
255
|
-
Same session as Study 3 (
|
|
260
|
+
Same session as Study 3 (2 hours each; 187,746 Binance and 76,632 Bybit quote updates for
|
|
261
|
+
BTCUSDT, 127,805 and 21,344 for ETHUSDT):
|
|
256
262
|
|
|
257
263
|
| Target venue | R² own OFI | R² other venue's OFI | R² both | Next 1 s from other's OFI (OOS) | Next 1 s from other's return (OOS) |
|
|
258
264
|
|---|---|---|---|---|---|
|
|
259
|
-
| Binance | 0.
|
|
260
|
-
| Bybit | 0.
|
|
265
|
+
| Binance BTCUSDT | 0.59 | 0.23 | 0.59 | 0.059 | 0.064 |
|
|
266
|
+
| Bybit BTCUSDT | 0.54 | 0.33 | 0.58 | 0.002 | 0.001 |
|
|
267
|
+
| Binance ETHUSDT | 0.70 | 0.15 | 0.70 | 0.036 | 0.094 |
|
|
268
|
+
| Bybit ETHUSDT | 0.31 | 0.43 | 0.51 | 0.001 | 0.003 |
|
|
261
269
|
|
|
262
270
|

|
|
263
271
|
|
|
264
|
-
**
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
1
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
**Bybit tends to move first, by tens of milliseconds.** Returns are most correlated at 0 ms (0.25
|
|
273
|
+
for BTCUSDT, 0.18 for ETHUSDT): most moves land on both venues within the same 50 ms. What is left
|
|
274
|
+
is lopsided in the same way on both instruments. The correlation at negative lags (Bybit first)
|
|
275
|
+
sums to 1.00 for BTCUSDT and 1.13 for ETHUSDT, against 0.26 at positive lags; the strongest
|
|
276
|
+
off-zero lag is Bybit 150 ms ahead on both. The regressions agree: Bybit's flow and return predict
|
|
277
|
+
Binance's next second (out-of-sample R² 3.6–9.4%), Binance's predict Bybit's by 0.3% or less. On
|
|
278
|
+
ETHUSDT, Binance's flow explains more of Bybit's price than Bybit's own flow does (0.43 against
|
|
279
|
+
0.31). The earlier 40-minute session pointed the same way; two instruments over two hours make it
|
|
280
|
+
a consistent pattern, but still one session. One limitation is built in: timestamps are local
|
|
281
|
+
receive times, so each venue's network latency to the recording machine is part of the measured
|
|
282
|
+
lag. A lead shorter than the difference in latencies can't be told apart from a faster connection
|
|
283
|
+
to Bybit, and a recording from a second location is the way to check.
|
|
273
284
|
|
|
274
285
|
## Roadmap
|
|
275
286
|
|
|
@@ -130,35 +130,40 @@ simulated and live tables shows which effects are mechanical consequences of the
|
|
|
130
130
|
and which require informed traders. Record at least 15 minutes; the script warns when there is
|
|
131
131
|
too little data to say anything.
|
|
132
132
|
|
|
133
|
-
Results for one session
|
|
134
|
-
|
|
135
|
-
mid changed
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
|
143
|
-
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
133
|
+
Results for one session, two instruments recorded side by side: BTCUSDT and ETHUSDT, 2 hours each
|
|
134
|
+
on 2026-11-01 from 04:29 local time. BTCUSDT: 187,746 quote updates, 18,463 trades; the price
|
|
135
|
+
stayed within a 162 USDT range and the mid changed 2,176 times, about once every 3.3 seconds.
|
|
136
|
+
ETHUSDT: 127,805 quote updates, 14,136 trades; an 8 USDT range and 2,931 mid changes. Both books
|
|
137
|
+
tick in cents, so a tick is 0.13 basis points of the BTC price but 0.44 of the ETH price, and the
|
|
138
|
+
ETH best queues are deep (31.5 ETH on average against 2.5 BTC). That session is one sample, not a
|
|
139
|
+
study, and the recordings are not in the repository (market data is never committed), so treat
|
|
140
|
+
these numbers as an illustration of the pipeline.
|
|
141
|
+
|
|
142
|
+
| Result | BTCUSDT, 1 s buckets | ETHUSDT, 1 s buckets | Simulated |
|
|
143
|
+
|---|---|---|---|
|
|
144
|
+
| Δmid on OFI | β = 0.203 USDT per BTC, **R² = 0.59**, t = 102 | β = 0.0008 USDT per ETH, **R² = 0.70**, t = 129 | R² = 0.42 at 1 s (Study 5), 0.66 at 10 s |
|
|
145
|
+
| Impact coefficient vs 1/depth | R² = 0.91 across depth quintiles | R² = 0.87 | R² = 0.93 (10 s) |
|
|
146
|
+
| P(next move up), imbalance < 0.1 → > 0.9 | 0.09 → 0.93, monotone | 0.09 → 0.84, dips at 0.5–0.6 | monotone |
|
|
147
|
+
| Next 1 s move from queue imbalance | out-of-sample R² 2.0% | 4.6% | 0.7% (next 10 s) |
|
|
148
|
+
| Multi-level OFI, best 1 → 10 levels (5 s) | out-of-sample R² 0.33 → 0.38 | 0.45 → 0.47 | 0.66 → 0.88, 1 → 5 levels (10 s) |
|
|
149
|
+
| Micro-price vs mid, next price change | Stoikov −0.6% MSE, naive −0.03% | **Stoikov −10.8%**, naive −4.2% | Stoikov −6.6%, naive −1.3% |
|
|
147
150
|
|
|
148
151
|

|
|
149
152
|
|
|
150
|
-
**What survives contact with a real book.** The contemporaneous OFI relation is
|
|
151
|
-
|
|
152
|
-
thin. Queue imbalance predicts the next move at the extremes, and
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
**What
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
153
|
+
**What survives contact with a real book.** The contemporaneous OFI relation is stronger live
|
|
154
|
+
than in the simulator at 1-second buckets on both instruments, and impact is larger when the book
|
|
155
|
+
is thin. Queue imbalance predicts the direction of the next move at the extremes, and has a little
|
|
156
|
+
out-of-sample power over the next second.
|
|
157
|
+
|
|
158
|
+
**What depends on the book.** On ETHUSDT the Stoikov micro-price forecasts the next price change
|
|
159
|
+
with 10.8% less squared error than the mid, more than in the simulator, and the edge fades with
|
|
160
|
+
the horizon (4.3% after 5 moves, 0.9% after 20). On BTCUSDT it does not: −0.6%. The BTC book
|
|
161
|
+
often thins out for an instant: the spread was above 1 USDT (100 ticks) in 1,131 updates over 305
|
|
162
|
+
episodes, up to 17.4 USDT, while the ETH spread never exceeded 0.45 USDT. Those blowouts dominate
|
|
163
|
+
a squared-error comparison and wreck the naive micro-price (its gap to the mid has an
|
|
164
|
+
out-of-sample R² of −0.77 for the next second on BTC). Deeper levels add only a few points of R²
|
|
165
|
+
on either book, much less than in the simulator: the levels behind the best quote are a cent apart
|
|
166
|
+
and mostly small resting orders.
|
|
162
167
|
|
|
163
168
|
## Study 4: the market maker inside the order book
|
|
164
169
|
|
|
@@ -212,24 +217,30 @@ other venue's order flow explain, and whether either venue's flow or return pred
|
|
|
212
217
|
known: a simulated venue B that copies venue A 300 ms late. They find the delay exactly
|
|
213
218
|
(correlation 1.00 at +300 ms) and the direction: only B's next move is predictable from A.
|
|
214
219
|
|
|
215
|
-
Same session as Study 3 (
|
|
220
|
+
Same session as Study 3 (2 hours each; 187,746 Binance and 76,632 Bybit quote updates for
|
|
221
|
+
BTCUSDT, 127,805 and 21,344 for ETHUSDT):
|
|
216
222
|
|
|
217
223
|
| Target venue | R² own OFI | R² other venue's OFI | R² both | Next 1 s from other's OFI (OOS) | Next 1 s from other's return (OOS) |
|
|
218
224
|
|---|---|---|---|---|---|
|
|
219
|
-
| Binance | 0.
|
|
220
|
-
| Bybit | 0.
|
|
225
|
+
| Binance BTCUSDT | 0.59 | 0.23 | 0.59 | 0.059 | 0.064 |
|
|
226
|
+
| Bybit BTCUSDT | 0.54 | 0.33 | 0.58 | 0.002 | 0.001 |
|
|
227
|
+
| Binance ETHUSDT | 0.70 | 0.15 | 0.70 | 0.036 | 0.094 |
|
|
228
|
+
| Bybit ETHUSDT | 0.31 | 0.43 | 0.51 | 0.001 | 0.003 |
|
|
221
229
|
|
|
222
230
|

|
|
223
231
|
|
|
224
|
-
**
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
1
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
**Bybit tends to move first, by tens of milliseconds.** Returns are most correlated at 0 ms (0.25
|
|
233
|
+
for BTCUSDT, 0.18 for ETHUSDT): most moves land on both venues within the same 50 ms. What is left
|
|
234
|
+
is lopsided in the same way on both instruments. The correlation at negative lags (Bybit first)
|
|
235
|
+
sums to 1.00 for BTCUSDT and 1.13 for ETHUSDT, against 0.26 at positive lags; the strongest
|
|
236
|
+
off-zero lag is Bybit 150 ms ahead on both. The regressions agree: Bybit's flow and return predict
|
|
237
|
+
Binance's next second (out-of-sample R² 3.6–9.4%), Binance's predict Bybit's by 0.3% or less. On
|
|
238
|
+
ETHUSDT, Binance's flow explains more of Bybit's price than Bybit's own flow does (0.43 against
|
|
239
|
+
0.31). The earlier 40-minute session pointed the same way; two instruments over two hours make it
|
|
240
|
+
a consistent pattern, but still one session. One limitation is built in: timestamps are local
|
|
241
|
+
receive times, so each venue's network latency to the recording machine is part of the measured
|
|
242
|
+
lag. A lead shorter than the difference in latencies can't be told apart from a faster connection
|
|
243
|
+
to Bybit, and a recording from a second location is the way to check.
|
|
233
244
|
|
|
234
245
|
## Roadmap
|
|
235
246
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lobkit
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Limit order book reconstruction, order-flow analytics and market-making simulation
|
|
5
5
|
Author: Yousuf Hossain Shafeen
|
|
6
6
|
License-Expression: MIT
|
|
@@ -170,35 +170,40 @@ simulated and live tables shows which effects are mechanical consequences of the
|
|
|
170
170
|
and which require informed traders. Record at least 15 minutes; the script warns when there is
|
|
171
171
|
too little data to say anything.
|
|
172
172
|
|
|
173
|
-
Results for one session
|
|
174
|
-
|
|
175
|
-
mid changed
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
|
183
|
-
|
|
184
|
-
|
|
|
185
|
-
|
|
|
186
|
-
|
|
|
173
|
+
Results for one session, two instruments recorded side by side: BTCUSDT and ETHUSDT, 2 hours each
|
|
174
|
+
on 2026-11-01 from 04:29 local time. BTCUSDT: 187,746 quote updates, 18,463 trades; the price
|
|
175
|
+
stayed within a 162 USDT range and the mid changed 2,176 times, about once every 3.3 seconds.
|
|
176
|
+
ETHUSDT: 127,805 quote updates, 14,136 trades; an 8 USDT range and 2,931 mid changes. Both books
|
|
177
|
+
tick in cents, so a tick is 0.13 basis points of the BTC price but 0.44 of the ETH price, and the
|
|
178
|
+
ETH best queues are deep (31.5 ETH on average against 2.5 BTC). That session is one sample, not a
|
|
179
|
+
study, and the recordings are not in the repository (market data is never committed), so treat
|
|
180
|
+
these numbers as an illustration of the pipeline.
|
|
181
|
+
|
|
182
|
+
| Result | BTCUSDT, 1 s buckets | ETHUSDT, 1 s buckets | Simulated |
|
|
183
|
+
|---|---|---|---|
|
|
184
|
+
| Δmid on OFI | β = 0.203 USDT per BTC, **R² = 0.59**, t = 102 | β = 0.0008 USDT per ETH, **R² = 0.70**, t = 129 | R² = 0.42 at 1 s (Study 5), 0.66 at 10 s |
|
|
185
|
+
| Impact coefficient vs 1/depth | R² = 0.91 across depth quintiles | R² = 0.87 | R² = 0.93 (10 s) |
|
|
186
|
+
| P(next move up), imbalance < 0.1 → > 0.9 | 0.09 → 0.93, monotone | 0.09 → 0.84, dips at 0.5–0.6 | monotone |
|
|
187
|
+
| Next 1 s move from queue imbalance | out-of-sample R² 2.0% | 4.6% | 0.7% (next 10 s) |
|
|
188
|
+
| Multi-level OFI, best 1 → 10 levels (5 s) | out-of-sample R² 0.33 → 0.38 | 0.45 → 0.47 | 0.66 → 0.88, 1 → 5 levels (10 s) |
|
|
189
|
+
| Micro-price vs mid, next price change | Stoikov −0.6% MSE, naive −0.03% | **Stoikov −10.8%**, naive −4.2% | Stoikov −6.6%, naive −1.3% |
|
|
187
190
|
|
|
188
191
|

|
|
189
192
|
|
|
190
|
-
**What survives contact with a real book.** The contemporaneous OFI relation is
|
|
191
|
-
|
|
192
|
-
thin. Queue imbalance predicts the next move at the extremes, and
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
**What
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
193
|
+
**What survives contact with a real book.** The contemporaneous OFI relation is stronger live
|
|
194
|
+
than in the simulator at 1-second buckets on both instruments, and impact is larger when the book
|
|
195
|
+
is thin. Queue imbalance predicts the direction of the next move at the extremes, and has a little
|
|
196
|
+
out-of-sample power over the next second.
|
|
197
|
+
|
|
198
|
+
**What depends on the book.** On ETHUSDT the Stoikov micro-price forecasts the next price change
|
|
199
|
+
with 10.8% less squared error than the mid, more than in the simulator, and the edge fades with
|
|
200
|
+
the horizon (4.3% after 5 moves, 0.9% after 20). On BTCUSDT it does not: −0.6%. The BTC book
|
|
201
|
+
often thins out for an instant: the spread was above 1 USDT (100 ticks) in 1,131 updates over 305
|
|
202
|
+
episodes, up to 17.4 USDT, while the ETH spread never exceeded 0.45 USDT. Those blowouts dominate
|
|
203
|
+
a squared-error comparison and wreck the naive micro-price (its gap to the mid has an
|
|
204
|
+
out-of-sample R² of −0.77 for the next second on BTC). Deeper levels add only a few points of R²
|
|
205
|
+
on either book, much less than in the simulator: the levels behind the best quote are a cent apart
|
|
206
|
+
and mostly small resting orders.
|
|
202
207
|
|
|
203
208
|
## Study 4: the market maker inside the order book
|
|
204
209
|
|
|
@@ -252,24 +257,30 @@ other venue's order flow explain, and whether either venue's flow or return pred
|
|
|
252
257
|
known: a simulated venue B that copies venue A 300 ms late. They find the delay exactly
|
|
253
258
|
(correlation 1.00 at +300 ms) and the direction: only B's next move is predictable from A.
|
|
254
259
|
|
|
255
|
-
Same session as Study 3 (
|
|
260
|
+
Same session as Study 3 (2 hours each; 187,746 Binance and 76,632 Bybit quote updates for
|
|
261
|
+
BTCUSDT, 127,805 and 21,344 for ETHUSDT):
|
|
256
262
|
|
|
257
263
|
| Target venue | R² own OFI | R² other venue's OFI | R² both | Next 1 s from other's OFI (OOS) | Next 1 s from other's return (OOS) |
|
|
258
264
|
|---|---|---|---|---|---|
|
|
259
|
-
| Binance | 0.
|
|
260
|
-
| Bybit | 0.
|
|
265
|
+
| Binance BTCUSDT | 0.59 | 0.23 | 0.59 | 0.059 | 0.064 |
|
|
266
|
+
| Bybit BTCUSDT | 0.54 | 0.33 | 0.58 | 0.002 | 0.001 |
|
|
267
|
+
| Binance ETHUSDT | 0.70 | 0.15 | 0.70 | 0.036 | 0.094 |
|
|
268
|
+
| Bybit ETHUSDT | 0.31 | 0.43 | 0.51 | 0.001 | 0.003 |
|
|
261
269
|
|
|
262
270
|

|
|
263
271
|
|
|
264
|
-
**
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
1
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
**Bybit tends to move first, by tens of milliseconds.** Returns are most correlated at 0 ms (0.25
|
|
273
|
+
for BTCUSDT, 0.18 for ETHUSDT): most moves land on both venues within the same 50 ms. What is left
|
|
274
|
+
is lopsided in the same way on both instruments. The correlation at negative lags (Bybit first)
|
|
275
|
+
sums to 1.00 for BTCUSDT and 1.13 for ETHUSDT, against 0.26 at positive lags; the strongest
|
|
276
|
+
off-zero lag is Bybit 150 ms ahead on both. The regressions agree: Bybit's flow and return predict
|
|
277
|
+
Binance's next second (out-of-sample R² 3.6–9.4%), Binance's predict Bybit's by 0.3% or less. On
|
|
278
|
+
ETHUSDT, Binance's flow explains more of Bybit's price than Bybit's own flow does (0.43 against
|
|
279
|
+
0.31). The earlier 40-minute session pointed the same way; two instruments over two hours make it
|
|
280
|
+
a consistent pattern, but still one session. One limitation is built in: timestamps are local
|
|
281
|
+
receive times, so each venue's network latency to the recording machine is part of the measured
|
|
282
|
+
lag. A lead shorter than the difference in latencies can't be told apart from a faster connection
|
|
283
|
+
to Bybit, and a recording from a second location is the way to check.
|
|
273
284
|
|
|
274
285
|
## Roadmap
|
|
275
286
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|