A rally in big technology stocks, a tailwind of economic optimism following the latest big spending plan from the Biden administration and a jump in oil prices combined on Thursday to lift Wall Street to another record, this one punctuated by the S&P 500 index’s close above 4,000 for the first time.
It was a second consecutive day of gains in technology stocks, which had struggled in February and March to keep pace with the rest of the market as investors instead focused on companies that stood to gain the most from the pandemic recovery.
Microsoft rose 2.8 percent on Thursday, a day after it was awarded a contract worth up to $22 billion to make augmented reality goggles for the United States Army. Also sharply higher was Alphabet, which gained 3.3 percent.
The Nasdaq composite climbed 1.8 percent, bringing its gain over the past two days to more than 3 percent. The broader S&P 500 rose 1.2 percent, to 4,020.
“Round numbers can be big psychological barriers for markets, so breaking 4,000 could provide a confidence boost to stocks in the short term,” said Lule Demmissie, president of online banking and trading firm Ally Invest. “And we think the market has room to run longer term, too.”
The rally was the latest in a series of record closes for the S&P 500. The index notched five high-water marks in March, carried by the so-called cyclical parts of the market such as energy, industrial and financial shares, which tend to do better than the rest of the market when the economy is on an upswing.
But Thursday’s gains were largely driven by technology shares, which, because of their sheer size, can influence the direction of the entire market.
These stocks have been sensitive to rising yields on government bonds, falling as interest rates climbed sharply last month. But as interest rates have stabilized technology shares have rebounded. The decline of the yield on the 10-year Treasury note below 1.70 percent on Thursday likely gave tech stocks another lift.
Energy stocks also rose sharply, along with oil prices, after the Organization of the Petroleum Exporting Countries and its allies agreed on Thursday to a gradual increase in output starting in May. Increases in oil supply tend to dampen prices, but analysts described the agreement as modest enough not to hurt.
West Texas Intermediate, the U.S. benchmark, climbed about 3.5 percent to $61.22 a barrel, and shares of Marathon Oil and Diamondback energy, for example, were up more than 10 percent.
The mood in financial markets also has been lifted this week by more signs of economic recovery in the United States and abroad. On Thursday, a measure of manufacturing activity rose to its highest since 1983, the Institute for Supply Management said. A weekly report on unemployment claims showed an uptick in the number of people applying for benefits, but investors will get a more complete picture of the job market on Friday when the employment report for March is released.
Analysts also pointed to President Biden’s $2 trillion infrastructure plan, unveiled on Wednesday, as a tailwind. The proposal includes money for repairing roads and bridges, building affordable housing and caregiving facilities, and expanding access to broadband. And it comes just weeks after the passage of a nearly $2 trillion stimulus bill that could raise consumer spending by sending payments directly to Americans.
Mr. Biden proposed paying for the infrastructure plan with an increase in corporate taxes, but many on Wall Street had already anticipated that.
“Biden’s proposed tax increases have been discussed for months, so few were surprised by their inclusion,” Mark Haefele, chief investment officer at UBS Global Wealth Management, wrote in a note to clients on Thursday, though he and other analysts did note that Mr. Biden could yet propose other tax increases — including one on capital gains from investments.
On Friday, markets will be closed in the United States, Europe and some other countries for Good Friday.
Eshe Nelson contributed reporting.