(AP) -- U.S. stock indexes edged higher in afternoon trading Thursday after an early rally lost some of its strength.
Even so, the benchmark S&P 500 index hovered within 0.5% of its all-time high set July 26 as the market remained on track to extend gains from a day earlier.
Health care and technology stocks accounted for much of the gains. Merck & Co. rose 1.4%. Microsoft was among the big winners in the tech sector. It climbed 1.8% after the software giant boosted its quarterly dividend and approved a $40 billion stock buyback.
Energy stocks, which rallied earlier in the week as crude oil prices soared following an attack on key oil facilities in Saudi Arabia, fell the most. Hess slid 2.4%.
Industrial stocks also declined. Southwest Airlines dropped 1.5%.
Bond prices were little changed. The yield on the 10-year Treasury held at 1.78%.
The latest gains came as investors weighed a batch of encouraging economic reports, including new data indicating U.S. home sales rose sharply last month and an index of manufacturing activity that came in ahead of analysts' forecasts. Meanwhile, applications for U.S. unemployment aid edged higher last week, but still totaled less than what economists projected.
"Today's gains are really tied to the better-than-expected economic news," said Kate Warne, chief investment strategist at Edward Jones.
The data reinforces the outlook from the Federal Reserve, which projects slower economic growth, but not a recession.
On Wednesday, the Fed reduced its benchmark interest rate for the second time this year in a bid to keep the economy from stalling in the face of slowing economic growth overseas and uncertainty over the U.S.-China trade war.
Fed officials were sharply divided in their outlook for future interest rate policy. As a result, the central bank didn't indicate clearly whether more rate cuts were likely this year. Still, it left the door open for additional rate cuts if the economy weakens.
"That's a nuanced message that markets are beginning to feel comfortable with," Warne said. "And the fact that the economic data today was a little better than expected is reassuring, as opposed to worrisome, in an environment where there's a lot of variation among voting members (of the Fed)."
The Fed's outlook for the U.S. economy, and that of corporations, has been clouded this year as the trade conflict between the world's two biggest economies has escalated and multiple attempts at negotiating a resolution have failed.
Washington and Beijing were set to begin trade talks Thursday ahead of more formal negotiations set for next month.
Markets have rallied this month after both sides took steps to ease tensions in advance of the talks. That's fueled speculation among investors that the U.S. and China may at least reach an interim deal in their costly trade conflict.
"A lack of escalation or potential de-escalation would be something that would be viewed positively by the markets," said Bill Northey, senior investment director at U.S. Bank Wealth Management.
Meanwhile, France's finance minister said Europe is ready to impose retaliatory tariffs next year on U.S. goods as part of a long-running dispute over subsidies to plane makers Airbus and Boeing.
KEEPING SCORE: The S&P 500 index was up 0.3% as of 2:20 p.m. Eastern Time. The Dow Jones Industrial Average gained 31 points, or 0.1%, to 27,178. The Nasdaq added 0.3%. The Russell 2000 index of smaller company stocks rose 0.2%.
Major stock indexes in Europe finished mostly lower. Indexes in Asia were mixed.
ANOTHER RATE CUT: The Fed cut its benchmark interest rate by a quarter of a percentage point on Wednesday, in a widely expected move. The rate, which is now at a range of 1.75% to 2%, influences many consumer and business loans.
The market initially sold off on the news, however, after the Fed revealed that its panel of policymakers is divided about the upcoming path for interest rates. Stocks rebounded after Fed Chairman Jerome Powell said the central bank would be ready to take action if the economy weakened.
The Fed is trying to keep the U.S. economic expansion from being derailed by uncertainties over the U.S. trade war with China, slower global growth and a slump in American manufacturing.
The Fed's wasn't the only interest rate decision to be digested.
The Bank of England also kept its main interest rate on hold at 0.75% with rate-setters opting to sit tight while waiting for some clarity to emerge on Britain's exit from the European Union. And Japan's central bank opted to keep its own monetary policy unchanged and its key interest rate at minus 0.1%. The decision came amid signs of weaker consumer demand and exports and dimming confidence in the business outlook.
HOME SWEET HOME: The National Association of Realtors said that sales of previously occupied U.S. homes climbed last month to a seasonally adjusted annualized rate of 5.49 million units, the best performance since March 2018. Sales have increased 2.6% from a year ago.
Mortgage rates have been hovering near historic lows, making buyers more eager to purchase a home despite rising prices amid a shortage of properties for sale.
Homebuilders marched broadly higher. PulteGroup gained 1.9%.
NOT SO TOUGH: U.S. Steel dropped 9.7% after it warned investors that its third quarter loss will be wider than anticipated.
UNAPPETIZING RESULTS: Darden Restaurants fell 4.5% after the owner of the Olive Garden and other restaurant chains reported first quarter results that disappointed investors. The company's earnings topped Wall Street's forecasts, but other performance metrics lagged amid weaker sales at some of Darden's chains.
ENERGY: Oil prices rose again as traders continued to assess the impact of the attack on Saudi production over the weekend. Benchmark U.S. crude was up 0.2% to $58.21 a barrel and is up 6.5% this week. Brent crude, the international standard, was up 1.3% to $64.40.