NEW YORK (AP) -- U.S. stocks gave up some early gains to finish lower Wednesday as energy companies sank with the price of oil and weak quarterly reports weighed down technology companies.
After two days of closing higher, stocks rose in the morning but couldn't hang on to the gains. Energy companies fell after U.S. energy stockpiles shrank by a smaller amount than analysts expected, and announcements from Adobe Systems and HP hurt tech stocks. Drug companies traded higher.
Trading was light as investors watched Federal Reserve Chair Janet Yellen's testimony before Congress and waited for Thursday's referendum on Britain's membership in the European Union.
"There's not a lot of trading out there. People are tentative," said Randy Frederick, managing director of trading and derivatives at Charles Schwab. Britons will vote Thursday, but results won't be known until after U.S. markets are closed. Frederick said stocks could tumble if Britain votes to leave the European Union, but if the "remain" campaign wins, he expected that U.S. stocks wouldn't have a huge reaction.
Polls indicate it will be a tight race, but bookies are giving the "remain" camp a higher probability of winning. International experts, including Yellen, have said that a British exit would cause volatility in global markets and uncertainty for the world economy.
The Dow Jones industrial average dipped 48.90 points, or 0.3 percent, to 17,780.83. The Standard & Poor's 500 index fell 3.45 points, or 0.2 percent, to 2,085.45. The Nasdaq composite edged down 10.44 points, or 0.2 percent, to 4,833.32.
Yellen said the Federal Reserve will be cautious in raising interest rates because of the mixed state of the economy, with consumer spending rising but investment spending weak.
The U.S. government said crude inventories fell by about 900,000 barrels last week, substantially less than experts had expected. Oil prices have tumbled in the last few years because growth in supplies has far outstripped demand. Benchmark U.S. crude fell 72 cents, or 1.4 percent, to $49.13 a barrel in New York. Brent crude, the benchmark for international oil prices, lost 74 cents, or 1.5 percent, to $49.88 a barrel in London.
Chevron gave up 95 cents to $102.29 and Marathon Oil lost 34 cents, or 2.3 percent, to $14.75.
Health care stocks climbed after Medicare spending did not exceed levels that would have required action by a cost-cutting board. While the review board doesn't have any members yet, investors have been worrying for months that the government will pressure drug companies to cut their prices.
Alliance Bernstein analyst Tim Anderson said the development is good for health care investors, but said spending may hit the target next year, giving the next president more leverage in trying to lower drug prices. Bristol-Myers Squibb rose $1.06, or 1.5 percent, to $72.31 and cancer drug maker Celgene jumped $2.37, or 2.4 percent, to $99.23.
Tesla shareholders reacted harshly after the electric car maker offered to buy solar panel maker SolarCity for up to $2.8 billion in an attempt to create a one-stop shop for clean energy. Tesla CEO Elon Musk is the chairman and largest shareholder in both companies, and SolarCity CEO Lyndon Rive is his cousin. Tesla slumped $22.95, or 10.5 percent, to $196.66. SolarCity stock added 69 cents, or 3.3 percent, to $21.88, far below the value of the offer.
Software maker Adobe Systems announced a larger-than-expected profit, but analysts were less excited about its projections for the current quarter. Adobe lost $5.71, or 5.7 percent, to $94.01.
Computer and printer maker HP forecast strong results in its fiscal third quarter but won't offer as many discounts and will carry reduced supplies. An analyst for Citi called the change a "radical shift." HP fell 72 cents, or 5.4 percent, to $12.61.
FedEx gave a cautious outlook as the package delivery company spends more money on expanding its network and acquires more aircraft to keep up with the e-commerce boom. Its stock fell $7.44, or 4.5 percent, to $156.51.
In other energy trading, wholesale gasoline was little changed at $1.59 a gallon. Heating oil fell 1 cent to $1.50 a gallon. Natural gas lost 9 cents to $2.68 per 1,000 cubic feet.
Gold fell $2.50 to $1,270 an ounce. Gold prices have fallen for four days in a row after rising for the seven days before that. Silver fell 1 cent to $17.31 an ounce. Copper rose 2 cents to $2.14 a pound.
Britain's FTSE 100 was up 0.6 percent and Germany's DAX was also 0.6 percent higher. France's CAC 40 rose 0.3 percent. The Hang Seng in Hong Kong picked up 0.6 percent and Japan's Nikkei 225 fell 0.6 percent.
The British pound rose to $1.4691 from $1.4663 a day earlier. The dollar declined to 104.47 yen from 104.76 yen. The euro rose to $1.1307 from $1.1257. Bond prices rose. The yield on the 10-year Treasury note fell to 1.69 percent from 1.71 percent.