PBO: Calculate the Probability of Backtest Overfitting (PBO)

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/PBOFun.R

Description

Calculate the Probability of Backtest Overfitting as in section 11.6 of Lopez de Prado's book. It is the area of the lambda distribution to the left of 0, including 0. In other words, it is the cumulative probability that the out-of-sample relative rank of a strategy is lower (or worse) than the in-sample rank.

1
    PBO = Integral_{-Inf}^{0} p(lambda) dlambda

Usage

1
PBO(lambda)

Arguments

lambda

numeric vector, which is the relative rank logit, or lambda from CalcLambda()

Value

numeric value, which is the probability of backtest overfitting

Author(s)

Horace W. Tso horacetso@gmail.com

References

Bailey, D. H., Borwein, J., Lopez de Prado, M., & Zhu, Q. J. (2016). The probability of backtest overfitting. https://www.carma.newcastle.edu.au/jon/backtest2.pdf

Lopez de Prado (2018), Advances in Financial Machine Learning, John Wiley & Sons.

See Also

PBO::CalcLambda()

Examples

1
2
3
4
5
   M = matrix(rnorm(N*TT, mean=0.1, sd=1), ncol=N, nrow=TT)
   Ms = DivideMat(M, S)
   res <- TrainValSplit(Ms)
   res1 <- CalcLambda(res$Train, res$Val, eval.method="ave")
   (pbo = PBO(res1$lambda))

htso/PBO documentation built on Jan. 31, 2020, 4:20 p.m.