For accurate backtesting, one needs to define his/her historical universe. Suppose I want to trade small and micro cap stocks only, so that I define my universe below a certain market cap limit. For accurate backtesting, I would need either historical market caps, or historical components of a certain small cap index that would do the job for me. I suppose such data is not commonly included in historical price packages. So even when I have data without survivorship bias (i.e. including delisted stocks), I wouldn't know how to filter the stocks that I would've actually traded historically. I wonder how others deal with this problem? Taking current market caps (effectively introducing huge biases)? Somehow constructing a proxy for historical market cap? I was surprised to find little discussion on this topic.