Skip to content

Research r6 simulate - #25

Merged
brianmmaina merged 3 commits into
mainfrom
research-r6-simulate
Aug 16, 2026
Merged

Research r6 simulate#25
brianmmaina merged 3 commits into
mainfrom
research-r6-simulate

Conversation

@brianmmaina

Copy link
Copy Markdown
Owner

No description provided.

The dp/p_c result was a correlation on five points, and dp/p_c is large for
exactly the two cheapest stocks in the sample. Plenty of things that separate a
$30 stock from a $500 one would give the same ordering.

Simulation holds everything else fixed. zi_paper implements the paper's model,
the austere one, on our matching engine, and runs it at each stock's measured
alpha, mu, delta, sigma and its real tick. Nothing about a cheap stock is
present except four flow parameters and dp.

The tick alone reproduces 81% of the observed inflation, the same fraction for
both constrained stocks. Simulated inflation is perfectly rank-ordered by
dp/p_c, rho = 1.000, p = 0.017, and inside a simulation that is much stronger
than it was on real data because there is no confounder left.

The remaining 19% is real and stays in the writeup. So does the small-tick
ratio being 0.66 to 0.83 rather than 1: the simulation runs consistently below
the mean field prediction and that is not rounded to agreement.

Separate tool rather than a flag on zi_sim. zi_sim uses empirical sizes and an
empirical placement histogram, so it is a better imitation of a market and a
worse test of this paper. Mixing them would let a difference in the model look
like a difference in the law.

The width scan earned its place. Deposition intervals are semi-infinite and
have to be truncated somewhere; if the answer moves with the truncation the
boundary is setting the spread. The first version truncated to a fixed price
box and scanned 32.23, 32.23, 32.23, 0.00, 32.23. Non-monotonic in the width is
a bug, not a boundary effect: the book could pin its best bid against the top
of the box, leaving the sell interval empty so no sell could ever arrive again.
An absorbing one-sided state reporting a spread of zero. The box also made buy
and sell rates depend on where the price sat inside it, breaking the model's
equal-rates assumption. Anchoring each interval to the opposing quote fixes
both. Without the scan the fixed-box version would have produced a
plausible-looking table.

Parameters come from farmer2005.measure_all rather than being measured again,
so a difference in measurement cannot masquerade as a difference in the model.
368 lines to 315. The detail that got cut is in docs/ already, so the readme
was repeating itself.

Merged the benchmark commentary into two points instead of five, folded the
crash-safety walkthrough into the paragraph that explains why the independent
verifier is the part that matters, and collapsed the research section now that
FARMER_2005.md carries the caveats.

Test count was stale, 186 to 191. Gitignore __pycache__ and pdfs; the paper is
not mine to redistribute.
@brianmmaina
brianmmaina merged commit eb7259f into main Aug 16, 2026
11 checks passed
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