Others have already suggested that a practical
way is to use the composition of a suitable index for
your investment universe (to be really safe, the index
should have been live at the relevant point in history).
Let me add two remarks.
First, the bias you describe is often large. It is
studied for US stocks in this paper:
@ARTICLE{Daniel2009,
author = {Gilles Daniel and Didier Sornette and Peter W{\"o}hrmann},
title = {Look-Ahead Benchmark Bias in Portfolio Performance Evaluation},
year = 2009,
volume = 36,
number = 1,
journal = {Journal of Portfolio Management},
pages = {121--130}
}
And the authors find that the bias is up to 8% p.a. We
looked at this bias for German stocks in Risk-Reward
Ratio Optimisation (Revisited), and we found it to
be of similar magnitude (about 7% p.a.).
Second, on fixing an absolute size threshold. Better
would be to link this threshold to a quantile of market
cap. For instance, for US equities Kenneth French
publishes percentiles of market cap for NYSE
stocks. The following plot shows the evolution of those
percentiles.

Your 10bn (shown as the horizontal line)
would be around the 75th percentile right now. But if
you went back to the 1990s, you wouldn't have too many
stocks then. At the start of 1999, for instance, the 75th
percentile would have been rather about 3bn or so.
Here would be the R code to reproduce the figure.
library("NMOF")
library("zoo")
bp <- French(dest.dir = "~/Downloads/French",
dataset = "ME_Breakpoints_CSV.zip")
## make zoo series; scale to millions USD
bp <- zoo(bp[, -c(1, ncol(bp))]/1000000, as.Date(row.names(bp)))
par(mar = c(2,5,1,2), , mgp = c(3.5,0.5,0),
las = 1, bty = "n", tck = 0.01)
plot(bp,
plot.type = "single",
log = "y",
col = hcl.colors(30, palette = "Grays"),
ylab = "Market cap in millions USD",
xaxt = "n",
yaxt = "n")
mtext(text = colnames(bp),
side = 4, at = coredata(tail(bp,1)),
line = -0.7, cex = 0.7)
years <- seq(as.Date("1920-1-1"), as.Date("2020-1-1"), by = "20 year")
bn10 <- 10000000000/1000000
axis(1, at = years, labels = format(years, "%Y"))
axis(2, at = c(axTicks(2), bn10))
abline(h = bn10)