3
$\begingroup$

In this article by Lopez de Prado et al., an algorithm was proposed for assessing the overfit of a trading strategy:

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)
plot(p,t="l",main="profitability of a trading strategy")

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?

$\endgroup$
5
  • $\begingroup$ 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? $\endgroup$
    – Alper
    Jun 10, 2023 at 22:09
  • 2
    $\begingroup$ Hello, I don't know what exactly is not clear, but I tried to make my question better.. $\endgroup$
    – mr.T
    Jun 11, 2023 at 5:34
  • $\begingroup$ 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. $\endgroup$
    – nbbo2
    Jun 11, 2023 at 7:23
  • $\begingroup$ I wrote to the author, but he does not answer $\endgroup$
    – mr.T
    Jun 15, 2023 at 11:34
  • $\begingroup$ 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. $\endgroup$
    – stucash
    Nov 22, 2023 at 17:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.