@general-liquidity/sharpebench 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -42,7 +42,7 @@ console.log(greeks({ spot: 100, strike: 100, t_years: 1, rate: 0.05, vol: 0.2, i
42
42
  | `scoreAllocation(trajectory, policy?)` | `AllocationReport`, weight-vector validity plus L1 turnover |
43
43
  | `greeks(params)` | `GreeksResult`, Black-Scholes price, Greeks, and local exposure flags |
44
44
  | `canary(seed)` | `Canary`, a do-not-train contamination tripwire |
45
- | `isMySharpeReal(returns, opts)` | One-series deflation, PSR, haircut, MinTRL, and verdict. `trialsSrStd` is annualized; `periodsPerYear` (default 252) says what a period is |
45
+ | `isMySharpeReal(returns, opts)` | One-series deflation, PSR, haircut, MinTRL, and verdict. `trialsSrStd` and `srBenchmark` are annualized; `periodsPerYear` (default 252) says what a period is and converts both |
46
46
  | `isMySharpeRealFull(field, winner, opts)` | Fieldwise Reality Check, SPA, step-down, PBO and HLZ diagnostics alongside the one-series verdict |
47
47
  | `percentileSelection(candidates, opts?)` | Point winner versus bootstrap-percentile winner and optimism gaps |
48
48
  | `decomposeUncertainty(input)` | Aleatoric, epistemic, and distributional diagnostic legs |
package/dist/index.js CHANGED
@@ -133,12 +133,20 @@ function honestyConfigJson(opts) {
133
133
  }
134
134
  cfg.periods_per_year = opts.periodsPerYear;
135
135
  }
136
- if (opts.confidence !== undefined)
137
- cfg.confidence = opts.confidence;
138
- if (opts.borderline !== undefined)
139
- cfg.borderline = opts.borderline;
140
- if (opts.srBenchmark !== undefined)
141
- cfg.sr_benchmark = opts.srBenchmark;
136
+ // The same JSON hazard applies to the thresholds and the benchmark: a NaN or
137
+ // infinity would reach the kernel as null and silently become its default.
138
+ for (const [name, key, value] of [
139
+ ["confidence", "confidence", opts.confidence],
140
+ ["borderline", "borderline", opts.borderline],
141
+ ["srBenchmark", "sr_benchmark", opts.srBenchmark],
142
+ ]) {
143
+ if (value === undefined)
144
+ continue;
145
+ if (typeof value !== "number" || !Number.isFinite(value)) {
146
+ throw new RangeError(`${name} must be a finite number (omit it for the default)`);
147
+ }
148
+ cfg[key] = value;
149
+ }
142
150
  return JSON.stringify(cfg);
143
151
  }
144
152
  /** Map the kernel's snake_case HonestyVerdict JSON → the camelCase {@link HonestyVerdict}. */
package/dist/types.d.ts CHANGED
@@ -172,7 +172,11 @@ export interface HonestyOpts {
172
172
  confidence?: number;
173
173
  /** Deflated-Sharpe threshold for Borderline. Default 0.90. */
174
174
  borderline?: number;
175
- /** **Per-period** PSR / MinTRL benchmark Sharpe to beat (not converted). Default 0.0. */
175
+ /**
176
+ * **Annualized** PSR / MinTRL benchmark Sharpe to beat, divided by
177
+ * `sqrt(periodsPerYear)` before use, like `trialsSrStd`. Default 0.0, which is
178
+ * zero in every unit. Until the release after 0.21.0 it was read per period.
179
+ */
176
180
  srBenchmark?: number;
177
181
  }
178
182
  /** The LITE verdict. Nonfinite numeric diagnostics serialize as null, not zero. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@general-liquidity/sharpebench",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "description": "Luck-robust quantitative evaluation for trading agents: deflated Sharpe, pass^k reliability, process discipline, and risk gates, backed by the identical Rust kernel compiled to WebAssembly.",
5
5
  "keywords": [
6
6
  "trading",
package/pkg/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sharpebench-wasm",
3
3
  "description": "WASM bindings for SharpeBench's deterministic, luck-robust trading-agent scoring kernel.",
4
- "version": "0.21.0",
4
+ "version": "0.23.0",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
Binary file