Skip to contents

ledgr_pbo() computes a native Probability of Backtest Overfitting (PBO) diagnostic using Combinatorially Symmetric Cross Validation (CSCV) over a return panel. It is an evidence surface only: it does not select, promote, filter, or change walk-forward identity.

Usage

ledgr_pbo(
  x,
  candidates = NULL,
  S = 4L,
  metric = NULL,
  metric_name = NULL,
  threshold = 0
)

Arguments

x

A ledgr_return_panel object or a ledgr_sweep_results object with retained completed returns.

candidates

Optional character vector of candidate ids to include.

S

Even positive number of contiguous CSCV subsets. S must divide the post-first-row return count.

metric

Optional function that receives a numeric returns matrix and returns one finite numeric score per candidate column. Higher scores are treated as better. When NULL, mean period return is used.

metric_name

Optional character scalar naming the metric in result metadata.

threshold

Numeric logit threshold. PBO is the fraction of CSCV cases with lambda <= threshold.

Value

A ledgr_pbo object with summary, cases, degradation, and metadata tables/lists. Use as_tibble(x), as_tibble(x, what = "cases"), or as_tibble(x, what = "degradation") for programmatic access.

See also

vignette("selection-integrity", package = "ledgr") or system.file("doc", "selection-integrity.html", package = "ledgr").

Examples

if (FALSE) { # \dontrun{
pbo <- ledgr_pbo(sweep, S = 4)
as_tibble(pbo)
as_tibble(pbo, what = "cases")
} # }