verify_execution
Verify a claimed Sharpe ratio by re-deriving P&L from positions and committed asset returns, recomputing the Sharpe, and checking it matches—with results bound to a data hash.
Instructions
VERIFIABLE EXECUTION — instead of trusting a reported Sharpe, numguard RE-DERIVES it: it reconstructs the P&L from your positions applied to the committed asset returns (r_t = pos_{t-1}·assetret_t − costs), recomputes the Sharpe from that, and checks it matches what you claimed — catching a number that these decisions on this data do not actually produce. Binds the result to a data hash, and composes a Deflated Sharpe on the re-derived series. HONEST SCOPE: proves the number is reconstructible from decisions-on- committed-data, NOT that the data is the real market (pass canonical_hash to assert that) or that the positions weren't overfit (that's Deflated Sharpe / PBO). It does not run your strategy code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | Yes | Your metering key — any stable string identifying you; it tracks your free-tier calls and prepaid credit balance. | |
| cost_bps | No | Round-trip cost in bps applied to turnover. | |
| n_trials | No | How many strategies/params were tried (for the composed DSR). | |
| positions | Yes | The strategy's per-period position/signal series (the decisions). | |
| asset_returns | Yes | The aligned underlying-asset per-period returns (the market data the result is bound to). | |
| canonical_hash | No | Optional SHA-256 of a canonical public data source; if given, the committed data must match it or it's rejected. | |
| reported_sharpe | No | The Sharpe the operator claims — checked against the re-derived one. | |
| periods_per_year | No | Periods per year (252 daily). |