The duo, along with strong gains in industrials, pushed the Dow Jones Industrial Average up 0.75 percent to 25,079.59.

The S&P 500 gained 0.51 percent to trade at 2,712.32 and the Nasdaq Composite rose 0.47 percent to 7,177.39.

“A lot of investors are looking for opportunities or pull backs to put money to work, there’s still a lot of cash out there looking for something to do,” said Scott Brown, chief economist at Raymond James in St. Petersburg, Florida.

“I think we’re back to ‘buy the dips’ mentality here.”

A Labor Department report showed U.S. producer prices rose 0.4 percent in January, but only matched economists’ estimates and likely helped further ease fears that inflation was picking up faster than expected.

That comes a day after strong January consumer prices data raised fears of inflation and faster interest rate hikes. A report showed an unexpected fall in retails sales last month. But after a dip, the market closed higher Wednesday.

” … The ability of the markets to spit out bad news in terms of the higher inflation, weaker sales is a pretty strong sign,” Brown said.

The S&P 500 has now surged about 5 percent since last Thursday, but is still 5.5 percent below its record high on Jan. 26.

Benchmark 10-year U.S. Treasury yields hit a new four-year high of 2.9040 percent on strengthening expectations of a rate hike in March. But while yields have been on the uptick since the CPI data, they have not come at the cost of stocks.

A further boost to markets came from a continued fall in a key measure of near-term volatility. The CBOE Volatility index was at about 18-point mark on Thursday, well off the 50-point peak touched last week.

Also underpinning many investors’ confidence is the view that the U.S. economy remains on strong footing as well as the expected boost of tax cuts on corporate profits.

Among the 11 major S&P sectors, the energy index and the telecoms index were in the red, falling 0.54 percent and 0.25 percent, respectively.

TripAdvisor gained about 14 percent after the company reported better-than-expected quarterly revenue.

Advancing issues outnumbered decliners on the NYSE by 1,856 to 716. On the Nasdaq, 1,541 issues rose and 799 fell.