4 MIN. DE LECTURA
* Apple hits record high in erratic trading
* Merck on track for its best day since January 2014
* Feb U.S. single-family home prices rise
* Indexes up: Dow 0.4 pct, S&P 0.3 pct, Nasdaq 0.2 pct (Updates to early afternoon, changes comment)
By Tanya Agrawal
April 28 (Reuters) - U.S. stocks held on to their gains in early afternoon trading on Tuesday, reversing earlier declines, on strong earnings from Merck, better-than-expected housing data and a dividend hike from IBM.
The markets swung between gains and losses in early trading, led by Apple. Apple hit a record high early after its strong results. The shares then fell as much as 2.3 percent, weighing on all three major indices, before recovering to trade up 0.1 percent at $132.85
A majority of the ten S&P 500 sectors were up in afternoon trading, led by a 1.4 percent rise in the teleservices index .
U.S. single-family home prices rose more than expected in February from a year earlier, according to a survey.
"So far, the first quarter earnings have surpassed expectations and the housing numbers came in strong," said John Augustine, chief investment officer at Huntington Bank in Columbus, Ohio, which oversees more than $12.6 billion in funds.
"So any time you have any good economic data, the markets react positively."
U.S. companies are on track to post a slight gain in earnings for the first quarter after stronger-than-expected results from companies such as Apple, reversing forecasts for the first profit decline since 2009, according to Thomson Reuters data.
Merck jumped 5.2 percent to $60.10, on track for its best day since January 2014, after reporting better-than-expected results and releasing favorable data late Monday about the safety of its Januvia diabetes drug.
IBM shares rose 1.8 percent to $173.92 and were the biggest positive influence on the Dow after the company hiked its quarterly dividend by 18 percent, the biggest increase in five years.
Earlier in the session, a report said an Iranian "force" seized a U.S. cargo ship after opening fire on it in the Gulf, spurring a brief rally in oil prices and adding to the volatility in the stock market.
"I think any kind of international question about how things will fare or relationships with other countries absolutely has an impact," said Peter Anderson, portfolio manager at Congress Asset Management in Boston, which oversees about $7 billion in assets under management.
"The non-resolution of things can really make the market edgy in terms of volatility."
At 13:30 p.m. EDT (1730 GMT) the Dow Jones industrial average was up 62.92 points, or 0.35 percent, at 18,100.89, the S&P 500 was up 5.31 points, or 0.25 percent, at 2,114.23 and the Nasdaq Composite was up 9.84 points, or 0.19 percent, at 5,070.09.
Investors are also awaiting the results of a two-day Federal Reserve meeting that ends on Wednesday for clues on when the central bank will hike interest rates.
JetBlue Airways soared 6.5 percent to $21 after forecasting a surprise rise in April unit revenue.
Coach slumped 7.4 percent to $39.11, putting it on track for its steepest fall since June, after its quarterly sales fell short of estimates.
Whirlpool fell 6.5 percent to $184.96 after cutting its 2015 profit and sales forecast, blaming the strong dollar and Brazil's stagnating economy.
Advancing issues outnumbered declining ones on the NYSE by 1,870 to 1,097, for a 1.70-to-1 ratio on the upside; on the Nasdaq, 1,693 issues rose and 977 fell for a 1.73-to-1 ratio favoring advancers. (Additional reporting by Caroline Valetkevitch; Editing by Savio D'Souza)