Repository navigation
feat(analytics): a relative move threshold, and the ETH result it unlocked - #68
Merged
Merged
Conversation
…ocked
Adding a second instrument to a capture found nothing: four qualifying
moves on ETH over 29 minutes against BTC's 58. The market was not quiet.
The methodology was wrong.
--move-cents asks whether a venue repriced by a fixed number of cents. BTC
traded at $79,613 in this window and ETH at $2,455, so a $1.00 threshold
is 0.0013% of one instrument and 0.041% of the other - a 32x difference in
what counts as a move. The two instruments were being asked different
questions and nothing in the output said so. The comment in the caller
already described the second instrument as "a control on the first", which
it could not have been.
--move-bps states the threshold relative to the instrument's own price,
resolved inside estimate() against the median mid so one outlier quote
cannot set the scale, and reported per instrument so a cross-instrument
comparison can be checked rather than assumed. It is fractional because a
repricing on a $79,000 instrument is a fraction of one basis point: the
old $1.00 default is 0.126 bp of BTC.
At 0.126 bp the BTC column is unchanged, which is the control, and ETH
goes from 4 moves to 117:
BTC/USD threshold $1.00 27/58 vs 17/136 z = 5.19 confirmed
ETH/USD threshold $0.031 63/117 vs 67/484 z = 9.43 confirmed
Both confirm the Binance-leads ordering in the same capture under
identical market conditions, which is the strongest form this claim has
taken - the second instrument is a control rather than a separate study on
a different afternoon.
The capture ships as docs/bench/btc-eth-xvenue.feedlog.gz, 4 MB, and
reproduces both figures. check_bench_inputs.py caught it being documented
before it was committed, which is what that guard is for.
The headline was one instrument replicated across two sessions eight days apart. It is now also two instruments confirmed within a single session, which is a different and stronger kind of evidence: the sessions could differ in market conditions and the instruments cannot, so the second one is a control on the first rather than a second study. BTC at z = 5.19 and ETH at z = 9.43 in the same 29 minute window, with Binance's moves answered roughly four times as often as Coinbase's on both. The cross-session replication stays, below it, because the two answer different objections - one that the finding is an artefact of a particular afternoon, the other that it is an artefact of a particular instrument.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a second instrument to a capture found nothing on ETH: four qualifying moves in 29 minutes against BTC's 58. The market wasn't quiet. The methodology was wrong.
The defect
--move-centsasks whether a venue repriced by a fixed number of cents. In this window BTC traded at $79,613 and ETH at $2,455, so a $1.00 threshold is 0.0013% of one instrument and 0.041% of the other — a 32× difference in what counts as a move.The two instruments were being asked different questions and nothing in the output said so. The comment in the caller already described the second instrument as "a control on the first", which it could not have been.
This is the failure mode that doesn't announce itself: it reports a smaller sample and a weaker result, which reads as a quiet market rather than a broken measurement.
The fix
--move-bpsstates the threshold relative to the instrument's own price, resolved insideestimate()against the median mid so one outlier quote can't set the scale, and reported per instrument so a cross-instrument comparison can be checked rather than assumed.Fractional, because a repricing on a $79,000 instrument is a fraction of one basis point — the old $1.00 default works out to 0.126 bp of BTC.
The result
At 0.126 bp the BTC column is unchanged (the control), and ETH goes from 4 moves to 117:
Both confirm the Binance-leads ordering in the same capture, under identical market conditions. That's the strongest form this claim has taken — the second instrument is a control rather than a separate study on a different afternoon, and the two objections it answers are different: cross-session replication rules out a particular afternoon, cross-instrument confirmation rules out a particular instrument.
Data
The capture ships as
docs/bench/btc-eth-xvenue.feedlog.gz— 29 minutes, 122,445 records, 4 MB gzipped — and reproduces both figures.check_bench_inputs.pycaught the doc referencing it before it was committed, which is exactly what that guard exists for.234 tests, perf gate, README-flag and bench-input checks all pass.