Z-scores
Measure distance from the mean in standard deviations · 8 min
- Close
- 20-day mean
- ±2 σ bands
The shaded band is where price spent most of its time.
A rule buys whenever price is 2 standard deviations below its 20-day mean and sells at the mean. On which kind of market does it make money?
A z-score measures how far a value is from its mean, in standard deviations. Computed on the last n closes, it turns "far from normal" into one number that means the same on any price scale.
If prices were normal and steady, |z| above 2 would happen about 5% of the time. Real and simulated returns have fat tails, so big z-scores come more often, and they come in storms. A mean-reversion rule bets that the gap closes. That is true for markets with a pull back to a fair value, and false for trends, where far from the mean is where price is going.
- Close
- 20-day mean
- ±2 σ
- z-score
- Entry levels
Last close 92.17, mean 94.23, z = -1.01.
Generated markets, not real data. They show how a rule depends on the market it meets; they do not predict how real markets behave.
One reversion trade in z terms
- 20-day mean, standard deviation
- 100.00, 3.00
- Close
- 94.00
- z
- (94 − 100) ÷ 3 = −2.0: buy
- Target: back to the mean
- 100 − 94 = +6.00 if the mean holds still
- Stop at z = −3.5
- 100 − 3.5 × 3 = 89.50, a risk of 4.50
- Reward-to-risk
- 6.00 ÷ 4.50 = 1.33
You bought at z = −2.3 with an exit at the mean. Two days later z is −0.4. What does the rule do?
Mean 48.00, standard deviation 1.50, close 51.30. What is z?
A rule enters at ±2 σ. Mean 80, σ 2.5. Which close triggers a long?
Missed questions come back for review after one day, then three, then a week.
The 20-day mean is 200 and the 20-day standard deviation is 10. Price closes at 180. What is its z-score?
Hint: z = (price − mean) ÷ standard deviation.
Three years of a fresh generated market are on screen; the next two years do not exist yet. Tune the rule on what you can see, commit to two predictions, then generate the future.
- Your rule so far
Over the next two years, after costs, this rule will…
What kind of market is this?
Generated markets, not real data. They show how a rule depends on the market it meets; they do not predict how real markets behave.
Want to feel it candle by candle? Fade the edges in the choppy-range market →