R5 — replicate the Farmer/Patelli/Zovko (2005) scaling laws - #23
Merged
Conversation
The earlier comparison tested claims the paper never makes. Its model is Poisson with uniform order deposition, so it has no autocorrelated order flow by construction and never claimed to reproduce the stylized facts. The paper also warns off the single-stock design we used: section A6 says it is not clear the model should predict anything about longitudinal variations. The real test is cross-sectional. Predict each stock's spread and diffusion rate from its order flow, regress log s on log s_hat, ask whether the slope is 1. Parameters measured the paper's way: event time, log prices, the 2nd-to-60th percentile placement window. Across all five symbols both laws fail, diffusion by four orders of magnitude. But the diffusion regression comes out R^2 = 0.80 with a negative slope, which is not noise. It is a missing control variable. The variable is in the paper's supplement. The model has two nondimensional parameters, not one, and equation 1 is derived in the limit dp -> 0. The second is dp/p_c, the tick size over the characteristic price. INTC and MSFT sit at 17 and 22: a penny on a stock is seventeen times the characteristic price scale of its own order flow, and the spread is pinned at one tick almost always. The error is perfectly rank-ordered by dp/p_c, rho = 1.000, exact p = 0.017 over all 120 permutations. Rank test rather than regression because five points give three degrees of freedom and an interval on the slope that covers everything. Inside the stated domain the spread ratio is constant within a factor of 1.5, which is what the law predicts. So the paper is not refuted, it is confirmed as weakly as five stocks allow, and ignoring the tick parameter is what turns a scope condition into an apparent refutation. One deviation from the printed procedure, marked in the source: the paper's formula for alpha omits an event-time normalisation its own definition of mu includes. alpha is a rate density, so without it mu/alpha is not a price. It cancels in the spread but not in eps or the diffusion law.
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.
The earlier work tested claims the paper never made
docs/ZI_COMPARISON.mdmeasured eight stylized facts against one day of AMZN, found none reproduced, and framed it as a result "in the Farmer/Patelli/Zovko spirit."Then I read the paper. Its model is Poisson with equal buy/sell rates and uniform order deposition — it has no autocorrelated order flow by construction and never claimed to reproduce sign ACF or return kurtosis. The paper also explicitly warns off that design (§A6): single-stock longitudinal tests have "difficulties in getting a clean test," and "it is not clear that this model should predict anything at all about longitudinal variations."
That result wasn't wrong. It was aimed at nothing.
The actual claim is cross-sectional
Predict each stock's spread and diffusion rate from its order flow, then regress
log s = A·log ŝ + Band ask whether A = 1.Parameters measured the paper's way: event time, log prices, the 2nd-to-60th percentile placement window (the paper's one free parameter).
kis common to all stocks and lands in the intercept, so it never needs to be known.Paper: 11 LSE stocks, 434 days, A = 0.99 ± 0.10, R² = 0.96.
Both laws fail — and the failure has structure
R² = 0.80 with a negative slope is not noise. It's what a missing control variable looks like — which is why I went back to the supplement instead of reporting a refutation.
The missing variable is the tick
And Equation 1 is derived in the limit dp → 0. I had computed one of the two control parameters.
A penny on a $27 stock is seventeen times the characteristic price scale of its own order flow. The spread is pinned at one tick almost always; there is no room for a continuous-price mean-field result to describe anything.
The diffusion error is perfectly rank-ordered by dp/p_c: ρ = 1.000, exact p = 0.017. A rank test with an exact permutation p-value, not a regression — five points give three degrees of freedom and an interval that covers every hypothesis, so a regression here cannot reject anything and therefore cannot support anything either.
The spread ordering is ρ = 0.900, p = 0.083 — not significant. GOOG and AAPL swap. Reported as the null result it is.
Inside the stated domain (
dp/p_c < 1) the spread ratios are 4.36, 3.70, 5.66 — constant within a factor of 1.5, which is exactly what a correct law predicts, since the prediction is only determined up to a constant.Reading
The paper is not refuted — it's confirmed as weakly as five stocks allow. Ignoring the tick parameter is what turns a scope condition into an apparent refutation, which is the same mistake as the one at the top of this PR in a new costume: testing a model outside the regime it was derived for and reporting it as though the model had lost.
Honesty about the limits
Stated in the doc, not buried:
One deviation from the printed procedure, marked
DEVIATIONin the source: the paper's formula forαomits an event-time normalisation its own definition ofμincludes.αis a rate density, so without itμ/αis not a price. It cancels in the spread prediction but not inεor the diffusion law, and event counts differ 4× across this sample.Note on LOBSTER
The paper redefines orders by outcome — the transacting part of a marketable limit order is an "effective market order," the resting part an "effective limit order." LOBSTER's schema already does exactly this split, so it's a clean fit rather than an approximation.