Stocks struggled to a mostly lower finish on Wall Street as losses for banks and energy stocks offset gains elsewhere in the market.

Bank of New York Mellon lost 1.6 percent Thursday, and Chevron gave up 1.1 percent.

Yelp jumped 26.7 percent after raising its revenue forecast, but Rite Aid slumped 11.5 percent after calling off its sale to the grocery chain Albertsons.

Flowserve, Viacom and Norwegian Cruise Line all rose sharply after reporting solid results.

KEEPING SCORE: The S&P 500 index fell 4 points, or 0.1 percent, to 2,853. The Dow Jones Industrial Average fell 74 points, or 0.3 percent, to 25,509. The Nasdaq composite rose 3 points to 7,891.

THURSDAY LEADERS: Apple rose 1.1 percent to $209.58, and software maker Red Hat rose 1.7 percent to $145.26.

Amazon pulled retail companies higher, rising 1.2 percent to $1,909.56.

SHHHH: Trading this week has been light. The S&P 500 made a solid gain on Monday but has hardly budged since then. The VIX, a measure of how much volatility investors expect, has fallen to its lowest level since early January.

“It’s not that risk has gone away,” said JJ Kinahan, chief market strategist for TD Ameritrade. “Quantifiable risk is not there right now.”

Retailers including Macy’s and Nordstrom are scheduled to report their results next week, and Kinahan said stocks resume their upward climb if those companies say shoppers are still spending freely.

PRICES: The Labor Department said wholesale prices were unchanged in July, a sign inflation pressure weakened a bit. Gas and food prices both slipped and soybeans prices tumbled, likely reflecting a buildup in stockpiles after China imposed tariffs on them in retaliation for U.S. duties.

Bond prices jumped. The yield on the 10-year Treasury note fell to 2.93 percent from 2.97 percent. That hurt banks, as lower interest rates make long-term loans like mortgages less profitable.

DEAL OFF: Rite Aid called off its sale to the grocery chain Albertsons following opposition from advisory firms and one of Rite Aid’s biggest shareholders. The stock fell 11.8 percent to $1.54. Wall Street never showed much confidence the sale would go through.

Walgreens tried to buy Rite Aid last year, but settled for buying about half of its stores after regulators opposed a full sale. The company has been struggling with high debt and tough competition.

BAD BREAKUP: Tribune Media withdrew from its planned sale to Sinclair Broadcasting and said it will sue Sinclair for breach of contract. Tribune rose 3.6 percent to $34.85 and Sinclair added 1.7 percent to $27.55.

Both stocks plunged in mid-July when regulators expressed major concerns about the deal.

EARNINGS: Online reviews company Yelp jumped 28.4 percent to $48.98 after it raised its revenue forecast and said advertising revenue surged in the second quarter. Video streaming company Roku climbed 21.3 percent to $57.30 after it took a smaller loss than analysts expected while its revenue surpassed expectations.

Travel site Booking Holdings lost 4.4 percent to $1,954.75 after a weak profit forecast. Generic drugmaker Perrigo cut its forecasts because of weak results from its prescription business and said it plans to split that unit into a separate company. The stock sank 10.1 percent to $70.36.

DUN TRADING: Business information provider Dun & Bradstreet agreed to be bought by a group of investors for $145 a share, or about $5.4 billion. The stock rallied 16.5 percent to $143.04.

TESLA TUMBLE: Electric car maker Tesla tumbled 6.1 percent to $347.90. The stock surged 11 percent Tuesday, mostly because CEO Elon Musk tweeted that he was considering taking Tesla private. In the last two days it’s given up most of that gain, suggesting investors are dubious.

OIL:OCrude prices stabilized following a 3 percent drop a day earlier. Benchmark U.S. crude oil dipped 0.2 percent to $66.81 a barrel in New York. Brent crude, the standard for international oil prices, lost 0.3 percent to $72.04 per barrel in London.

Wholesale gasoline lost 1 percent to $2 a gallon. Heating oil slid 0.2 percent to $2.11 a gallon. Natural gas rose 0.2 percent to $2.96 per 1,000 cubic feet.

METALS: Gold lost 0.1 percent to $1,219.90 an ounce. Silver added 0.2 percent to $15.46 an ounce. Copper gained 0.5 percent to $2.77 a pound.

CURRENCIES: The dollar inched up to 110.97 yen from 110.96 yen. The euro fell to $1.1552 from $1.1619.

OVERSEAS: The German DAX rose 0.3 percent. Britain’s FTSE 100 fell 0.4 percent while France’s CAC 40 rose less than 0.1 percent.

Hong Kong’s Hang Seng index advanced 0.9 percent and the Japanese Nikkei 225 slipped 0.2 percent. South Korea’s Kospi inched up 0.1 percent.

© The Associated Press. All rights reserved