Stocks rose on Monday, with the Standard & Poor’s 500 and the Dow Jones industrial avereage hitting record highs with technology stocks in favor again.

The S&P 500 index rose 0.83 percent to 2,453.46 and surpassed its old record, set nearly a week ago, by half a percent. The Dow added 144.71 points, closing at 21,528.99.

advertisement | advertise on newsday

The Nasdaq composite jumped 1.42 percent to 6,239.01.

Tech heavyweights, which had been among the stock market’s biggest stars until recently, led the way. After being up more than 20 percent for the year, tech stocks in the S&P 500 fell sharply two Fridays ago on worries that they had risen too much, too quickly. In a little more than a week, tech stocks lost about a fifth of their year-to-date gains.

On Monday, Apple rose for just the second time since two Thursdays ago. It jumped $4.07, or 2.9 percent, to $146.34 for its second-best day of the year so far. Google’s parent, Alphabet, rose $16.60, or 1.7 percent, to $975.22. Altogether, tech stocks in the S&P 500 rose 1.7 percent, the largest gain among the 11 sectors that make up the index.

It’s just the latest example of investors steeling themselves and “buying the dip.”

“For the time being, investors are thinking, ‘We can’t afford not to be in this market,’ ” said Nate Thooft, senior portfolio manager at Manulife Asset Management. — AP