YAHOO [BRIEFING.COM]: Despite a lack of leadership, stocks were able to log modest gains following upbeat earnings announcements from Goldman Sachs and Johnson & Johnson and a mixed batch of economic data.

Goldman Sachs (GS 149.66, +0.22) unveiled earnings of $4.93 per share for the second quarter. Excluding a one-time preferred dividend, diluted earnings came in at $5.71 per share. The consensus was pegged at $3.54 per share. The better-than-expected results were helped by improvements in Goldman's fixed income, currency, and commodities segment, which generated record quarterly net revenues, and the trading and principal investments segment, which saw net revenue nearly double year-over-year.

Though Goldman's results were impressive, many had expected the company to top the consensus earnings estimate. Despite the firm's best-in-class status, many also question the sustainability of earnings from its trading and investments division.

The financial sector lagged for the entire session after showing leadership the day before. Financials closed 0.3% lower. Telecom (-0.7%) was the only other major sector to post a loss.

Pharmaceutical and health care products giant Johnson & Johnson (JNJ 58.23, +0.51) reported today better-than-expected earnings of its own by bringing in $1.15 per share. However, the Dow component didn't provide much leadership. Health care stocks advanced 0.4%.

Some health care stocks were weighed down by news that House Democrats proposed a bill to expand health benefits in a plan that includes a public health plan option to compete against private insurers. Managed care providers fell 0.8%.

Technology stocks, which collectively carry the heaviest market weight in the S&P 500, made a modest 0.3% gain. Dell (DELL 11.97, -1.05) weighed on things by stating it expects gross margins to decrease even though it expects revenue to make a slight sequential increase. Oracle (ORCL 20.63, -0.09) still expects its acquisition of Sun Microsystems (JAVA 9.17, +0.01) to be accretive to its adjusted earnings even though Sun believes fourth quarter losses could range from $0.16 to $0.06 per share, which would be worse than the loss of $0.01 per share that analysts currently expect.

Semiconductor stocks showed strength ahead of the latest earnings announcement from Intel (INTC 16.83, +0.34). The Philadelphia Semiconductor Index climbed 1.6%.

By climbing 1.5%, consumer discretionary stocks logged the best gains of any major sector. Their strength was owed to retailers, which climbed 1.6% in the face of mixed retail sales data.

Higher gasoline and auto purchases helped retail sales for June increase 0.6%, which was more than expected. However, when excluding autos, sales increased just 0.3%, which was less than expected.

In other economic news, the June Producer Price Index increased 1.8%. That was twice the increase that had been expected and was the sharpest jump since late 2007. Core PPI also increased more than expected by coming in with a 0.5% increase, which is the biggest jump since late 2008. The latest consumer price data is due tomorrow morning.

Businesses continue to pare inventories amid persistently weak demand. May business inventories fell a sharper-than-expected 1.0% in what was the ninth straight decline.

Trading volume was low even though there were plenty of news items to act as catalysts or cues for trading. Fewer than 1 billion shares traded hands on the NYSE this session. That's well below recent trends.DJ30 +27.81 NASDAQ +6.52 NQ100 +0.4% R2K +0.6% SP400 +0.8% SP500 +4.79 NASDAQ Adv/Vol/Dec 1497/1.88 bln/1125 NYSE Adv/Vol/Dec 2121/978 mln/891