The S&P 1500 construction and engineering index rose 1.4 percent and a gauge of construction materials’ stocks added 1.5 percent.
“If there was something (damning) that’s going to come out, as leaky as things seem to be, we would have heard something more than what we’ve been hearing so far,” said Scott Wren, senior global equity strategist at Wells Fargo Investment Institute in St. Louis, Missouri.
Also supporting infrastructure stocks, specifically steel companies, was an announcement from Commerce Secretary Wilbur Ross that a national security review of the U.S. steel industry will seek to protect the interests of both domestic steel producers and consumers.
The S&P 1500 steel sector index jumped 4.1 percent, the most since April 20.
In his statement, Comey said the president lied in describing their encounters and that he had no doubt that Russia interfered with the election, but was confident that no votes had been altered.
The Dow Jones Industrial Average rose 8.84 points, or 0.04 percent, to end at 21,182.53, the S&P 500 gained 0.65 point, or 0.03 percent, to 2,433.79 and the Nasdaq Composite added 24.38 points, or 0.39 percent, to 6,321.76.
Other analysts were not so rosy about the effect of Comey’s testimony on the Trump agenda.
“It leaves us where we were before. It becomes that much more difficult for the Trump administration to put together a fiscal stimulus package,” said John Canavan, market strategist at Stone & McCarthy Research Associates in Princeton, New Jersey.
“Anything they could put together with tax reform and infrastructure spending would be a lot smaller than had been expected. You are also pushing back the timing on any fiscal stimulus into 2018, possibly in 2019.”
Utilities stocks fell the most on the S&P 500 as Treasury yields rose, tracking German Bund yields, after the European Central Bank upgraded its growth forecast for the euro zone even as it suggested its stimulus plan will remain in place as inflation remains subdued.
The S&P utilities sector was down 0.88 percent, the most since mid March.
Traders kept an eye on the UK as Britons voted in a snap election predicted to give Prime Minister Theresa May a larger parliamentary majority, which she hopes will strengthen her hand in looming divorce talks with the European Union.
Among specific stocks, Nordstrom jumped 10.3 percent to $44.63 after the department store operator said that some members of the controlling Nordstrom family have formed a group to consider taking the company private.
Alibaba shares were up 13.3 percent to $142.34 after the company said it expects revenue growth of 45 to 49 percent in the 2018 fiscal year.
Yahoo, which has a 15.5 percent stake in Alibaba, gained 10.2 percent to $55.71.
Chipmaker Nvidia jumped 7.3 percent to $159.94 after Citigroup reiterated its bullish view on the stock and said longer term it could hit $300.
Advancing issues outnumbered declining ones on the NYSE by a 1.36-to-1 ratio; on Nasdaq, a 1.98-to-1 ratio favored advancers.
About 7.07 billion shares changed hands in U.S. exchanges, compared with the 6.62 billion daily average over the last 20 sessions.
(Reporting by Rodrigo Campos; Additional reporting by Richard Leong and Caroline Valetkevitch; Editing by Chizu Nomiyama and James Dalgleish)
Continue reading the main story