U.S. equities rose on Thursday, putting the major indexes close to all-time highs, as investors parsed through economic data and Federal Reserve Chair Janet Yellen's testimony.
The Dow Jones industrial average closed about 35 points higher, with Home Depot and Goldman Sachs contributing the most gains. The blue-chips index closed lower on Wednesday, snapping a seven-day winning streak.
"There's a couple of things at play this week that keep the market in its trend," said Daniel Deming, managing director at KKM Financial. "Some of it has to do with options expirations. ... Also, that sector rotation has continued."
The S&P 500 rose 0.47 percent, with financials rising 1.25 percent to lead advancers. The Nasdaq composite outperformed, rising around 0.74 percent. The three major indexes were also less than half a percent away from hitting record highs.
Yellen, the head of the Federal Reserve, testified in front of Congress. In prepared remarks, Yellen said a rate hike could be "appropriate relatively soon," adding there are dangers to waiting too long to tighten monetary policy. Yellen also said she would not step down from her until her term is done.
A large number of market participants expect the central bank to raise interest rates next month. According to the CME Group's FedWatch tool, market expectations for a December rate hike were around 90 percent Thursday.
"Janet Yellen has further cemented the argument that a rate could take place next month. For us, it is a Done Deal and the question which we are focused on is if the Fed is sensitive to Treasury yields," Naeem Aslam, chief market analyst at Think Markets, said in a note. U.S. Treasury yields rose on Thursday, with the two-year note yield near 1.03 percent and the benchmark 10-year yield around 2.28 percent as of 3:23 p.m.
KKM's Deming said "we're getting to the point in interest rates where investors are going to be second-guessing valuations in the equities market."
The U.S. stock market has enjoyed a sharp rally after the U.S. election, with Republican Donald Trump's surprising victory over Hillary Clinton raising the prospects of higher infrastructure spending as well as financial deregulation. Since Nov. 9, the SPDR S&P Bank ETF (KBE) has risen around 10 percent entering Thursday.
"The market is probably a bit overexcited. There is still uncertainty over the finer details of his policies," said Ernesto Ramos, head of equities at BMO Global Asset Management. "I agree [with the view] that there is room for a bit of a pullback." However, he added that "any rollback in Dodd-Frank would be huge for banks."
Think Market's Aslam said "inflation is not something which is going to shoot up over night." "Donald Trump's package of 1 trillion of fiscal spending is not going to come at once- but in tranches, and timing will be critical as well. So do not get carried away too much on this."
Thursday also saw a number of economic data reports release, as housing starts soared more than 25 percent in October, while weekly jobless claims dropped to their lowest level since November 1973. Meanwhile, October CPI rose 0.4 percent, in line with expectations.
"If you were looking for some silver linings in the economic data, the housing starts ... and the jobless claims are two of them," said Art Hogan, chief market strategist at Wunderlich Securities. "I think the market has been doing a pretty good job of trying to price in a Trump administration, and now we're pricing in an improving economy."
"We can speculate about what the world is going to look like in Jan. 20, but we don't have to do that with the economy," he said.
In oil markets, U.S. crude futures for December delivery fell 0.33 percent to settle at $45.42 per barrel, as evidence of global oversupply weighed, including Wednesday's report from the Energy Information Administration, which showed a larger-than-expected stockpile build.
"Directionally, this has been very consistent. The trigger and the speed a t which it's moved have been a bit surprising," said Bill Northey, chief investment officer at the Private Client Group at U.S. Bank.
In corporate news, retail giant and Dow component Wal-Mart reported mixed quarterly results, beating earnings estimates but missing sales expectations. Wal-Mart shares fell around 3.3 percent. Best Buy, on the other hand beat both top and bottom-line estimates, lifting its shares rise 14.8 percent.
The gained 10.18 points, or 0.47 percent, to end at 2,187.12, with financials leading six sectors lower and real estate lagging.
The Nasdaq composite advanced 39.39 points, or 0.74 percent, to 5,333.97.
Advancers were a step ahead of decliners at the New York Stock Exchange, with an exchange volume of 838.65 million and a composite volume of 3.741 billion in at the close.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded lower, near 13.4.
Gold futures for December delivery fell $7 cents, to settle at $1,216.90 per ounce.