Market Cap to GDP is a long-term valuation indicator for stocks. It has become popular in recent years, thanks to Warren Buffett. Back in 2001 he remarked in a Fortune Magazine interview that "it is probably the best single measure of where valuations stand at any given moment." The Wilshire 5000 Index is widely accepted as the definitive benchmark for the U.S. equity market, and is intended to measure the performance of most publicly traded companies headquartered in the United States, with readily available price data.
The original measure for 'market cap' is 'Market Value of Equities Outstanding'. It has the disadvantage of merely being published quarterly. Therefore, it is always lagging a bit behind. On the upside, it has data going back to the 1940s, thereby providing more historical perspective. Including this data leads to a lower mean average.
In contrast to the Wilshire 5000, the Dow Jones only contains 30 publicly traded companies. Therefore, it is not as accurate as the Wilshire 5000 for measuring the entire market capitalization. However, all these ratios look very much the same - and since the Dow Jones is one of the oldest indexes, this ratio goes back to 1896.
For comparison purposes the S&P 500 to GDP ratio is shown here as well. The S&P 500 consists of 500 large US companies and it is a capitalization-weighted Index. It captures approximately 80% of available market capitalization. Therefore it's a much better measure for 'market cap' than the Dow Jones - however, the two charts look very similar.
As mentioned above, the S&P 500 captures approximately 80% of available market capitalization. Therefore it is quite representative of the entire stock market. Intuitively the Stock market and the GDP should grow with a similar pace.