(AP) -- A sharp sell-off in energy companies pulled U.S. stock indexes modestly lower Wednesday, wiping out small gains from the day before.
Another slide in crude oil prices weighed on the energy sector. Banking, health care and technology companies also declined, while consumer-focused stocks and phone companies posted gains.
Investors mostly focused on company earnings from retailers, restaurant chains and other companies.
"We're still down year-over-year for the quarter, but there's a growing conviction that the headwinds from the energy bust and strong dollar are increasingly fading," said David Lefkowitz, senior equity strategist at UBS Wealth Management Americas.
The Dow Jones industrial average fell 37.39 points, or 0.2 percent, to 18,495.66. The Standard & Poor's 500 index shed 6.25 points, or 0.3 percent, to 2,175.49. The Nasdaq composite index lost 20.90 points, or 0.4 percent, to 5,204.58.
In the absence of major economic news, in what is a seasonally slow period for the markets, investors have been monitoring company earnings for clues about how the second half of the year is shaping up for corporate America.
A strong jobs report last Friday boosted investors' confidence in the U.S. economy. Traders are looking ahead to Friday, when the government delivers its latest monthly retail sales figures.
Most companies have already delivered their quarterly report cards, and earnings and revenue have been relatively good. Some 90 percent of the companies in the S&P 500 index have already reported second-quarter results, and roughly 65 percent posted earnings that beat Wall Street's expectations, according to S&P Global Market Intelligence.
Even so, earnings overall are expected to be down 2.1 percent, dragged down by the energy sector, which has been struggling with a steep drop in oil prices.
A report showing a bigger-than-expected increase in U.S. oil stockpiles last week weighed on the price of crude, reversing an early gain.
Benchmark U.S. crude fell $1.06, or 2.5 percent, to close at $41.71 per barrel in New York. Brent crude, used to price international oils, slid 93 cents, or 2.1 percent, to close at $44.05 per barrel in London.
Several companies reported disappointing quarterly results or outlooks on Wednesday.
Michael Kors slid 2.8 percent after the clothing company forecast weaker sales for the current quarter and lowered its outlook for sales at established stores. The stock fell $1.40 to $48.71.
Perrigo sank 9.6 percent after the pharmaceuticals company cut its guidance for the year, citing growing competition and falling prescription drug prices. The stock lost $9.09 to $86.
Traders sought shade from SunPower after the solar products and service company tumbled 30.2 percent. The company said its power plant business is struggling amid growing competition and project delays. The stock lost $4.47 to $10.31.
Investors bid up shares in several companies that reported strong earnings.
Yelp jumped 12.8 percent after the online business review portal reported strong quarterly results. The stock added $4.19 to $36.83.
Clothing company Ralph Lauren surged 8.5 percent after it too delivered strong quarterly results. The stock gained $8.07 to $103.14.
"The earnings beats that we're getting are, to a large extent, being driven by better revenue performance," Lefkowitz said.
Markets overseas were mixed.
In Europe, Germany's DAX and France's CAC 40 each dipped 0.4 percent. Britain's FTSE 100 rose 0.2 percent.
Earlier, Japan's Nikkei 225 lost 0.2 percent despite a report showing private sector machinery orders rebounded in June from May. Hong Kong's Hang Seng edged up 0.1 percent, while Australia's S&P ASX 200 fell 0.2 percent. South Korea's Kospi added less than 0.1 percent. Stocks in Taiwan and Singapore also were higher, but markets in China, Indonesia and New Zealand declined.
In other energy trading, wholesale gasoline slipped 4 cents to $1.30 a gallon, while heating oil lost a penny to $1.32 a gallon. Natural gas fell 5 cents, or 2.1 percent, to $2.56 per 1,000 cubic feet.
Among metals, the price of gold rose $5.20, or 0.4 percent, to $1,351.90 an ounce. Silver added 32 cents, or 1.6 percent, to $20.17 an ounce. Copper gained 2 cents, or 1 percent, to $2.17 a pound.
Bond prices rose. The yield on the 10-year Treasury note fell to 1.51 percent from 1.55 late Tuesday. In currency markets, the dollar weakened to 101.29 yen from 101.90 on Tuesday, while the euro strengthened to $1.1175 from $1.1107.