PyneCore can now test whether a backtest result is luck

A good backtest can come from a real edge or from a lucky run of trades. PyneCore has a new command for telling the two apart. It runs a strategy once, measures every closed trade against the risk it took at entry, and runs statistical tests on those results.

It resamples the trades, 10,000 times by default, to show the range of outcomes the same trades could have produced in a different order, and how often an account risking a fixed share per trade would have hit a ruin level or a target. It shows how much extra cost per trade the result can absorb and how it splits across years, months and weekdays. The coin-flip test is the most direct one. The strategy keeps its entries and a coin decides whether each goes long or short; in a second variant the same trades enter at random moments. If the real result does not stand out from the coin-flip runs, the signals did not make the money.

The results come out as CSV files that open in a spreadsheet or a notebook, and the same analysis is available from Python. It can also read the trade list of an earlier run instead of running the backtest again.

This website uses cookies and similar technologies. By continuing to use the site, you accept this. Details in our Privacy Policy.