I am backtesting a trading strategy on historical US stock data. I'm currently sourcing data from S&P's Capital IQ. I have no trouble getting stock price data for a specific company. I also have no trouble getting a list of companies currently traded on major US exchanges (which I am defining as NYSE, Nasdaq, or AMEX).
However, to avoid survivorship bias, I would like to know what companies have been delisted from these exchanges. Basically, I want a list of all the companies which have ever traded on these exchanges over the past 20-30 years and the dates which they traded there. (Ideally this should include CUSIP or some other universal identifier so that I can match up the stock data to other financial data from Capital IQ.)
Capital IQ does tell me for some delisted companies what exchange they traded on, but in many cases, when a company is delisted, it moves to being traded over-the-counter (as Enron and the original General Motors did before going bankrupt). Filtering by exchange here is not helpful as it will filter out the companies which moved to over-the-counter.
Is there anywhere I can get an accurate universe of stocks for survivorship bias-free backtesting? I'm aware that this will likely cost money, which I'm fine with, but I have so far been unable to find any database with this information.