Sharing & Audit
Strategy Sharing Guide
Section titled “Strategy Sharing Guide”CRITERION supports sharing backtests publicly via shareable packs — a sanitized format that strips credentials and broker identifiers while preserving reproducibility and audit data.
Producing a Shareable Pack
Section titled “Producing a Shareable Pack”Prerequisites:
- A run directory with
execution_bundle.jsonandrun_manifest.json - The config file used for the run
- The bundle must pass the shareability audit (see below)
Command:
criterion share \ --bundle path/to/execution_bundle.json \ --config path/to/config.yaml \ --out my_strategyThis writes my_strategy.sharepack.json. If the bundle fails the audit, the command exits with an error and writes nothing.
What the Audit Checks
Section titled “What the Audit Checks”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.
What Gets Stripped
Section titled “What Gets Stripped”From the bundle:
submitted_orders[].broker_order_id→ replaced with"REDACTED"tracking_idretained (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
Loading and Inspecting a Pack
Section titled “Loading and Inspecting a Pack”criterion share load --pack path/to/my_strategy.sharepack.jsonPrints a summary: trade count, data period, shareability result at pack time, engine states.
Audit Without Packing
Section titled “Audit Without Packing”To check whether a bundle is shareable without creating a pack:
criterion audit --bundle path/to/execution_bundle.json [--config path/to/config.yaml]Exits 0 if all criteria pass, 1 otherwise.