US stocks close higher as tech companies make gains
US stocks have staged a late recovery and finished mostly higher, led by technology and metals companies.
However, energy companies continued to fall with the price of oil.
In early trading the Dow Jones industrial average lost as much as 105 points, but those losses faded around noon on Thursday and stocks finished more or less back where they started.
Banks and utility companies slipped, and energy companies took losses as oil prices fell for the fourth day in a row.
It has now been almost two months since the stock market has made a big move. The market recorded a tiny loss in August after an extraordinarily quiet month.
Benchmark US crude is down more than 9% this week, but it has stayed between 40 and 50 US dollars (£30 to £38) a barrel for about five months.
Lowell Yura, a portfolio manager at BMO Global Asset Management, said investors should not worry about the recent decline because energy companies have had more than a year to strengthen their financial positions in response to lower oil prices.
So even if oil prices fall further, it will not cause much damage to bonds or the broader stock market.
"We've had some time now for that sector to prepare for lower oil prices for longer," he said.
"In the long term it's really hard to imagine a world in which low oil prices are bad for growth."
The Dow rose 18.42 points, or 0.1%, to 18419.30. The Standard & Poor's 500 index lost 0.09 points to 2170.86. The Nasdaq composite gained 13.99 points, or 0.3%, to 5227.21.
US crude oil gave up 1.54 dollars (£1.16), or 3.4%, to 43.16 dollars (£32.53) a barrel in New York. Brent crude, the benchmark for international oil prices, fell 1.44 dollars (£1.09), or 3.1%, to 45.45 dollars (£34.25) a barrel in London. Valero Energy lost 1.06 dollars (£0.80), or 1.9%, to 54.29 dollars (£40.91).
Diamond Offshore Drilling sank after the company said Brazilian oil company Petrobras is terminating a contract with it.
Diamond said the contract was scheduled to end in October 2018, and that it does not believe Petrobras' actions are legal. Its shares lost 1.96 dollars (£1.48), or 10.6%, to 16.51 dollars (£12.44).
Technology companies made the biggest gains. Hewlett Packard Enterprise gained 68 cents (£0.51), or 3.2%, to 22.16 dollars (£16.70).
Graphics chipmaker Nvidia said it will work with Chinese e-commerce company Baidu to develop an autonomous driving system.
Nvidia picked up 1.81 dollars (£1.36), or 3%, to 63.15 dollars (£47.59) and Baidu rose 5.55 dollars (£4.18), or 3.2%, to 176.62 dollars (£133.10).
Campbell Soup fell after disappointing results from the company's fresh products unit.
The company said carrot sales fell because of a premature harvest that resulted in smaller vegetables, while a recall hurt sales of its Bolthouse Farms beverages.
The maker of canned soups, Pepperidge Farm cookies and V8 juices has been trying to capitalise on a growing desire for fresh foods. Its stock slid 3.81 dollars (£2.87), or 6.3%, to 56.91 dollars (£42.89).
Costco stock fell after the company reported weak sales for August.
The wholesale club operator said sales at older stores were unchanged compared with last year, while analysts expected some growth. The stock gave up 5.88 dollars (£4.43), or 3.6%, to 156.21 dollars (£117.72).
Materials companies made some of the largest gains. Gold producer Newmont Mining jumped 1.19 dollars (£0.90), or 3.1%, to 39.43 dollars (£29.71) and steel maker Nucor rose 79 cents (£0.60), or 1.6%, to 49.30 dollars (£37.15).
US manufacturing shrank in August for the first time since February as orders and output fell and factories cut jobs.
However, there were signs that the weak global economy will not hurt US manufacturers as much.
Chinese factory managers said they expect to do more business and European manufacturers reported continued growth.
"There's no real sign that we're near the end of a cycle," said Mr Yura.
Germany's Dax fell 0.6% and Britain's FTSE 100 fell 0.5%. The CAC 40 in France was little changed. Japan's Nikkei 225 closed 0.2% up. Hong Kong's Hang Seng index gained 0.8%. In South Korea, the Kospi fell 0.1%.