Skip to content
All library documents

Testing Trading Strategies Against Random-Walk Null Models

Article Quant Q&A · Author: Enrique

Summary

The document considers whether a strategy with fixed take-profit and stop-loss levels can be evaluated by treating wins as binomial outcomes. It cautions that a win count alone may not represent the strategy’s payoff process, and that a false-positive rate depends on the null hypothesis and statistical model. A simple fair-coin comparison may not capture path-dependent entries, exits, or returns.

One proposed approach is to generate many price paths consistent with selected historical properties, run the strategy on each path, and compare its performance score with the simulated distribution. Bootstrap or other generative models are offered as alternatives, but the choice of model determines what the comparison means. The document also warns that searching many candidate strategies creates multiple-comparison risk and recommends correction methods such as Holm–Bonferroni. The simulation recipe is illustrative; it does not establish that its chosen statistics or path model adequately represent market behavior.

Key ideas

  • A count of winning trades is not automatically a binomial outcome merely because it is expressed as a percentage.
  • False-positive rates depend on the specified null hypothesis and the process used to generate results.
  • Monte Carlo price paths can provide a reference distribution by applying the same strategy to each simulated path.
  • The simulated paths should reflect relevant properties of the price series, and other generative approaches may be used.
  • Searching many strategies increases the chance of selecting an apparently successful result by chance.
  • Multiple-comparison corrections can help account for repeated model searches.

Tags

Full text
# If price is a random walk, is ok to use the binomial distribution to estimate a trading strategy?


# If price is a random walk, is ok to use the binomial distribution to estimate a trading strategy?












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?

## Answer by lehalle (score 1)

https://quant.stackexchange.com/a/48691

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:

- you take the historical time series of prices your strategy uses

- you estimate its covariance matrix and trend

- using these two statistics you simulate 10,000 compatible price trajectories

- you apply your strategy on them

- you obtain 10,000 PnL

- you compute as many scores on it as you want (like the Sharpe Ratio)

- 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

- 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!).

## Answer by Dave Harris (score 0)

https://quant.stackexchange.com/a/48791

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.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.