Skip to content

Sharing & Audit

CRITERION supports sharing backtests publicly via shareable packs — a sanitized format that strips credentials and broker identifiers while preserving reproducibility and audit data.

Prerequisites:

  • A run directory with execution_bundle.json and run_manifest.json
  • The config file used for the run
  • The bundle must pass the shareability audit (see below)

Command:

Terminal window
criterion share \
--bundle path/to/execution_bundle.json \
--config path/to/config.yaml \
--out my_strategy

This writes my_strategy.sharepack.json. If the bundle fails the audit, the command exits with an error and writes nothing.

The shareability audit (run automatically before packing) requires:

  • Data period recorded
  • Minimum trading days (parameters × 252)
  • Minimum trades (parameters × 10)
  • All trades have rule provenance
  • Evaluation log present (non-empty)
  • No credentials (broker_order_id absent or redacted)

If any criterion fails, packing is blocked. There is no --force override.

From the bundle:

  • submitted_orders[].broker_order_id → replaced with "REDACTED"
  • tracking_id retained (internal, no broker linkage)

From the config:

  • Only the strategy engine excerpt is included: expansion, reversion, continuation, risk, overfitting_safeguards
  • Broker, live data, data source credentials, and cache paths are structurally excluded — they cannot appear in the excerpt
Terminal window
criterion share load --pack path/to/my_strategy.sharepack.json

Prints a summary: trade count, data period, shareability result at pack time, engine states.

To check whether a bundle is shareable without creating a pack:

Terminal window
criterion audit --bundle path/to/execution_bundle.json [--config path/to/config.yaml]

Exits 0 if all criteria pass, 1 otherwise.