Skip to content

R5 — replicate the Farmer/Patelli/Zovko (2005) scaling laws - #23

Merged
brianmmaina merged 1 commit into
mainfrom
research-r5-farmer2005
Aug 16, 2026
Merged

R5 — replicate the Farmer/Patelli/Zovko (2005) scaling laws#23
brianmmaina merged 1 commit into
mainfrom
research-r5-farmer2005

Conversation

@brianmmaina

Copy link
Copy Markdown
Owner

The earlier work tested claims the paper never made

docs/ZI_COMPARISON.md measured 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 ŝ + B and ask whether A = 1.

ε  = δσ/μ
ŝ  = (μ/α)·f(ε),  f(ε) = 0.28 + 1.86·ε^¾
D̂  = k·μ^2.5·δ^0.5·α^-2·σ^-0.5

Parameters measured the paper's way: event time, log prices, the 2nd-to-60th percentile placement window (the paper's one free parameter). k is 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

spread    (all 5):  A = +0.038   95% CI −0.400 .. +0.475   R² = 0.024   REJECTED
diffusion (all 5):  A = −0.612   95% CI −1.181 .. −0.042   R² = 0.796   REJECTED

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

"the properties of the model only depend on the two non-dimensional parameters ε and dp/p_c"

And Equation 1 is derived in the limit dp → 0. I had computed one of the two control parameters.

price dp/p_c spread err diffusion err
GOOG $570.78 0.21 4.36 11.6
AAPL $583.15 0.35 3.70 12.6
AMZN $222.72 0.76 5.66 93.2
INTC $27.05 17.30 39.75 9,386
MSFT $30.55 22.03 50.35 20,629

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:

  • 5 stocks and 1 day, against 11 stocks and 434 days. Every number rests on a single day's estimate with no way to assess stability.
  • p = 0.017 is the floor. The smallest attainable two-sided p at n=5 is 0.017. It cannot get stronger no matter how real the effect. Suggestive, not established.
  • The 3-stock subset regressions are printed but should not be quoted — 95% CI on A of −6.6 to +9.6. The ratio column and the rank test carry the argument.
  • US equities 2012 vs LSE 1998–2000. Reg NMS pins the increment at $0.01, which is what creates the dp/p_c spread being exploited — plausibly why the paper never needed the cut.
  • Hidden executions excluded; order lifetimes censored at the close.

One deviation from the printed procedure, marked DEVIATION in 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.

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.
@brianmmaina
brianmmaina merged commit be38504 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