Quant Invest System

Methodology

We ask one question: given the number of trades, could this result be luck? The rules below are fixed in code and recorded in every report, so a report can be recomputed from the same file.

The unit of evidence is a trade

Each closed trade is one bet. We measure its return on the capital it risked, after costs. Daily equity returns are reported too, but they do not decide the verdict, because a strategy that trades twice a month produces mostly zero days and would look more certain than it is.

Is it more than chance?

We compute the probabilistic Sharpe ratio of the per-trade returns (Bailey and López de Prado, 2012). It is the probability that the true Sharpe ratio is above zero, given the number of trades and the skewness and fat tails of their returns.

  • A result counts as an edge when that probability is at least 0.95.
  • That is the same as having at least the minimum track record length: the number of trades this result needs before it can be told apart from chance. If you have fewer, the verdict is Sample too small, and the report says roughly how many would be needed. You can compute both for your own trades with the PSR calculator.
  • Below 30 trades we do not judge at all.
  • The report states the benchmark (a Sharpe ratio of zero per trade), the observed Sharpe ratio per trade, and your number of trades next to the number needed.

A period the strategy never saw

In a Pro Backtest, the last 20% of the test window is held out. The verdict needs the average trade in that period not to be significantly worse than in the first 80%, at a 5% significance level, with at least 5 trades in the held-out period. This is a check that the result did not fall apart, not a second test of significance.

Such a check can only see a large drop when the held-out period is short or the trades vary a lot. The report therefore shows the smallest drop the check could detect with 80% power. The held-out period supports the verdict only when it has at least 30 trades and the check could detect the average trade falling to zero. Otherwise the report calls it indicative and says so in the verdict, and it warns when the held-out average trade is not positive.

A Quick Backtest tests the whole window, so its verdict has no such check. A Report Audit has no held-out period: you ran the test, so we cannot know what was fitted on which data.

Drawdown in a different order

The same trades in a different order give a different drawdown. We reshuffle them 2,000 times and report the median, the 95th and 99th percentiles, and the share of paths that lose more than 35% from a peak. When trades look dependent, we reshuffle blocks of trades instead of single trades, so the dependence is kept. Two tests decide this: a runs test on the order of wins and losses (|Z| above 2), and a Ljung–Box test on the size of trade returns and on their absolute size, which catches calm and volatile spells that a win/loss sequence cannot show (5% in total, split between the two). The result describes the risk of an unlucky order of these trades, not of different future trades.

What else the report shows

  • Win rate, profit factor and average trade separately for long and short trades.
  • For each year: trades, net profit, win rate, profit factor and the largest drawdown within the year.
  • The result month by month, and how long the account stayed below a previous peak: the longest such period, the share of days under water and the drawdown at the end.
  • Costs labelled by their source: observed in your report for a Report Audit, assumed by our test model for a Python backtest, charged by the tester as spread for an MQL5 backtest.
  • The trade statistics you know from the MetaTrader 5 report: gross profit and loss, largest and average win and loss, payoff ratio, winning and losing runs, holding times and drawdown in money, computed from your trade list.
  • The test settings and a warning when the test stopped well before the end of the period you set. If you also send the tester log, we check how much of the test really ran on real ticks and where the broker history ends.

Several positions at once

Grid, martingale and other systems that hold several positions at once break the assumption that trades are roughly independent. For them the verdict is Inconclusive (multi-position): the report shows the risk, not an edge.

Costs and data

  • Backtests of MQL5 code run in the MetaTrader 5 strategy tester on one-minute OHLC bars, not real ticks. The report states the modelling read from the tester log, or says that it could not be confirmed. The tester charges the spread of each one-minute bar: the spread column of your file, or our cost model (spread, commission and slippage together) where the file has none. The report adds up that spread trade by trade.
  • Python strategies run on our own engine with costs per asset class (spread, slippage, commission and swap) that the report lists. They are market estimates, not the rates of a particular broker.
  • A Pro Backtest repeats the result with all costs multiplied by 1.5 and by 2. For Python the engine runs the test again; for MQL5 the extra cost is added to the trades from the test, because the strategy tester is not run again.
  • A Report Audit uses only what your report contains.

Everything is recorded

Every report carries the SHA-256 of your file, the versions of the engine, the metrics and the parser, the test parameters, the MetaTrader 5 build when the report or tester log states it, the versions of Python and its numerical libraries, and for our backtests the fingerprint of the symbol specification. The report ID can be checked on the verification page.

What we do not do yet

Walk-forward optimisation, real tick data, portfolio tests and costs calibrated to your broker are not part of any package today. We will add them to this page only when they work.

The same rules apply to us

Our own strategies go through the same statistical stage, then a check that the MetaTrader 5 code matches the model trade for trade, then a month of paper trading reconciled against the model. The research log shows how many have got through each stage.