« The Market's Back-to-Back Streak Continues | Main | Google: Another Sign That End Times are Nigh »
Latest Stories
- Quote du Jour: Kill Me, Sure. But Save the Ozone.
- Interview with a (Fake) Hedge Fund Manager
- Reason # 7,732 Why Yahoo Management is Delusional
- First Faux Apple 3G iPhone Teardown
- New York as (Financial) Tech Startup Hub
November 26, 2007
A Puzzle, Plus More on the Market's Back-to-Back Streak
A few people have asked, so here is my data on the longest S&P 500 streaks (since 1950) without back-to-back up days. Considering that there have been 14,565 trading days since January 1950, you can see how we're waaay out in the tail of this particular distribution.
| Ending Date | Streak Length |
| 4/29/1994 | 28 |
| 11/15/1978 | 27 |
| 2/24/1984 | 27 |
| 3/9/1982 | 26 |
| 5/6/1970 | 25 |
| 9/24/2001 | 25 |
| 6/26/1969 | 24 |
| 4/26/1956 | 23 |
| 4/17/1962 | 23 |
| 3/18/1980 | 23 |
| 6/10/1982 | 23 |
| 3/5/2001 | 23 |
| 8/27/1973 | 22 |
| 10/4/2000 | 22 |
| 4/30/2002 | 22 |
| 2/21/1952 | 21 |
| 9/1/1953 | 21 |
| 12/27/1983 | 21 |
| 6/6/1967 | 20 |
| 9/5/1974 | 20 |
| 1/28/1977 | 20 |
| 8/13/1982 | 20 |
| 12/12/1991 | 20 |
| 11/26/2007 | 19* |
| * Ongoing |
------------------
As a math exercise for readers, try the following exercise -- and the first person to post a correct answer here wins a copy of Orrin Pilkey's curmudgeonly book Useless Arithmetic, about why quantitative models of the real world don't work.
First, however, some assumptions.
- Market movements are independent from day to day
- There is a 50% likelihood on any given day the market will be up, and a 50% likelihood it will be down
- Ignore the relatively rare flat-market cases
- There are 14,565 trading days in the period
Now, what is the probability we will see a run length of at least 19 in the period? Of 28? Of 50?
Sphere It
|
Digg it
|
Bookmark it
|
Stumble it
Yup, true enough. And here is another way of looking at the data. I've binned the data by decade, showing that pretty much every decade has its share of longer streaks.
Periods # streaks
1950-59 3
1960-69 4
1970-79 5
1980-89 5
1990-99 3
2000-pres 3
PK, quick question --
Do you mean runs of at least one run of 19, 28, and 50 ... or exactly one run of 19, or 28, or 50?
Cheers!
At least one run of each.
Yikes ... summation!
Gentlemen, start your binomial functions ...
Here's the probability of growth streak starting tomorrow and ending 19 days from tomorrow:
p = 0.5^19 = 0.0000019073486328125
That is ~2 in a million.
If we are looking for at least one 19 days streak between tomorrow and 366 days from now -- such streak can start between tomorrow and 366-19=347 days from now.
So, the probability increases by 347:
p = 0.5^19 * 347 = 0.0006618499755859375
Which is about 0.07% chance.
If we want at least one 28-days streak withing one year, then the chances are:
0.5^28 * (366-28) = 0.000001259148120880126953125
Which is a little bit more than one chance in a million.
The same for 50-days streak:
0.5^50 * (366-50) = 2.8066438062523957341909408569336e-13
Which is less than 1 in a trillion.
Chances of 50 days long winning streak in the next 100 years would be about:
0.5^50 * 100 * 365.25 = 3.2440716779547074111178517341614e-11
Which is ~32/trillion.
Chances of 19 days long winning streak in the next 100 years would be about:
0.5^19 * 100 * 365.25 = ~7%
Not bad :-)
Note, that chances of growth day are probably a little bit higher than 50%. May be ~51%.
Also if today was a growth day, then chances of tomorrow to be a growth day are considerably higher. ~70% may be?
If we've had a run of N days (for N >= 2) so far without two up days in a row, the chance that the stretch will continue for another day is 5/6: there's three equally likely outcomes of the last two days: DU, UD, or DD [UU is excluded by the thesis]; 2 of these end with D, so the next day cannot end the streak. One ends with U, so the next day has a 50% chance of ending the streak, if it is up as well; thus, each incremental day has, on average, 1/6 chance of ending the streak. The chance that the first two days in any period will not be UU is 3/4. Thus, in a random market, for any day, the chance the next 19 days will not have two up days in a row is (3/4)*(5/6)^17 = about 3.3%. If there's 250 trading days in a year, it's nearly certain that we would have one such period in each year (an imprecise calculation yields about one chance in 5,000 that we would not have such a period in any single year). 4 years in 5 would have such a stretch of 28 days or longer.
So I guess the market isn't random (it's certainly not 50/50, but its up bias doesn't seem to be sufficient to account for the data).
... so (due credit to everybody):
Probability of a 19 day streak in the period:
0.5^19*(14565 - 19) = 2.77442932129e-02
~ 1 out of 36
Probability of a 28 day streak in the period:
0.5^28*(14565 - 28) = 5.41545450687e-05
~ 1 out of 18465
Probability of a 50 day streak in the period:
0.5^50*(14565 - 50) = 1.28919097619e-11
~ 1 out of 77 billion
Small correction, it should be
0.5^19*(14565 - (19 - 1))
0.5^28*(14565 - (28 - 1))
0.5^50*(14565 - (50 - 1))
The probabilities remain similar.
Hey Paul,
One small quibble -- how do you account for the long term bias of the market being up, if advancing versus declining days are even?
Is that assumption justified? Or, are you building in a factor of equal + / - days, with the long performance coming from grater amplitudes on the positive days?
My personal experience has been the greatest up days -- the highest volatility -- comes during bear markets. During bull markets, we tend to get longer streaks upwards of modest gains, but with very limited selling -- small numbers of down days, few with great amplitude, and few strung together.
Just curious about the initial assumption (I presume it makes the math easy!)
"how do you account for the long term bias of the market being up, if advancing versus declining days are even? Is that assumption justified?"
Since 1950 the S&P 500 has risen on 52.7% of days. The average gain on those days is 0.62%. The average loss on down days is a symmetrical 0.62%.
(There's a slight downward bias since the data I'm looking at is just index levels, i.e. exclusive of dividends.)
A number of people have been misunderstanding the question: it is not the chance of having 19 (or whatever) down days in a row; it is the chance of having 19 consecutive days without having two up days in a row.
I wrote a monte carlo simulation. If there's a 50/50 chance of an up/down market, then in 14,565 trading days, the median longest stretch without two up days is about 38 days (in 1,000 trials, 50.8% of trials had a longest such stretch of 38 days or shorter, so 49.2% of trials had longer stretches). In the 1,000 trials, I saw stretches as long as 63 days, and the longest stretch was 19 days or longer 100% of the time (in 1000 trials, the shortest longest stretch was 28 days, which happened just 0.4% of the time). 4% of the trials produced stretches of 50 days or longer.
If I adjust the chance of an up day to 52.7%, I get pretty similar numbers (chances vary more run-to-run than they do based on changing the probability).
For completeness, since you asked, the chance of having such a trading period with a stretch of exactly 19 days, exactly 28 days, and exactly 50 days is about 1%.
So again, this doesn't match the actual market data at all: the market is not random. No surprise.
"So again, this doesn't match the actual market data at all: the market is not random. No surprise."
This is good evidence of a plunge protection team.
For any two day period, there are four outcomes: U/U, U/D, D/U & D/D. The probability of back-to-back up days is one-in-four (25%).
For a 19 day period, there are 18 consecutive days so the probability of no back-to-back up days is equal to (1-25%)^(18) or ~0.564%. The chance of seeing AT LEAST ONE 19 day or greater run during the period is equal to 1-(1-0.564%)^(14565-18) or ~100.000%.
For a 28 day period, changing the formula results in a ~0.042% probability of no back-to-back up days and a probability of AT LEAST ONE 28 day or greater period of ~99.788%.
For a 50 day period, the probabilities are ~0.00008% and ~1.090% respectively.
Hope this is right!
We have a winner. Nicely done, Tim -- as well as ably explained.
Email me (at the address in top right) and a copy of Pilkey's fine book will soon be winging your way.









The thing that jumps out from the list is how many of those years were bad.