NEW YORK — Stocks closed broadly higher on Wall Street Thursday as investors welcomed a report showing the US job market continues to climb out of the crater created by the coronavirus pandemic. The S&P 500 rose 0.5 percent, its fourth-straight gain. The index ended the holiday-shortened week with a gain of 4 percent. The Nasdaq composite climbed to another all-time high, aided by more gains in technology companies. Energy companies notched some of the biggest gains as oil prices strengthened on hopes that a recovering economy will mean more demand. The rally wasn’t impervious to worries about the virus outbreak. News that Florida had another sharp increase in confirmed cases helped cut the S&P 500’s early gains by more than half. The bond market also signaled caution, as yields moved broadly lower. Materials stocks in the S&P 500 rose 1.9 percent, the biggest gain among the 11 sectors that make up the index. Vulcan Materials led the pack, adding 4.2 percent. Energy stocks also notched solid gains. Noble Energy jumped 7.8 percent. The energy stocks benefited from hopes that a recovering economy will restore some of the demand for oil that vanished in the spring as people stopped driving, airplanes were left parked in the desert and factories went idle. Benchmark US crude oil for August delivery rose 83 cents to settle at $40.65 a barrel. Brent crude oil for September delivery rose $1.11 to $43.14 a barrel. US markets will be closed Friday in observance of Independence Day.