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 took in some solid U.S. company earnings, the latest move from the Federal Reserve and a report of unexpectedly weak economic growth in the first quarter, the stock market managed its third day of gains in a row.

The Dow Jones industrial average rose 45.47 points, or 0.3 percent, to 16,580.84, four points above its previous record set on Dec. 31. It was the first day the index closed in positive territory for the year.

The Standard & Poor’s 500 index rose 5.62 points, or 0.3 percent, to 1,883.95. 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 a weak GDP economic report.

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 an 18 percent premium to the company’s $23.10 closing price on Tuesday.

More than 60 percent of S&P 500 companies have reported first-quarter earnings. Analysts currently expect earnings to grow by 1.7 percent in the period, according to S&P Capital IQ data. That compares with growth of almost 8 percent in the fourth quarter and 5.2 percent in the same period a year ago.