Skip to content

feat(analytics): a relative move threshold, and the ETH result it unlocked - #68

Merged
DanielWLiu07 merged 2 commits into
mainfrom
feat/relative-move-threshold
Sep 5, 2026
Merged

DanielWLiu07 merged 2 commits into
mainfrom
feat/relative-move-threshold

Conversation

@DanielWLiu07

Copy link
Copy Markdown
Owner

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-cents asks 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-bps states the threshold relative to the instrument's own price, resolved inside estimate() 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:

instrument threshold Binance answered Coinbase answered z
BTC/USD $1.00 27 / 58 = 0.466 17 / 136 = 0.125 5.19
ETH/USD $0.031 63 / 117 = 0.538 67 / 484 = 0.138 9.43

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.py caught 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.

…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.
@DanielWLiu07
DanielWLiu07 merged commit 53553ac into main Sep 5, 2026
9 checks passed
@DanielWLiu07
DanielWLiu07 deleted the feat/relative-move-threshold branch September 5, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant