Market makers or liquidity providers play a central role for the operation of the stock markets. In general, these agents execute contrarian strategies so that their profitability depends on the distribution of stock returns across the market. The more widespread the distribution is, the more arbitrage opportunities are available. This implies that the collective correlation of stocks is an indicator for the possible turmoil in the market. This paper proposes a novel approach to measure the collective correlation of stock market with the network as a tool for extracting information. The market network can be easily constructed by digitizing pairwise correlations. While the number of stocks becomes very large, the network can be approximated by an exponential random graph model under which the clustering coefficient of the market network is a natural candidate for measuring the collective correlation of the stock market. With a sample of S&P 500 components in the period from January 1996 to August 2009, we show that clustering coefficient can be used as alternative risk measure in addition to volatility. Furthermore, investigations on higher order statistics also reveal the distinctions on the clustering effect between bear markets and bull markets.