NEW YORK (AP) -- Stocks closed mostly lower on Thursday, with chemicals and agricultural companies taking the largest losses. The price of gold continued its long surge. Trading was quiet on the final day of a stormy first quarter that produced surprising gains.
Indexes were little changed for most of the day, then gradually slid from small gains to small losses in the afternoon. A shaky industry outlook hurt agriculture, fertilizer and farm equipment companies.
Gold prices inched higher to complete their biggest quarterly gain in almost 30 years. The Dow Jones industrial average and Standard & Poor's 500 index, both of which were down more than 10 percent last month, finished the quarter higher.
At the start of this year, investors seemed eager to turn the page on 2015. But the market plunged as investors feared for the health of the global economy. Tobias Levkovich, chief U.S. Equity Strategist for Citi Investment Research, said investors bought traditionally defensive stocks as the market fell, including health care companies and companies that make consumer goods. Then stocks rallied, and many of those companies suffered while energy companies and others recovered.
"If you're an institutional investor you probably got way too defensive in January, you suffered on the way down and you've suffered on the way up," he said. "The market may have recovered, but a lot of people haven't, in their portfolios."
The Dow fell 31.57 points, or 0.2 percent, to 17,685.09. The S&P 500 shed 4.21 points, or 0.2 percent, to 2,059.74 The Nasdaq composite index rose 0.55 points to 4,869.85.
Agricultural companies slumped following disappointing quarterly results and a shaky outlook from irrigation company Lindsay. Agricultural giant Monsanto lost $3.35, or 3.7 percent, to $87.74. Fertilizer maker Mosaic fell $1.12, or 4 percent, to $27. Equipment maker Deere shed $3.13, or 3.9 percent, to $76.99.
The price of gold rose $7.30, or 0.6 percent, to $1,234.20 an ounce. In the first quarter gold rose 16 percent, its largest gain in any quarter since 1986, going higher because of concerns about the health of the global economy, central bank policies, and, more recently, because the U.S. dollar has started to weaken after years of gains. Gold had fallen for six quarters in a row.
The price of silver rose 25 cents, or 1.7 percent, to $15.46 an ounce. Copper lost 1 cent to $2.18 a pound.
Stocks tumbled in January and early February on concerns that weak growth in several major global economies would pull the U.S. economy into recession. In early February, the Dow average and the S&P 500 index were down more than 10 percent from the start of the year. Stocks roared back in March as investors were encouraged by positive economic news in the U.S. and central bank moves around the world to stimulate economic growth.
The Dow finished the quarter up 1.5 percent and the S&P 500 made a 0.8 percent gain. The Nasdaq lost 2.8 percent.
IBM rose $3.04, or 2 percent, to $151.45 after the company said it will expand its business services division by buying Bluewolf Group, which provides cloud consulting and implementation services. IBM didn't disclose terms. Over the last few months IBM agreed to buy Truven Health Analytics to strengthen the health care capabilities of its Watson cognitive computing system, and it bought the data, technology and websites of the Weather Company, which owns the Weather Channel.
Benchmark U.S. crude rose 2 cents to $38.34 per barrel in New York. Brent crude, used to price international oils, added 34 cents, or 0.9 percent, to $39.60 a barrel in London.
Electric car maker Tesla rose $2.88, or 1.3 percent, to $229.77. On Thursday the company unveiled its lower-priced Model 3 car. It costs less than half as much as Tesla's earlier cars, and is expected to have about twice as much range as other electric cars that are in a similar price category.
Watchmaker Movado lost $2.81, or 9.3 percent, to $27.53 after its profit and sales forecasts for 2016 fell short of analyst estimates.
The federal government said more Americans filed for unemployment benefits last week, but the number of applications remains very low, a sign that hiring is solid. About 276,000 people filed for those benefits, up 11,000 from the week before. The government will release March employment data on Friday.
With the first quarter over, companies will start reporting their results on April 11. Analysts expect earnings for the companies on the S&P 500 to fall more than 7 percent, according to S&P Capital IQ. The main reason is the energy sector, which is expected to post broad losses because the price of oil has plunged.
Earnings also fell in the last two quarters, but are expected to improve later this year and finish a little higher in 2016. That would be the second straight year of very slow earnings growth.
Bond prices continued to rise. The yield on the 10-year U.S. Treasury note dipped to 1.77 percent from 1.83 percent. The dollar inched up to 112.53 yen from 112.47 yen. The euro rose to $1.1387 from $1.1333.
In other energy trading, wholesale gasoline dipped 1 cent to $1.43 a gallon. Heating oil rose two cents, or 2 percent, to $1.18 a gallon. Natural gas fell 4 cents, or 1.9 percent, to $1.96 per 1,000 cubic feet.
Stocks in Europe retreated after Wednesday's surge. France's CAC-40 fell 1.3 percent and Germany's DAX declined 0.8 percent. In London the FTSE 100 index was off 0.5 percent. Tokyo's Nikkei 225 fell 0.7 percent and the Hang Seng in Hong Kong retreated 0.1 percent.