NEW YORK (CNNMoney) -- Stocks closed in positive territory to end a choppy trading day. After a rough start Tuesday, U.S. stocks followed world markets slightly higher as worries about a possible credit downgrade of French banks receded.
The S&P 500 () closed the day up 11 points, or 0.9%, while the Nasdaq Composite ( ) gained 37 points, or 1.5%.
The Dow Jones industrial average () finished up 45 points, or 0.4%, higher. Seven of the blue-chip index's 30 components landed in the red.
"The tone of the market changed today from a seller rally to a buying the dips kind of market," said Sam Ginzburg, head of capital markets at First New York Securities. "Bids came back into the market."
The change in sentiment resulted at least partly from French banks BNP Paribas and Societe General debunking rumors that they were having trouble gaining access to funding. These rumors sparked the early morning sell-off in the U.S.
"We're taking all our cues from Europe right now," said Peter Boockvar, the Equity Strategist at Miller Tabak + Co. "If there's stability in the European markets, it's a reason for buyers to come into our markets."
European markets closed the day in positive territory. Britain's FTSE 100 () gained 0.9%, France's CAC 40 ( ) added 1.41% and the DAX ( ) in Germany rose 1.85%.
Investors are so on edge about all things Europe that every little bit of news gets a reaction -- for better and worse. But they are still anxiously waiting for more news on the possibility of a Greek default.
Indeed, analysts and traders said that in this environment, news about the global economy is driving markets more than individual companies' performance.
"Fundamentals of many companies look good but that's been overshadowed by the macroeconomic uncertainty coming out of Europe," said Matthew Rubin, the director of investment strategy at Neuberger Berman. "I don't think we've gotten past the volatility we're in."
Stocks finished a choppy session higher Monday, as investors pinned their hopes for a turnaround in the last hour of trading, following a Financial Times report that said China was in talks with Italy about potentially buying the cash-strapped country's debt.
World markets: Asian markets ended mixed. The Shanghai Composite ( ) lost 1.1% while Japan's Nikkei ( ) added 1%. The Hang Seng ( ) in Hong Kong was closed for a holiday.
Economy: The latest data for imports and exports showed that import prices declined 0.4% in August, while export prices rose 0.5%.
Companies: Shares of consumer-electronics retailer Best Buy ( , Fortune 500) fell precipitously, down 6.5%. It reported earnings per share of 47 cents on sales of $11.35 billion before the opening bell. Both figures missed forecasts.
Shares of Aetna (Fortune 500) rose 5.4%, after the health insurer raised its full-year outlook, citing strong results for the current quarter.,
Oil for October delivery gained $2 to $90.20 a barrel.
Gold futures for December delivery added $23.10 to $1,836.40 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury edged lower, and the yield edged up to 1.99%.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.86%||3.92%|
|15 yr fixed||3.03%||3.05%|
|30 yr refi||3.94%||3.98%|
|15 yr refi||3.12%||3.14%|
Today's featured rates: