U.S. stocks on Wednesday climbed for a third session after U.S. industrial production rose more than projected, Yahoo's earnings topped estimates and Federal Reserve Chair Janet Yellen reiterated the central bank would keep up its backing of the recovery.
Stocks held most of their gains as Federal Reserve Chair Janet Yellen addressed the Economic Club of New York Wednesday afternoon and after the release of the Fed's Beige Book, which found the U.S. economy bounced back from weather-related declines in recent weeks, with modest or moderate economic activity in eight of the Fed's districts.
"The economy is still moving forward. What is happening in the marketplace is outside the scope of the Beige Book; what you're seeing in the marketplace is a question of valuation," said Frank Fantozzi, CEO of Planned Financial Services in Cleveland, Ohio.
In her speech, Yellen reiterated her intention to support the recovery even as the labor market improves, with the 6.7 percent unemployment rate in March still a percentage point higher than the central bank's projection of full employment.
"There is general skittishness, (and,) one of the more important things really is options expiration has moved up a day, so there's a ton of intraday volatility. Also we have some big earnings tonight and tomorrow," JJ Kinahan, chief strategist at TD Ameritrade, said of the market's recent swings.
"It's a big day today, we've got 17 out of the S&P 500 reporting, and so far it's been more good than bad. There is more positive forward guidance than negative, so things will pick up in the second half of the year," said Chris Gaffney, EverBank senior market strategist.
"And, we had industrial production come out on a positive note this morning, supporting the notion that the economy is heating up with the weather," Gaffney said.
Yahoo surged after reporting robust sales at Alibaba Group Holding, the Chinese e-commerce company in which it holds a 24 percent stake. Intelgained a day after the chip manufacturer reported a quarterly profit that surpassed Wall Street estimates.
"Earnings aren't as terrible as people thought they were going to be," said Jack Ablin, chief investment officer at BMO Private Bank.
Bank of America fell after posting a first-quarter loss as the lender settled claims tied to mortgage bonds. PNC Financial Services Group rose after the regional bank reported first-quarter profit that beat expectations.
Economic data had U.S. manufacturing output rising for a second straight month in March, with factory production up 0.5 percent last month and overall industrial production climbing 0.7 percent, beating expectations.
Another report from the Commerce Department had the pace of U.S. home construction bouncing back less than expected last month, with the data coming after a report Tuesday that showed homebuilder confidence rising less than projected in April.
The jumped 19.33 points, or 1.1 percent, to 1,862.31, with industrials leading gains that extended to all 10 of its major sectors.
The Nasdaq climbed 52.06 points, or 1.3 percent, to 4,086.23. The technology-heavy index during Tuesday's session fell to within 0.3 percent from a 10 percent correction from its March 6 high.
For every share on the decline, four rose on on the New York Stock Exchange, where 675 million shares traded. Composite volume approached 3.2 billion.
Data from China had the world's second-largest economy expanding by 7.4 percent in the first quarter of 2014, slowing from a 7.7 percent increase in the final quarter of last year.
"I don't think we're going to see a hard landing in China," said Gaffney, who added that the country is taking steps to shore up their economy as it transitions from one driven by exports to one fueled by consumption.
The dollar fell against the currencies of major US trading partners and the yield on the 10-year Treasury note used in figuring mortgage rates and other consumers loans added 2 points to 2.637 percent.
Crude-oil futures for May delivery rose 1 cent to $103.76 a barrel; gold futures for June delivery settled $3.20 higher at $1,303.50 an ounce. The precious metal fell below its 200-day moving average on Tuesday, its worst session since December.
—By CNBC's Kate Gibson
Coming Up This Week:
Earnings: General Electric, BlackRock, Goldman Sachs, Morgan Stanley, Blackstone, DuPont, Union Pacific, Pepsico, Chipotle, Baker Hughes, Sherwin-Williams, Fifth Third, AutoNation, Sonoco Products, Snap-on Mattel, Cypress Semiconductor, Baxter, Taiwan Semiconductor, Rockwell Collins
8:30 a.m.: Jobless claims
10:00 a.m.: Philadelphia Fed survey
Markets closed for Good Friday
10:00 a.m.: Leading indicators
More From CNBC.com: