Stocks climb after President Trump addresses China tensions.

Stocks staged a late-day rebound on Friday, climbing after President Trump gave a long-awaited news conference on China without laying out any new tariffs or sanctions against the country.

Investors had spent most of Friday bracing for Mr. Trump to unveil new measures aimed at punishing China, after Beijing moved to strengthen its authority over Hong Kong, a semiautonomous Chinese city that enjoys special trade and financial relations with the United States.

Mr. Trump said that he would ask his administration to revoke special privileges afforded to Hong Kong, including on trade and law enforcement, and that it would impose sanctions on certain Chinese officials. Both those measures have been discussed by other administration officials and lawmakers in recent days.

“My announcement today will affect the full range of agreements we have with Hong Kong,” he said, including “action to revoke Hong Kong’s preferential treatment as a separate customs and travel territory from the rest of China.”

The S&P 500 posted a small gain for the day, the last trading session in May, leaving the benchmark stock index up more than 4.5 percent for the month. Technology companies, which are particularly sensitive to tension with China because the country serves as an important manufacturing hub and market, rallied.

Combined with a 12.7 percent gain in April, it was the best two-month jump for the markets in 11 years, a rise that reflects investors focus on the return of economic activity in regions were locked down in an attempt to fight the coronavirus, as well trillions of dollars’ worth of monetary and fiscal stimulus that has surged into financial markets and consumer bank accounts in recent weeks.

“The market has sort of intuitively decided that the worst of the Covid risk is behind us,” said Steve Sosnick, chief strategist at Interactive Brokers in Greenwich, Conn.

That may prove incorrect. There’s no guarantee that current efforts to reopen will go smoothly. Experts say infections could begin to rise again as people begin to return to their normal activities. A second wave of infections in the fall remains a possibility.