Skip to main content

Module tail

Module tail 

Source
Expand description

Tail analysis: the bit institutional users actually care about. Behind the tail Cargo feature (on by default).

Functions§

conditional_tail_expectation
Conditional tail expectation: the mean of all samples ABOVE the given quantile. Also known as expected shortfall (ES) or conditional value-at-risk (CVaR). For latency: “given that we’re in the worst N% of cases, what does that average look like?”
hill_tail_index
Hill estimator for the tail index. Higher values mean a heavier tail (more frequent extreme outliers). Uses the top k order statistics. Returns None if k < 2 or fewer than k+1 samples.
tail_fatness_ratio
Ratio of p99 over p50. Quick “how fat is the tail” indicator: 1.0 means uniform, 10+ means a meaningful tail. Returns 0 when p50 is 0.