Pages

Thursday, May 9, 2013

Combinatorial analysis with financial markets

With markets posting consecutive periods in the same direction (e.g., number of weeks up in a row), it is worth a discussion of the retrospective probability associated with outcomes of a zero-trend random walk.  We use zero-trend, because if there were a fundamental reason for an uptrend, then the market analysis should instead be based relative to that uptrend.  For example, if there were a fundamental reason that the financial markets should rise 1% weekly, then the market analysis should be the random probability associated with markets rising above 1% for a number of consecutive periods and not simply having an “up” streak.  “Up” could imply a rise of 0.9% that wouldn’t mean as much if we were in a 1% trend versus a zero-trend.  Four scenarios are analyzed below: 0 of n, 1 of n, 2 of n, and 2 of n without successives.  This analysis will inform your view of whether a streak or pattern is genuine or could simply be a result of chance alone (e.g., a similar streak from coin flips).


0 of n:
What is the probability of seeing the markets losing in zero weeks of the past 6 weeks?  To answer this, we first anchor that the start of the analysis is a daily rise.  It is important to understand that this retroactive approach differs from a prospective combinatorial analysis, where we do not lose this one degree of freedom of the 6.  We now get an additional 5 weekly rises in succession, each with a 50% chance of occurring.  And 50%^5 = 3%.  Another way of seeing this is to know that 2 outcomes per week (win or loss) to the 5th exponent is 32.  50% is 1 divided by 2, and similarly, 3% is 1 divided by 32.


1 of n:
Now bear in mind that this entire analysis would not result in different answers if “n” were defined in days or months, instead of weeks.  Now what is the probability of instead seeing the markets lose 1 week of the past 6 weeks?  To answer this, we have to start moving to combinatorial equations.  The number of combinations of 1 loss (note this is different than 5 of the complement) in the past 6 weeks is 5, since we have anchored the performance 6 weeks ago to a gain.  So [5!]*(50%^6) = 16%.  It makes sense that it is more likely to get 1 losing week of the past 6 weeks, versus the likelihood of getting no losing weeks during that time.


2 of n:
Now what is the probability of instead seeing the markets lose 2 weeks of the past 6 weeks?  Similar to the technique above, the number of combinations of 2 losses in the past 6 weeks is 10.  See the diagram below, and note that we are not differentiating with ordering permutations since we do not distinguish the quality of any losing weeks versus any gaining weeks.  So [5!/(5-2)!/2!]*(50%^6) = 31%.  It makes sense that it is more likely to get 2 losing weeks of the past 6 weeks, versus the likelihood of getting just 1 or zero losing weeks of this fraction of time.  Note that the value in the [] above is 10, and those combinations are shown below.

1. W-L-L-W-W-W
2. W-L-W-L-W-W
3. W-L-W-W-L-W
4. W-L-W-W-W-L
5. W-W-L-L-W-W
6. W-W-L-W-L-W
7. W-W-L-W-W-L
8. W-W-W-L-W-L
9. W-W-W-L-L-W
10. W-W-W-W-L-L


2 of n, without successives:
Now what is the probability of seeing the markets lose 2 weeks of the past 6 weeks, without those two weeks being adjoined?  Similar to the technique above, except we do not include the successive loss weeks.  See the diagram below, and note that we are still not differentiating with ordering permutations since we do not distinguish the quality of any losing weeks versus any gaining weeks.  So [10-(5-1)]*(50%^6) = 19%.  It makes sense that this scenario is less likely versus the unrestricted possibility of adjoined losing weeks.  But it is trickier to know when it is more likely versus other outcomes.  For example, is it more likely to have 1 loss in 5 weeks, or 2 non-consecutive losses in 5 weeks?  In the [] above we subtract 4 of the 10 scenarios, which is shown below.

1. W-L-L-W-W-W
2. W-L-W-L-W-W
3. W-L-W-W-L-W
4. W-L-W-W-W-L
5. W-W-L-L-W-W
6. W-W-L-W-L-W
7. W-W-L-W-W-L
8. W-W-W-L-W-L
9. W-W-W-L-L-W
10. W-W-W-W-L-L


Let’s now see the entire probability distribution of these varying market statistics (0 of n, 1 of n, 2 of n, 2 of n without successives, and even 3 of n).  Instead of just using the 6 weeks as an example, as we have above, we look at a wide range of time periods.

No comments:

Post a Comment