Research r6 simulate - #25
Merged
Merged
Conversation
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.
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.
No description provided.