# PBO algorithm "The Probability of Backtest Overfitting" paper

The Probability of Backtest Overfitting

There is also a package for R: pbo: Probability of Backtest Overfitting

The following is the result of applying the function to an example:

##       p_bo      slope       ar^2     p_loss
##  1.0000000 -0.0030456  0.9700000  1.0000000


I would like to know if I am interpreting the calculation result correctly.

p_bo - should go to zero

slope - should tend to 1

ar^2 - should tend to 1

p_loss - should go to zero

############ UPD ############

Here is a reproducible code example.

This is what I do to evaluate the profitability of my trading strategy. I would like to know how to interpret the PBO_metrics result.

library(pbo)
library(PerformanceAnalytics)

# profitability of a trading strategy
p <- cumsum(rnorm(5001)) + seq(0,200,length.out=5001)

PBO_metrics <- diff(p) |> matrix(ncol = 20) |> as.data.frame() |>
pbo(s=8,f=Omega, threshold=1) |>
summary()


..

PBO_metrics
p_bo   slope    ar^2  p_loss
0.3000  1.6049 -0.0150  0.1430


In other words, what values should an ideal non-overfitted trading strategy?

• Can you pls add enough details to your question so that it can still be understood and answered in case the links you have provided get broken or changed? Jun 10 at 22:09
• Hello, I don't know what exactly is not clear, but I tried to make my question better..
– mr.T
Jun 11 at 5:34
• Thanks. The documentation (cran.r-project.org/web/packages/pbo/pbo.pdf) is pretty sketchy, it says the output is an "object of class pbo containing list of PBO calculation results and settings". No example or interpretation, unfortunately. Next step might be to contact the author. Jun 11 at 7:23
• I wrote to the author, but he does not answer
– mr.T
Jun 15 at 11:34
• The parameters you care about have been (apart from ar, I am not sure what that is and that's not covered in paper either) in the original paper of PBO; give it a read you should be able to grasp the key idea there. Nov 22 at 17:01