All 10 S&P 500 sectors rose on the day, with most climbing more than 1 percent. The benchmark index is now 1.4 percent away from its record closing high, recovering much of its recent weakness, which took the index down as much as 6 percent.
Republican leaders in the US House of Representatives caved in to demands by President Barack Obama and agreed to advance legislation increasing Washington's borrowing authority, removing a potential market headwind.
Yellen, who has just stepped into the Fed's top job, emphasized continuity in the central bank's policy strategy of cutting asset purchases by $10 billion a month, saying she strongly supports the approach of her predecessor, Ben Bernanke. In her first public comments as Fed chief, Yellen also said that while the U.S. unemployment rate has fallen recently, labor market conditions needed to improve further.
"No one was really expecting a major debt ceiling showdown or changes in tapering, but anticipation is one thing, and the experience is another," said John Carey, portfolio manager at Pioneer Investment Management in Boston. "Everyone is more relaxed now that those issues are officially off the table."
The Fed's policies have been credited with driving the market's steep gains in 2013, and those accommodative measures are expected to keep a floor under stock prices for as long as they continue. However, had the pace of ending the program been slowed, it may have raised concerns that the economy was still not strong enough to grow on its own.
The Dow Jones industrial average was up 219.12 points, or 1.39 percent, at 16,020.91. The Standard & Poor's 500 Index was up 22.70 points, or 1.26 percent, at 1,822.54. The Nasdaq Composite Index was up 48.55 points, or 1.17 percent, at 4,196.72.
The S&P 500 rose above its 50-day moving average for the first time since January 24, a technical resistance level that could fuel further gains if convincingly held.
More From This Section
Sprint Corp , the No. 3 U.S. mobile provider, reported quarterly revenue ahead of analysts' expectations and said it added wireless subscribers in the fourth quarter. The stock shot up 2.6 percent to $7.89.
CVS Caremark Corp shares climbed 2.7 percent to $68.74 after the company posted higher quarterly profit as it processed more prescriptions.
Of the 357 companies in the S&P 500 that have reported earnings through Tuesday morning, 67.8 percent have beaten profit expectations, above the long-term average of 63 percent, according to Thomson Reuters data. Almost 66 percent have topped revenue forecasts, above the historical average of 61 percent.
On the downside, the shares of both Dean Foods Co and ConAgra Foods slumped after the companies gave weak outlooks. Dean Foods warned of a first-quarter loss while ConAgra cut its full-year outlook. Dean's stock slid 7.9 percent to $14 while ConAgra's stock lost 6.5 percent to $29.04.
Infloblox Inc shares plunged 47 percent to $17.58 after the network equipment maker estimated second-quarter revenue below analysts' average forecast.
Cadence Pharmaceuticals Inc surged 26.6 percent to $14.01 after the company agreed to be acquired by specialty pharmaceuticals company Mallinckrodt Plc for about $1.3 billion. Mallinckrodt climbed 12.1 percent to $66.46.