Estimate probability of backtest overfitting, as described
in Bailey et al. 2017
Usage
PBO(M, s = 12, fun = colMeans,
threshold = 0, ..., loop.fun = TRUE)
Value
A list:
pbo
probability
lambda
vector of logits
in.sample
numeric
out.of.sample
numeric
Arguments
M
a numeric matrix
s
number of submatrices
fun
a function
threshold
a scalar
...
additional arguments passed to fun
loop.fun
logical: if TRUE, fun is called separately
for every column of M; if FALSE,
fun will be passed the whole matrix M
Author
Enrico Schumann
Details
fun is called with M as its first argument.
References
Bailey, D. H. et al. (2017).
The probability of backtest overfitting. Journal of Computational Finance
20 (4), 39--69. tools:::Rd_expr_doi("10.21314/JCF.2016.322")
# \donttest{## might run a few secondsN <- 5000
T <- 480
M <- array(rnorm(N*T, sd = 0.01), dim = c(T, N))
p <- PBO(M, s = 12, fun = colMeans, loop.fun = FALSE)
str(p)
# }