pbo: Probability of backtest overfitting

View source: R/pbo.R

pboR Documentation

Probability of backtest overfitting

Description

Performs the probability of backtest overfitting computations.

Usage

pbo(m, s = 4, f = NA, threshold = 0, inf_sub = 6, allow_parallel = FALSE)

Arguments

m

a TxN data frame of returns, where T is the samples per study and N is the number of studies.

s

the number of subsets of m for CSCV combinations; must evenly divide m

f

the function to evaluate a study's performance; required

threshold

the performance metric threshold (e.g. 0 for Sharpe, 1 for Omega)

inf_sub

infinity substitution value for reasonable plotting

allow_parallel

whether to enable parallel processing, default FALSE

Details

This function performs the probability of backtest overfitting calculation using a combinatorially-symmetric cross validation (CSCV) approach.

Value

object of class pbo containing list of PBO calculation results and settings

References

Baily et al., "The Probability of Backtest Overfitting," https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2326253

Examples

## Not run: 
require(pbo)
require(PerformanceAnalytics)
n <- 100
t <- 1000
s <- 8
m <- data.frame(matrix(rnorm(n*t,mean=0,sd=1),
  nrow=t,ncol=n,byrow=TRUE,
  dimnames=list(1:t,1:n)),
  check.names=FALSE)
p <- pbo(m,s,f=Omega,threshold=1)

## End(Not run)

pbo documentation built on May 28, 2022, 1:06 a.m.