Is it OK to assume a trading strategy should have a binomial distribution if the price is just a random walk?
using p of the event as:
$$\frac{AverageStopLossPercent}{AverageStopLossPercent + AverageTakeProfitPercent}$$

More details in case this is an XY problem:
I want to test some strategy (I think is not important which one, suppose just a normal RSI indicator), if I set the take profit to 1% and stop loss to 1%, and I execute 30 trades, what is the probability of getting 20 wining trades in a random walk market?

What I'm trying to calculate is the chance of a false positive. Because in that example 20/30 = 66%. And if the market is just random I guess all strategies will have 50% (if TP/SL ratio is 1:1). So at first it looks like is not a random walk but the strategy found a pattern. But how can we calculate if this is a false positive? I mean, if we flip a coin 30 times we could have 20 heads too, even in a fair coin right?

I was thinking in using the binomial as reference, in that example n=30, p=0.5, and k=20, it gives the probability of k to n (k>=20) of 2%
So we could say there are 2% of chance the strategy is giving a false positive?


2 Answers 2


It is a good idea to make an assumption of "no informational content" on prices to have a reference level for this $H_0$ hypothesis. The best is probably to make Monte-Carlo simulations, i.e. to simulate as many random walks as possible and to record the full distribution of the payoff, hence you will obtain a probability that your strategy is better than this $H_0$ one by simply counting the percentage of Monte-Carlo simulations that make worst than your idea.

Let me be more accurate:

  1. you take the historical time series of prices your strategy uses
  2. you estimate its covariance matrix and trend
  3. using these two statistics you simulate 10,000 compatible price trajectories
  4. you apply your strategy on them
  5. you obtain 10,000 PnL
  6. you compute as many scores on it as you want (like the Sharpe Ratio)
  7. you score the score of your strategy vs this distribution of 10,000 scores, i.e. the percentage of these strategies that are worse than yours
  8. the closer to 100%, the better.

Last remark: you can replace steps 2 and 3 by any other generative model, like bootstrap or GAN/autoencoder (since machine learning has to be cited in any answer nowadays!).

  • $\begingroup$ thanks! I will search more about the sharpe ratio and bootstrap etc. But can you clarify why is not a good idea just to use the binomial distribution? I mean if is random walk should be just like flipping a coin right? also can you point me in the right direction for steps 2 and 3? maybe some good resource/tutorial to create those simulated prices $\endgroup$
    – Enrique
    Commented Sep 15, 2019 at 15:13
  • $\begingroup$ binomial is good, but will never provide you the flexibility of Monte-Carlo (especially if you want to preserve volatility or covariances). $\endgroup$
    – lehalle
    Commented Sep 15, 2019 at 15:15
  • $\begingroup$ but I think something is wrong, because there are some strategies giving 70% of good trades, using TP/SL ratio = 1, combining long and short, and with 100 trades. If I calculate the binomial with p=0.5, n=100 and k=70, then it says is almost impossible to get that for example flipping a coin. That means the strategy is by sure not flipping a coin and doing something good? and hence the price is not random walk? $\endgroup$
    – Enrique
    Commented Sep 15, 2019 at 15:27
  • $\begingroup$ A random walk is different from brownian motion. Prices do not go up and down by the same increment each timestep. The increments are Normally distributed so they will each have a different size. $\endgroup$
    – roz
    Commented Sep 15, 2019 at 16:56
  • $\begingroup$ it is true @roz , nevertheless it is possible to design random walks with different increments. In any case a Monte-Carlo simulation (or a bootstrapping of time series) seems to be more adequate to simulate prices. $\endgroup$
    – lehalle
    Commented Sep 15, 2019 at 18:01

What you are describing is not a binomial. It is incidentally expressed in percentages but percentages are not what makes something a binomial process. While I have no idea what the likelihood function is here, what you are creating is some form of ratio distribution. It wouldn't be very helpful because your model doesn't show how it is generated. What you are seeing are results.

I saw your other post.

You cannot back into estimating false positives by using historical data. False positives are model dependent. Your null hypothesis and your statistical paradigm determine your rate of false positives.

If you look at Lehalle's answer, what he is telling you is really about modeling. He is assuming you are creating a null model. Based on your other question, you are not.

If you use Lehalle's suggestion, then you will need to control for multiple comparisons. Your other question implies you are searching potentially hundreds of models. I suggest using something like the Holm-Bonferroni method. It will make most of your postive results negative. You can find it at Holm-Bonferroni.

You should also look at things such as the AIC to choose models but that implies you know your likelihood function. It is at AIC.

  • $\begingroup$ Maybe I'm not explaining it well, I'm trying to find a way to compare two "hypothesis": A) there are patterns in the test data (price candles). B) there are not patterns, is just random. If I make 100 trades, following the "same rules" (for example buy after a green candle and sell on next candle) and that gives 99 of win trades. Can we say is not random? and there is a pattern in that data (in this case the green candle)? $\endgroup$
    – Enrique
    Commented Sep 20, 2019 at 12:32
  • $\begingroup$ The reason why I'm using the binomial here is because I compare the random situation with tossing a coin. If you toss the coin 100 times, and you bet every time and win 99, it could be just luck of course, but that would be "too much luck" and maybe is more logical to think is not a fair coin? If we backtest some "pattern" and we win 99 of 100 trades, it could be luck, but is not more logical to think that pattern could be correct and then the price is not so random? (I'm just trying to find a way to compare that, luck vs pattern) $\endgroup$
    – Enrique
    Commented Sep 20, 2019 at 12:49
  • $\begingroup$ @Enrique see my other post, but there are two problems with your thinking. First, there isn't a fifty percent chance of winning on an individual trade. That assumption is a specification error. Second, a pattern isn't necessarily an individual event or a trial of fixed size. Your definition of a pattern would have to be very rigid to treat it as such. $\endgroup$ Commented Sep 20, 2019 at 16:32
  • $\begingroup$ In my other post I'm using random simulations on the real data. Here was a more a simplistic assumption I know, the reason to think about Binomial is to discover if the probability is 50%. I mean, i start with that hypothesis: "suppose the market is random, and every trade has 50% of chance of win" then in that case, how difficult will be to find a strategy with 100 trades and 70 win trades? If it's too difficult, and I actually found a strategy 70/100 in my backtest, then we could assume that our hypothesis is not true right? $\endgroup$
    – Enrique
    Commented Sep 20, 2019 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.