1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # sharpebench-stats — deterministic backtest-honesty statistics
//!
//! The pure statistics core extracted from `sharpebench-core`: moment and normal
//! primitives ([`stats`]), the deflated / probabilistic Sharpe family
//! ([`deflated_sharpe`]), the data-snooping bootstrap family — White's Reality
//! Check, Hansen's SPA, and Romano-Wolf step-down ([`significance`]) — and
//! selection-axis luck control ([`selection`]).
//!
//! Design invariants carried over verbatim from the original modules:
//! - **Pure.** No I/O, no system clock, no ambient randomness. Any randomness
//! (the significance bootstrap) takes an explicit seed argument.
//! - **Deterministic.** Plain `f64` math, fixed reduction order, no parallel
//! float sums. The same input yields byte-identical output on any platform.
//! - **No `unsafe`.**
//!
//! ## Example: is this Sharpe real?
//!
//! ```
//! use sharpebench_stats::{deflated_sharpe_ratio, probabilistic_sharpe_ratio, sharpe_ratio};
//!
//! // A per-period (NOT annualized) excess-return series.
//! let returns = [0.012, -0.004, 0.009, 0.011, -0.002, 0.008, 0.010, -0.001];
//!
//! let sr = sharpe_ratio(&returns); // observed, per-period
//! let psr = probabilistic_sharpe_ratio(&returns, 0.0); // P(true Sharpe > 0)
//! // Deflate for the 200 strategies tried, with ~0.5 cross-trial Sharpe dispersion:
//! let dsr = deflated_sharpe_ratio(&returns, 200, 0.5); // P(skill survives the search)
//!
//! assert!(sr > 0.0);
//! assert!((0.0..=1.0).contains(&psr));
//! assert!((0.0..=1.0).contains(&dsr));
//! assert!(dsr <= psr); // deflating for the search never raises the probability
//! ```
pub use ;
pub use ;
pub use ;
pub use ;