NEW YORK -- The Dow Jones industrial average closed at an all-time high Wednesday as the good narrowly outweighed the bad for the stock market.

After investors assessed a series of company earnings reports, the latest move from the Federal Reserve and an unexpectedly weak reading on first quarter economic growth, the stock market ended with its third straight day of gains.

Stocks started the day lower after the government reported that the U.S. economy stalled in the first three months of the year as winter storms chilled business activity. The Commerce Depar-
tment said growth slowed to a barely discernible 0.1 percent annual rate in the January-March quarter, less than the rate of 1.1 percent forecast by economists, according to FactSet.

The market’s reaction to the report was muted because most investors expect the slowdown to be temporary as growth rebounds with warmer temperatures.

"Most people, including us, expected March to have been the strongest month of the first quarter" and that growth will continue to pick up, said Sean Lynch, global investment strategist for Wells Fargo Private Bank. "That’s an OK environment for the market."

The Standard & Poor’s 500 index rose 5.62 points, or 0.3 percent, to 1,883.95. The Dow Jones industrial average rose 45.47 points, or 0.3 percent, to 16,580.84, four points above its previous record set Dec. 31. It was the first day the index closed in positive territory for the year.

The Nasdaq composite rose 11.01 points, or 0.3 percent, to 4,114.56.

Some solid earnings reports and corporate deal news helped offset the weak economic report, and by midday stocks had eked out small gains.

Pepco Holdings surged $3.97, or 17.4 percent, to $26.76 after it agreed to be acquired by nuclear power company Exelon for $6.83 billion, creating a large electric and gas utility in the mid-Atlantic region. Exelon will pay $27.25 per Pepco share, an 18 percent premium to the company’s $23.10 closing price on Tuesday.

Sealed Air was one of the companies that gained after reporting earnings.

The company’s stock rose $1.72, or 5.3 percent, to $34.31 after the food packaging company’s earnings easily beat Wall Street’s expectations. The company also said it was on track to post full-year earnings at the upper end of the range of its forecast.