Backtest P-Value: Ask AI Whether Your Result Is Luck

A good-looking equity curve proves less than most traders think. A backtest p-value tells you how often random entries would have done just as well. Low numbers suggest an edge. High numbers suggest you got lucky.

You no longer need a statistics package to get one. A connected AI assistant can run the test, read the result and explain it in plain English. The hard part is asking the right question and reading the answer honestly.

This guide covers the practical side: what to ask, what comes back, and the follow-ups that matter. For the theory behind p-values and trade counts, read our backtest statistical significance guide.

What Is a Backtest P-Value?

A backtest p-value is the probability that a strategy with no real edge would match your result by chance. A p-value of 0.03 means random signals would do as well about 3 times in 100. A p-value of 0.40 means 40 times in 100.

The usual cut-off is 0.05. Below it, the result is unlikely to be pure luck. Above it, you cannot tell your signals apart from noise.

Investopedia’s p-value explainer covers the general idea. In trading, the “chance” being tested is usually random timing.

How the Permutation Approach Works

Arrow Algo’s p-value audit uses a permutation test. It takes the entries from your completed backtest. It measures what price did after each one, over several time horizons.

Then it shuffles the entry times at random across the same period. It repeats that thousands of times, 5,000 by default. The p-value is the share of shuffles that did as well as your real entries.

This is the same logic as our random entry test. The difference is that the AI runs it for you in one request.

Why Asking AI Changes the Workflow

Before, checking significance meant exporting trades and building a spreadsheet. Most traders skipped it. The strategy went live on the strength of a nice chart.

With a connected assistant, the check takes one sentence. That makes it realistic to run on every strategy, not just the ones you are about to deploy.

It also makes the follow-up easy. You can ask the AI to split the result by pair, by side or by date. Each split is another sentence, not another spreadsheet.

What Should You Ask the AI?

Be specific. A vague request gets a vague answer. Include four things in your prompt:

  1. The backtest. Name the strategy and the completed backtest you want audited.
  2. The out-of-sample date. Give the date you stopped changing settings. The audit can test the later period separately.
  3. The variant count. Say how many versions you tried before this one.
  4. The reading you want. Ask for the p-value at each horizon, the sample size and any warnings.

A good prompt reads like this: “Run the p-value audit on my latest ETH four-hour backtest. Treat everything after 1 June as out-of-sample. I tested 12 versions before this one. Show me the p-value per horizon, the number of entries, and any small-sample warning.”

How Do You Read the Answer?

The audit returns a p-value for each horizon. It also reports how closely your signals line up with what price did next. A warning appears if the sample is too small to trust. Finally, it gives a plain recommendation on whether the strategy is ready.

A Worked Reading

Here is an illustrative result. The numbers are made up to show the reading. They are not a real audit.

HorizonP-value
4 candles0.31
12 candles0.04
24 candles0.02

The audit used 46 entries and flagged a small-sample warning.

The short horizon looks like noise. The longer ones clear 0.05. That suggests the signal works over days, not hours. It also suggests the exit timing should match.

But the sample warning matters more than any single number. Forty-six entries is not much evidence. The right move is to extend the backtest or add pairs, then audit again.

Correct for the Variants You Tried

You tried 12 versions before this one, so 13 in total. Divide the 0.05 cut-off by 13, which gives about 0.004. Neither 0.04 nor 0.02 clears that bar.

That does not mean the strategy is worthless. It means the evidence is not yet strong enough. The deflated Sharpe ratio applies the same thinking to returns.

Which Follow-Up Questions Matter?

The first answer is a starting point. These follow-ups often tell you more:

Where AI Answers Can Mislead

The AI explains the numbers fluently. Fluency is not proof. Always check that the sample size and dates match what you asked for.

Also watch for drift in your own questions. Re-running the audit after every small tweak quietly adds variants. Count every run.

Finally, remember what the test covers. It measures price movement after your entries. It does not include fees, exits or stops. A significant entry signal can still lose money after costs.

How to Apply the Backtest P-Value in Arrow Algo

Build your strategy with Arrow Algo’s drag-and-drop visual blocks. Set realistic fees and run a backtest on the exchange’s own historical data.

Then connect an AI assistant through Arrow Algo’s MCP connection. Claude, ChatGPT and Grok can all connect this way. Ask it to run the p-value audit on your completed backtest, using the prompt structure above.

Keep a simple log beside each strategy. Record the variant count, the out-of-sample date and each p-value. That log stops you from fooling yourself later.

Deployment is always your decision. If you deploy, your rules signal your own exchange account, and the exchange executes.

What Are the Key Takeaways?

Disclaimer: This content is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results. Always conduct your own research before making any trading decisions.

Ready to build your own automated trading strategies without writing a single line of code? Start for free at Arrow Algo and join thousands of traders who've made the switch to systematic trading.