(Reuters) - Wall Street surged on Thursday to notch its fifth straight session of gains, led by Apple and other technology stocks as investors shrugged off recent inflation worries that sent the market into a sell-off at the start of the month.

Apple Inc jumped 3.36 percent and contributed more than any other stock to gains on the S&P 500 after Warren Buffett’s Berkshire Hathaway made the iPhone maker its top investment.

Markets were able to shake off economic data for a second consecutive session that indicated inflation pressures were building while weekly jobless claims data on Thursday pointed to a tightening labor market.

Investors instead focused on recent strong quarterly earnings and expectations that more earnings growth is still to come, thanks to newly-implemented corporate and personal tax cuts.

“In the midst of all the nervousness of the past two weeks, we’re winding out a really strong earnings reporting season,” said Leo Grohowski, chief investment officer at BNY Mellon Wealth Management in New York.

“There were a lot eyes fixating on the PPI number this morning, it came in a little hot. But much like yesterday, the market’s shaking it off.”

Following many forecast increases by corporations in recent weeks, analysts on average now expect S&P 500 companies to increase their earnings per share in 2018 by 18.9 percent, according to Thomson Reuters I/B/E/S.

Cisco surged 4.73 percent following upbeat results and a strong forecast, as the network gear maker’s years-long efforts to transform into a software-focused company began to pay off.

Wall Street investors were not alone in their optimism. Bullish sentiment among individual investors hit its highest level since mid-January in the American Association of Individual Investors’ weekly survey.

The Dow Jones Industrial Average rose 306.88 points, or 1.23 percent, to 25,200.37, the S&P 500 gained 32.57 points, or 1.21 percent, to 2,731.2 and the Nasdaq Composite added 112.82 points, or 1.58 percent, to 7,256.43

Energy was the only major S&P 500 sector index to fall, pulled down 0.42 percent by weaker oil prices.

U.S. Treasury yields slipped as investors took a breather from selling bonds and readjusted positions to prepare for more inflation-related volatility, a scenario that could take yields even higher.

Fears of inflation and higher interest rates had sent the S&P 500 sharply lower at the start of February. In the past five sessions, the S&P 500 has gained 5.6 percent, and it remains down 4.9 percent from a Jan 26 record high.

Advancing issues outnumbered declining ones on the NYSE by a 2.27-to-1 ratio; on Nasdaq, a 2.25-to-1 ratio favored advancers.

Volume on U.S. exchanges was 7.12 billion shares, below the 8.46 billion average for the full session over the last 20 trading days.