Overview
run_ptl_job scrambles the price history many times, replays the strategy on each scrambled
version, and reports where the real result falls in that distribution. A high p-value means the
observed performance is not distinguishable from chance.
Two modes, chosen by mode (default "auto"):
In permutation mode the service downloads the prices it needs itself; the tickers come from the
weights chart. Runs scale with
n_permutations and can take tens of minutes.
Parameters
object
required
Test configuration. Pass
{} for the defaults: 500 permutations, seed 42, all six metrics, all
six scramblers, and a pass/fail gate at Sharpe p-value < 0.05.string
Equity-curve chart from
run_plot_job. Drives curve mode.string
Weight-dynamics chart from
run_plot_job or run_risk_job. Drives permutation mode.string
Optional OHLCV chart from
run_plot_job, as an alternative price source.string
Optional
trading_report_*.json from run_trading_job. Used only to reconcile this tool’s
metrics against the backtest; it never replaces the equity series.Passing a
data_extractor_*.json link is temporarily unsupported — it is ignored, and the prices
are downloaded anyway. Supply the charts listed above instead.Returns
observed_metrics, the per-scrambler ladder with p-values and confidence
intervals, return and drawdown bounds, a skipped list explaining which requested tests did not run
and why, and metric_reconciliation when vectorbt_url was supplied. Read the skipped list before
reporting a verdict — a test that never ran is not a test that passed.
Example — quick curve check
Example — permutation test
Next Step
The result is a verdict, not an input: nothing downstream reads aptl_engine_ file. A weak
p-value is a reason to go back to run_po_job and
run_trading_job and test a changed strategy — not to rerun the same one
until it passes.