Gainium Logo

In our latest update to the backtester, we've introduced an innovative feature designed to gauge the effectiveness of your trading strategy against randomness. This article will walk you through this new functionality and explain how it can benefit your trading approach.

Purpose of the Random Trade Comparison Test

The new test incorporated into the backtester helps determine the presence of a trading edge in your trading strategy by comparing your strategy's mean return to that of random trades over the same period. This is conducted through a T-test, a type of inferential statistic used to determine if there is a significant difference between the means of two groups, which are your strategy's trades and random trades. A T-test value close to 0 indicates that the strategy's performance is likely not different from random, casting doubt on its effectiveness.

How does the test work?

To provide a robust comparison of your strategy vs random trades, we simulate 300 random trades within the backtest period. Each trade is projected 100 bars into the future. For example, in a 5-minute timeframe, a random trade would be automatically closed 500 minutes after opening. This approach ensures that the random trades represent varied market conditions throughout the backtested timeframe.

A scatterplot is generated to illustrate the performance clearly. This plot places returns on the Y-axis against the trade number on the X-axis. All strategy trades are plotted first, appearing on the left side, followed by the random trades on the right. This visual representation allows you to quickly discern the distribution and variance of returns for both sets of trades.

Interpreting the T-test and Mean Returns

With the scatterplot in place, we calculate the mean return for the strategy trades and the random trades. These figures are then compared using a T-test to obtain the T-value. The closer this value is to 0, the stronger the indication that the strategy’s returns are statistically indistinguishable from random trades, suggesting no inherent trading edge.

Low T-value
High T-value

The Role of Random as a Benchmark

It’s essential to understand that the random trade benchmark is not about competition; it's about validation. Outperforming the random trades return is a positive indicator, but it isn't the sole measure of a strategy's validity. For instance, a long-only strategy tested during a market upswing might underperform compared to random trades during that period. Therefore, the purpose of this test is to challenge and reject the hypothesis that your strategy's performance is purely a product of chance.


We hope this guide helps you maximize the backtester’s new capabilities. For further assistance or questions, don't hesitate to contact our supportive community or customer service team. Happy trading!

Skyrocket your profits with the most advanced trading bots in the market

Gainium logo

Gainium - Empower Your Crypto Trading: Research, Deploy, Analyze | Product Hunt

Gainium Pte. Ltd.
68 Circular Rd. #02-01 Singapore (049422)


All rights reserved. Copyright © 2024.

Gainium is a publisher of financial information, not an investment adviser. We do not provide personalized or individualized investment advice. Cryptocurrencies are volatile investments and carry significant risk including the risk of permanent and total loss. Past performance is not indicative of future results. Figures and charts are correct at the time of writing or as otherwise specified. Live-tested strategies are not recommendations. Consult your financial adviser before making financial decisions.