CADF in plain English: a drunk guy and his dog.
I was testing a pretty basic mean-reversion strategy on MES recently. The idea was simple: price stretches too far, we bet it comes back.
Sounds logical. The tests came back terrible.
The problem is that MES is perfectly capable of stretching "too far" and then continuing in the same direction for much longer than your mean-reversion strategy would like. Statistically unreasonable does not necessarily mean tradeable.
Imagine a drunk guy walking home. He is wandering all over the place. Left, right, forward, backwards. You have absolutely no idea where he will be in 10 minutes.
That is basically MES on its own.
Now give the drunk guy a dog on a leash.
The dog is also wandering around, so individually you still cannot predict either of them very well. But now there is something potentially more stable: the distance between them.
The dog can run ahead, the man can fall behind, but if there is actually a leash connecting them, that distance cannot keep expanding forever. Eventually something pulls it back.
That distance is the spread.
This is the interesting part of pairs trading. I do not necessarily care whether both markets are rallying or both are falling. If they normally move together and one suddenly gets unusually far away from the other, I can trade the gap rather than trying to predict the direction of the whole market.
A strong market trend that can destroy a simple mean-reversion strategy on MES may matter much less if both legs move together.
So what does CADF actually ask?
Basically one question:
Is there actually a leash, or are these just two drunk wanderers who happened to move in the same direction for a while?
It does three things.
1. Match the sizes.
First we calculate how much of B normally moves with A. That is the hedge ratio.
If gold moves $10 and silver typically moves $0.15 alongside it, you do not just trade one contract of each. You size them according to that relationship.
Basically: work out how many dog steps equal one human step.
2. Measure the gap.
Now calculate the spread:
A − matched amount of B
...over several years of data.
3. Test whether the gap actually comes back.
This is where CADF comes in.
Does the spread keep returning toward some normal level, or does it simply drift away and stay there?
The test produces a score. The more negative the score, the stronger the evidence that the spread is genuinely mean-reverting.
In Chan's classic EWA/EWC example the score was around −3.64, which passed the required threshold.
Leash detected.
And what is the "C"?
This is the slightly annoying statistics part.
We already used the historical data to choose the hedge ratio that makes A and B fit each other best. Naturally, that makes the resulting spread look a little better than it otherwise would.
The test accounts for that by using a stricter threshold.
In simple terms:
Nice fit. Now prove it properly.
That is the cointegration-adjusted part.
We also test both directions, A against B and B against A, because the relationship is not always perfectly symmetrical.
Does passing CADF mean we found free money?
Unfortunately, no.
CADF does not tell you that the pair will make money after commissions, slippage and execution costs. It also does not tell you that the relationship will continue forever.
It only tells you that, over the period tested, there is statistical evidence that the spread behaved like something tied together rather than two random markets that happened to look similar.
So for me CADF is not a strategy test.
It is a relationship test.
First question:
Is there a leash?
If yes, then we can ask the more useful question:
Can we make money trading it?
After that it still goes through the normal process: survey, longer-history checks, split-period validation, walk-forward, sim and eventually live.
At least now we are trying to mean-revert something that has statistical evidence of actually wanting to come back, rather than repeatedly shorting MES because "surely it cannot keep going up."