Quote:

Originally Posted by **paszkman** |

I believe you will find this article interesting:

https://courses.cit.cornell.edu/info2950_2012sp/mh.pdf
It goes through a conceptual derivation of how to determine the average number of occurrences needed before the first occurrence of a specific sequence. The basic formula to determine this from the article (equation d2) is as follows:

An = (1 - p^n) / [p^n * (1-p)]

So for instance, in my case I am shooting for a success probability of 65%. If I am interested in finding on average how many trades I would need to make before I had 5 consecutive losses in a row:

A5 = (1 - 0.35^5) / [0.35^5 * (1-0.35)] = 291.

So, I can expect to have 5 consecutive losses in a row about once every 291 trades with such a system. This means my original thinking of this was wrong since my original thinking was this could be derived simply as 1 / 0.35^5 = 190.

The article also indicates there is no good closed form solution for determining the probability of x consecutive occurrences in y trials. It used numerical simulation to determine this for a 50/50 probability situation with 100 trials. The simulation indicates that in this situation, the probability of 5 consecutive occurrences is 81%. For 50 trials I would expect this to be a good amount lower. Your tables indicates this as being 77%...my thinking is this is on the high side although I have not gone through this exercise to conclusively debunk it...yet.

One thing I will say though to justify scrapping the strategy if I have 5 consecutive losses off the bat, is the probability of this occurring is 0.5^5 = 3.1% for a 50/50 system. It would be only marginally higher for a sample size of 10. Yes, still possible, but highly unlikely with a 50/50 system and even less so with something higher than 50/50 probability. Since I am only risking $25 per trade though I may just let it go 6 consecutive losses before scrapping it :P .

I will probably at some point dust of my (quite substantially) lacking matlab programming skills and derive a table similar to this. This is an interesting way of looking at a system, especially in the midst of a loosing streak to help from getting discouraged (or to tell you something is off). I will use this going forward, but I think looking at it from a binomial distribution standpoint is perhaps a bit more useful than this.

See post #12 (page 2) in this thread if you are interested in knowing about that if you don't already. Skip down to the first table I have in that post and then start reading the paragraph before the list of 2 items. You can stop reading the paragraph after the second table. You may find that interesting if you have not already read it. I will give the disclaimer though that my knowledge of probability and statistics is quite limited and it has been a while since I used it, but I do believe what I have posted is correct (dusted off my trusty copy of

Kreyszig when I was going through that).

As a final note:

With regards to backtesting. No I have not backtested this one formally yet. I have done a look back with my screener (as far back as 6 months ago) and the majority of the time the stocks that show up in the top 10 continue down for at least some time. Since this system is not purely mechanical I would need to do a monte carlo simulation to properly backtest it...probably allowing it to pick randomly from the top 10. I do not have the software needed to do this. There might be a way to do this in Matlab feeding in data from yahoo finance, but really I am not smart enough to figure that one out. My programming skills are seriously lacking.