A revival in technology shares alongside budding optimism about the global recovery pushed the world’s most important stock index past 4,000 for the first time.

The S&P 500 rallied as much as 0.7% to a record as investors weighed President Joe Biden’s newly unveiled $2.25 trillion stimulus plan ahead of Friday’s U.S. employment report, which is expected to show the quickest pace of hiring in five months. While it took almost five years for the index to rise from the 2,000 milestone to 3,000 in July 2019, the latest 1,000-point trip took about 21 months.

The S&P 500’s recent climb has largely been built on a surge in energy and financial shares as the vaccine rollout picks up speed. That’s pressured Treasury yields higher and boosted inflation expectations, sending cyclical stocks—those more sensitive to economic swings—upward. However, a moderation in the bond selloff’s breakneck pace has breathed life back into tech stocks, the benchmark’s biggest sector, which have struggled amid the rise in rates.

“The market at 4,000 now is a much broader and better S&P 500 than it was at the peak of February 2020,” said Arthur Hogan, chief market strategist at National Securities Corp. “It’s not just being driven by a handful of megacap technology stocks, it’s actually being driven by a broad-based sponsorship across almost all 11 of the S&P sectors. I think that’s a much healthier place to be.”

The S&P 500 has climbed 6.5% in 2021, with the energy and financial sectors rocketing 29% and 15% year-to-date, respectively. That’s helped the benchmark outpace the tech-heavy Nasdaq 100’s 1.6% rise this year as the once-relentless stay-at-home stocks fade.

However, given how prevalent tech stocks are in the S&P 500, it’s unclear how much the gauge can rally if the sector falls too far behind. Tech stocks make up nearly 27% of the index, whereas financials and energy combined clock in at 14.1%.

“People are optimistic about growth, about the reopening of the economy, about going back to normal as a result of the vaccine rollout,” said Omar Aguilar, chief investment officer of passive equity and multi-asset strategies for Charles Schwab Investment Management. “But it’s a tug-of-war between growth and inflation.”

With assistance from Lu Wang and Claire Ballentine.

This article was provided by Bloomberg News.