| |

Understanding how the p-value is used in trading

The concept of the p-value in trading is a term that is often banded around. However, what exactly is the p-value, and furthermore, how is it used in trading? In this article, we will look to answer these questions and, additionally, show a few examples using CGMBet.

The theory behind the p-value

To begin with, think of the p-value as a statistical ‘nonsense detector.’ Essentially, it answers the most important question in data analysis: Did this result happen because of a real pattern, or alternatively, was it just dumb luck? Specifically, a low p-value tells you that what you are seeing is likely the real deal. Conversely, a high one warns you that it’s probably just a fluke. As traders, we need to be aware of the p-value in trading without having an advanced mathematics degree A full explanation can be found in this Investopedia article.

As traders you are looking for a p-value of under 5% or 0.05 in real terms. You want this to be even lower if possible but we mustn’t lose sight of other data too. For example, the sample size is important. A p-value of 3% but a sample size of 20 isn’t going to tell you too much. The bigger the sample, the more reliable the p-value will be.

The p-value in trading

Once you have created a strategy, you will most likely want to backtest it. Imagine you have identified a strategy that looks promising. It has a good strike rate and it has a positive yield over a decent number of games. But how do you know if this strategy has performed well because of luck and a lot of noise in the data or if it is a genuinely strong strategy? This is exactly what calculating the p-value in trading will tell you. The p-value is calculated using the size of your sample, how many bets have won and what the average odds are for your winning selections.

A screenshot of the CGMBet p-value calculator. This shows a sample of 100 bets, 41 winners and average odds of 2.20. This is giving a p-value of 87.99 which means a lot of luck is involved
The CGMBet p-value calculator

The CGMBet calculator gives you a quick way to check the p-value of particular situations. This can take into account commission too, giving you a truly accurate view of your strategy. Equally important is the expected losing sequence which the software calculates. In this example, you can expect a losing run of 9 games. You can play around with any losing sequences to get the overall chance of that occurring. All of this is derived from the p-value. This tool is highly complex and saves you all of the manual calculations. This free tool (it is not a paid add-on) gives you so much more vital information about your strategy than you have ever had before.

Now you can tell which of your strategies really are working. If you have any with a high p-value, more work is required to remove the luck element, or maybe its just not as good as you thought it was.

Examples of the p-value in strategies

We are going to use CGMBet to show some examples of the p-value with some made up strategies. This will show just how hard it is to create strategies that highly skillful and not random. Although it’s not impossible to create strong strategies, the markets are extremely efficient which makes this difficult to achieve

Strategy 1 : Home winners with odds under 2 and have won all of their last 3 home games

We are using all games in all leagues in the 25/26 season for our backtesting. The criteria we have used is home win odds <2 and the home team winning 100% of their last 3 home games. At the time of writing, this gave us 634 games.

CGMBet strategy backtesting

As we can see from the results, even with an odds on favourite who has good home form for the past 3 games, we have a losing strategy. With a p-value of 30.26. Even though this number is closer to 5 than it is to 99, it is still considered as being weak evidence. It is still indistinguishable from just being random luck. As it stands, you can’t have any confidence in this strategy. If this strategy actually had zero edge (was totally random), there is still a 30% probability that we would see results this good (or better) just by chance.

Strategy 2 : Over 1.5 goals with odds <1.6 and BTTS Odds <1.9

For the second strategy, I am looking at the over 1.5 goals market. My criteria for this strategy is to use odds of under 1.6 on the over 1.5 goals market, combined with the both teams to score odds of under 1.9

CGMBet overs backtesting

Straight away we can see that the p-values in this strategy are more favourable than the previous strategy. The over 0.5 goals market actually has a p-value of 0, over 1.5 has 0.06 and even the over 2.5 goals strategy only has 1.37. There is no luck involved in this strategy on these markets, yet every one of them is making a loss. Why is this? The markets are super efficient. We have used criteria that proves this. We haven’t been able to uncover an overall edge.

CGMBet backtesting the Spanish Primera Division

It is only when we look at the data league by league that we can find a small edge. If we check out the over 1.5 goals market in Spain’s top league, we get a 4.32% yield. This has a p-value of 2.54. This is a good set of criteria to use on this league. The sample size is still very small but as it stands we are beating the book by using skill rather than luck.

The p-value summary

Hopefully you can see how important the p-value is. It confirms any edge you think you have. It indicates the level of randomness in your results. Finding strategies with a low p-value is hard. It is not a five minute job. It typically takes lots of refinement and even binning strategies that are proving to be losers, no matter how hard you try. Our YouTube video shows more examples of working with the p-value.

Without software, finding the p-value in every market is an extremely time consuming exercise. CGMBet will give you the answers you need in double quick time. A lot of the competitors don’t have this functionality in their software so you are guessing as to whether you have a strong strategy or not. Are you prepared to take that risk?

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *