Relieved investors sent stocks sharply higher on Tuesday after Russia pulled troops back from the border of Ukraine.
The rally pushed the Standard & Poor’s 500 index to a record high, erasing steep losses from Monday, when investors feared that the confrontation between Russia and Ukraine would escalate or even lead to a war.
Traders were relieved when Russian President Vladimir Putin ordered troops participating in military exercises near Ukraine to return to their bases.
The S&P rose 28.18 points, or 1.53 percent, to close at 1,873.91. It was the biggest gain for the benchmark index since October. The Dow Jones industrial average rose 227.85 points, or 1.41 percent, to 16,395.88. The Nasdaq Composite rose 74.67 points, or 1.75 percent, to 4,351.97.
As investors moved back to riskier assets, prices fell for safe-play investments like bonds and gold. Oil prices also fell as the immediate threat of economic sanctions on Russia, a major oil exporter, eased. Traders had also been worried about transportation disruptions in the Black Sea, a major transit point for oil. The yield on the 10-year Treasury note rose to 2.68 percent from 2.60 percent late Monday.
In another sign of a greater appetite for risk, the Russell 2000 index of small company stocks set another record high after posting the biggest percentage gains of the major US stock indexes. The Russell jumped 32.29 points, or 2.7 percent, to 1,208.65.
The two-day rout and rally was just the latest twist in a volatile year for stocks, which fell almost 6 percent just last month and have since recovered to set record highs in recent days.
So what is an investor supposed to do in the face of this volatility? ‘‘I think maybe you take a powder. Maybe take some positions off the table, and you hedge yourself a little but, for the chance that if it does go the other way and there is a downturn,’’ said Stephen J. Carl, head equity trader at The Williams Capital Group.
The conflict between Russia and Ukraine threatened to destabilize Europe and upset oil markets. And it wasn’t clear which countries might be drawn into the conflict if it got worse. Wall Street hates uncertainty, and on Monday that’s all there was. So investors were relieved when Putin appeared to back down on Tuesday.
‘‘I think the reaction today is probably more hopeful than rational,’’ said Brad McMillan, chief investment officer for Commonwealth Financial. McMillan noted that Putin made his point with Ukraine just a week after the Sochi Olympics ended. Hosting the Olympics was a way for Putin to show that Russia was open for business, but the conflict with Ukraine threw that away, McMillan said.
Stock markets in Europe, including Moscow, and Asia recouped much of Monday’s losses. Indexes in France and Germany each rose 2.5 percent, and London’s FTSE 100 in Britain rose 1.72 percent.
Among stocks making big moves:
■ RadioShack plunged 47 cents to $2.25 after reporting a wider quarterly loss and saying it will close up to 1,100 stores.
■ Qualcomm rose $2.48 to $76.11 after the chipmaker announced a 20 percent increase in its quarterly dividend and added $5 billion to its stock buyback program.
■ J.C. Penney Co. rose 33 cents to $8.29 after Standard & Poor’s raised its outlook on the retailer’s debt, saying Penney’s performance ‘‘has begun to stabilize.’’ Last week Penney posted its first gain in two years at stores open at least a year.