NEW YORK (AP) -- Stocks swung between gains and losses on Thursday, then ended right back where they started.
With seconds to close, the Standard and Poor's 500 eked out a gain, finishing just 0.02 percent higher.
Stocks rose at the open of trading, echoing a surge in markets in Europe, where the central bank announced a series of moves to jolt the region's economy to faster growth. Then, as central bank chief Mario Draghi spoke at a news conference, investors started having second thoughts and stocks there sank, as did U.S. markets.
The S&P 500 edged up 0.31 points to end at 1,989.57.The Dow Jones industrial average gave up 5.23 points, less than 0.1 percent, to 16,995.13. It was up as much as 130 points earlier. The Nasdaq composite gave up 12.22 points, or 0.3 percent, to 4,662.16.
The new European Central Bank moves included a cut in interest rates, cheap loans to banks and several new measures, such as targeting corporate bonds in its bond-buying program.
The interest rate paid to commercial banks to store money at the central bank was cut further into negative territory, to minus 0.4 percent from minus 0.3 percent. The aim is to get banks to remove the money and use it to make loans, but it's an unprecedented and controversial policy.
"The central bank came out all guns blazing," said Craig Erlam, senior market analyst at currency trader OANDA.
The bank's efforts also underlined the weakness of the 19-country eurozone and the desperation by monetary authorities to do something about it. The policy announcements ended up rattling investors more than reassuring them.
"The effectiveness of central bank policy has become less and less," said Ernie Cecilia, chief investment officer of Bryn Mawr Trust. "There really isn't a lot of growth to show. Europe is really struggling."
In the U.S., several companies lost ground after releasing disappointing earnings and outlooks. Canadian Solar sank 13 percent and Vail Resorts lost 4 percent.
With nearly all companies out with fourth-quarter results, earnings per share for the S&P 500 are now estimated to have fallen 4.2 percent from the same period a year earlier, according to S&P Capital IQ.
In energy trading, U.S. crude oil shed 1.2 percent after jumping 4.9 percent on Wednesday.
Tim Courtney, chief investment officer of Exencial Wealth Advisors, thinks the drop played a role in dampening the stock market's gains for the day.
"When oil falls, it conjures up images of deflation, inventories piling up and China slowing," he said. For investors to buy more stocks, "they want to see oil markets stabilize."
Among stocks making big moves, Dollar General rose $8.02, or 11 percent, to $83.23 after the company reported that its fourth quarter profit rose almost 6 percent, topping Wall Street expectations.
U.S. crude shed 45 cents to $37.84 a barrel on the New York Mercantile Exchange. Brent crude, which is used to price international oils, lost $1.02, or 2.5 percent, to $40.05 a barrel.
In other energy trading, wholesale gasoline fell 3.15 cents, or 2 percent, to $1.439 a gallon, heating oil rose 1.66 cents to $1.216 a gallon and natural gas gained 3.6 cents to $1.788 per 1,000 cubic feet.
In Europe, Germany's DAX lost 2.3 percent, France's CAC 40 fell 1.7 percent and Britain's FTSE 100 gave up 1.8 percent.
U.S government bond prices fell, pushing yields higher. The yield on the 10-year Treasury note rose to 1.93 percent from 1.88 percent the day before. In currency trading, the euro rose to $1.1207 from $1.0996 late Wednesday and the dollar fell to 112.97 yen from 113.40 yen.
Industrial and precious metals mostly rose. Gold increased $15.40 to $1,272.80 an ounce. Silver climbed 18.3 cents to $15.55 an ounce and copper slipped 1.25 cents to $2.22 a pound.