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?
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$