Stocks closed higher Thursday, with the three major indexes closing at new record highs, amid sharp gains in oil prices and strong quarterly results from retailers.
"I think there are two main drivers here. One of them is oil," said Mariann Montagne, senior investment analyst at Gradient Investments. "The other part is this retail rally."
Thursday also marked the first time since 1999 the Dow, S&P and the Nasdaq posted record closing highs on the same day, according to Bespoke.
The Dow Jones industrial average closed about 115 points higher, with 3M contributing the most gains. The 30-stock index also traded above a previous record high of 18,622.01.
The benchmark S&P 500 advanced about 0.5 percent, with energy rising more than 1 percent. The index also briefly traded above its previous all-time intraday high of 2,187.66.
"We have good things happening with the consumer right now," said JJ Kinahan, chief strategist at TD Ameritrade. he also said the positive quarterly results from Alibaba are helping the market, as they show the Chinese consumer is doing well. Alibaba's U.S.-listed shares were up 6.14 percent.
The Nasdaq composite rose about 0.5 percent as the iShares Nasdaq Biotechnology ETF (IBB) gained 1.07 percent.
"This has been a broad-based rally," said Bruce Bittles, chief investment strategist at Baird. "The market is following the broader trend, which is higher."
U.S. oil settled 4.27 percent higher at $43.49 a barrel on comments from the Saudi oil minister about possible action to stabilize prices and as the International Energy Agency forecast crude markets would tighten in the second half of 2016, a day after falling nearly 2.5 percent amid an unexpected build in inventories. "Oil is about stabilization," said Art Hogan, chief market strategist at Wunderlich Securities. "If we get that above $40, we're going to be OK."
Peter Cardillo, chief market economist at First Standard Financial, said "I think oil is going to stay in this $42-$45 range."
U.S. equities have recently traded in a tight range, but have managed to hit record highs. The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 11.7, down 2.4 percent.
Still, Matt Tuttle, CEO of Tuttle Tactical Management, said "what worries me is volatility is so low." "I think this is over-extended." He also said that, "even though everything is bullish, I think we're due for a correction."
"This week feels like [people said] 'let's get in that last vacation before school starts," TD Ameritrade's Kinahan said. "As Labor Day comes and people start getting more serious about the election, ... I think you're going to see more volatility."
"I think the good news from Macy's is they're closing 100 stores," said Maris Ogg, president at Tower Bridge Advisors. "It's a necessary step."
"When McDonald's began to turn things around, they realized they needed to stop opening stores" and reduce their square footage, Ogg said. "We need to see more of the same thing."
"We knew coming into this week that we were going to hear a lot about the consumer," Wunderlich's Hogan said, adding Macy's and Kohl's results "should be a positive" for the broader stock market.
On the data front, U.S. import prices rose unexpectedly in July, according to Labor Department data released Thursday morning.
Import prices edged up 0.1 percent last month after an upwardly revised 0.6 percent increase in June. Economists polled by Reuters had forecast import prices falling 0.3 percent in July after a previously reported 0.2 percent advance in June.
Meanwhile, weekly U.S. jobless claims fell slightly to 266,000.
"This weekly data point remains a broken record in a good way in that the pace of firing's remains muted. This is also not inconsistent with the slowing pace of job gains as we approach the 8th year of this expansion and there are less available bodies to hire," Peter Boockvar, chief market analyst at The Lindsey Group, said in a Thursday note to clients.
U.S. Treasurys fell, with two-year notes yielding 0.75 percent and the 10-year note yield holding near 1.57 percent. The Treasury Department sold $15 billion worth of 30-year notes amid tepid demand.
"I think demand for U.S. paper should be good, even though we're at the long end of the curve," First Standard's Cardillo said.
The dollar rose slightly against a basket of currencies, with the euro trading near $1.114 and the holding around 101.9.
The Dow Jones industrial average closed 117.86 points higher, or 0.64 percent, at 18,613.52, with Nike leading advancers and Wal-Mart the biggest laggard.
The rose 10.30 points, or 0.47 percent, to close at 2,185.79, with energy leading nine sectors higher and consumer staples the only laggard.
The Nasdaq advanced 23.81 points, or 0.46 percent, to end at 5,228.40.
About nine stocks advanced for every two decliner at the New York Stock Exchange, with an exchange volume of 763.27 million and a composite volume of 3.332 billion.
Gold futures for December delivery settled $1.90 lower at $1,350 per ounce.
—Reuters contributed to this report.
On tap this week:
*Planner subject to change.
Earnings: Nordstrom, Petrobras, Planet Fitness, Ruby Tuesday
8:30 a.m. Retail sales
8:30 a.m. PPI
10 a.m. Consumer sentiment
10 a.m. Business inventories