(AP) -- Major U.S. stock indexes finished unevenly Wednesday as gains in banks and other financial companies outweighed losses elsewhere in the market.
Bond yields surged to the highest level in four months. That drove demand for bank stocks and triggered a sell-off in utilities, real estate companies and other high-dividend payers.
Energy stocks rose along with crude oil prices. Homebuilders declined following a mixed batch of housing data.
The surge in bond yields reflected the belief on the part of many investors that the economy is strengthening, noted Craig Birk, chief investment officer at Personal Capital.
"If the economy continues to move forward then interest rates have more room to creep higher and the Fed has more room to continue raising (short-term rates)," he said.
The S&P 500 index rose 3.64 points, or 0.1 percent, to 2,907.95. The Dow Jones Industrial Average gained 158.80 points, or 0.6 percent, to 26,405.76. The Nasdaq composite lost 6.07 points, or 0.1 percent, to 7,950.04.
Smaller companies lagged the broader market. The Russell 2000 index gave up 8.04 points, or 0.5 percent, to 1,702.93. Decliners outnumbered gainers on the New York Stock Exchange.
Trading was listless through much of Wednesday. The slight gains for the S&P 500, the market's benchmark index, added to a solid rally a day earlier, when investors shrugged off initial jitters over the latest escalation in the trade dispute between the U.S. and China.
Headlines and speculation about the trade dispute took a backseat Wednesday to the surge in bond yields.
Bond prices fell, driving the yield on the 10-year Treasury to 3.07 percent from 3.04 percent late Tuesday. That's the highest level since May 22.
When yields rise they force interest rates on mortgages and other loans higher, making it more profitable for banks to lend money. The higher bond yields drove up shares in banks and other financial stocks. Citigroup climbed 3.3 percent to $73.72.
New housing data weighed on homebuilder stocks. The Commerce Department said residential construction rebounded in August at the fastest pace in seven months. However, applications for new building permits, a forward-looking indicator, plunged. Homebuilders declined, giving up early gains. William Lyon Homes slid 3.4 percent to $18.65.
"As we're watching the data unfold here in the third quarter we think we may be, if not already passed the peak, passing the peak in terms of the economic acceleration here domestically," said Rob Haworth, senior investment strategist at U.S. Bank Wealth Management. "You look at the housing data from today and there's some signs of that."
A pickup in crude oil prices helped send energy stocks higher. Newfield Exploration gained 4.4 percent to $28.91.
Oil prices rose on data showing U.S. crude oil inventories fell last week and are now running at about 3 percent below the five-year average for this time of year.
All told, benchmark U.S. crude climbed 1.8 percent to settle at $71.12 a barrel in New York. Brent crude, used to price international oils, gained 0.5 percent to close at $79.40 a barrel in London.
Traders bid up shares in Fitbit after the maker of wearable exercise trackers launched a platform that offers personalized coaching. The company also announced a partnership with Humana to potentially give the insurer's 5 million members access to the platform. Fitbit gained 5.3 percent to $6.11.
Praxair climbed 3.9 percent to $164.37 on news reports that the industrial gases company is moving closer to U.S. antitrust approval of its merger with Germany's Linde.
Copart slumped 13.4 percent to $55.58 after the operator of online vehicle auctions reported earnings that fell short of analysts' estimates.
The dollar fell to 112.27 yen from 112.35 yen on Tuesday. The euro strengthened to $1.1674 from $1.1667.
Gold rose 0.4 percent to $1,208.30 an ounce. Silver gained 0.7 percent to $14.28 an ounce. Copper was little changed at $2.73 a pound.
In other energy trading, heating oil rose 0.5 percent to $2.25 a gallon, wholesale gasoline picked up 0.8 percent to $2.02 a gallon and natural gas fell 0.9 percent to $2.91 per 1,000 cubic feet.
Major stock indexes in Europe finished higher. Germany's DAX gained 0.5 percent, while France's CAC 40 rose 0.6 percent. Britain's FTSE 100 added 0.4 percent.
In Asia, Japan's benchmark Nikkei 225 added 1.1 percent, while Australia's S&P/ASX 200 gained 0.5 percent. Hong Kong's Hang Seng rose 1.2 percent. South Korea's Kospi finished virtually unchanged.