mrbcuda / pbo Goto Github PK
View Code? Open in Web Editor NEWProbability of Backtest Overfitting
License: Other
Probability of Backtest Overfitting
License: Other
The example on the main page does not work, there are errors in the code
require(pbo)
require(lattice) # for plots
require(PerformanceAnalytics) # for Omega ratio
N <- 200 # studies, alternative configurations
T <- 3200 # sample returns
S <- 8 # partition count
# load the matrix with samples for N alternatives
M <- data.frame(matrix(NA,T,N,byrow=TRUE,dimnames=list(1:T,1:N)),check.names=FALSE)
for ( i in 1:N ) M[,i] <- rt(T,10) / 100
# compute and plot
my_pbo <- pbo(M,S,F=Omega,threshold=1)
summary(my_pbo)
histogram(my_pbo)
dotplot(my_pbo,pch=15,col=2,cex=1.5)
xyplot(my_pbo,plotType="cscv",cex=0.8,show_rug=FALSE,osr_threshold=100)
xyplot(my_pbo,plotType="degradation")
xyplot(my_pbo,plotType="dominance",lwd=2)
xyplot(my_pbo,plotType="pairs",cex=1.1,osr_threshold=75)
xyplot(my_pbo,plotType="ranks",pch=16,cex=1.2)
xyplot(my_pbo,plotType="selection",sel_threshold=100,cex=1.2)
I have been trying to verify the correctness of the PBO algorithm. I compared the results with the python implement of PBO and found that they yield different results. I also looked into a recent article by Francesco Landolfi on Medium/LinkedIn that contains a Python script for PBO, but it also produces different results. Is there any way to verify which implementation is correct? Here are the links to the implementations for reference:
checking dependencies in R code ... NOTE
'library' or 'require' call to ‘foreach’ in package code.
Please use :: or requireNamespace() instead.
See section 'Suggested packages' in the 'Writing R Extensions' manual.
checking R code for possible problems ... NOTE
pbo: no visible global function definition for ‘%dopar%’
pbo: no visible global function definition for ‘foreach’
xyplot.pbo: no visible global function definition for ‘doubleYScale’
Provide optional progress reporting for the CSCV iterations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.