Wall Street notched another set of milestones Monday as the Dow Jones industrial average closed at a record high for the 12th consecutive time, the longest winning streak for the 30-company average in 30 years.
The Standard & Poor’s 500 index, the benchmark favored by professional investors, also set a record.
The latest push into the record books came on an indecisive day for US stocks that had indexes wavering between small gains and losses for much of the day. They ultimately eked out tiny gains, led by energy stocks, which climbed as the price of crude oil rose.
Many investors were taking a wait-and-see approach ahead of President Trump’s speech to Congress on Tuesday, hoping for details of promised tax cuts, infrastructure spending, and other business-friendly policies.
‘‘It’s all about policy now,’’ said Phil Blancato, CEO of Ladenburg Thalmann Asset Management. ‘‘There’s only so much the market can deliver when there’s still these many unknowns.’’
The Dow rose 0.1 percent, to 20,837.44. The S&P 500 also gained 0.1 percent, to 2,369.73. The Nasdaq composite added 0.3 percent, to 5,861.90. Small-company stocks fared better than the other indexes, sending the Russell 2000 up 1 percent, to 1,407.97.
The last time the Dow had a longer winning streak was in January 1987, rising 13 days in a row. That streak translated into a gain of 11 percent. Nine months later, on Oct. 19, 1987, the Dow plummeted more than 500 points, or 22 percent, on Black Monday.
But that doesn’t mean a similar market slump is in the cards now, said Ryan Detrick, at LPL Financial.
One key difference is that the Dow went on to gain another 30 percent in the months after the 13-day streak in January 1987. By comparison, the Dow is now up about 5.4 percent this year, so there’s a long way to go before the market becomes as stretched as it was 30 years ago, he said.
Talk of more defense spending gave a lift to defense contractors Monday. Raytheon added 0.9 percent, Northrop Grumman gained 1.4 percent, and Lockheed Martin climbed 2 percent.
Expectations the Trump administration will ramp up infrastructure spending gave materials companies a boost. Martin Marietta rose 2.5 percent, while Vulcan added 2.4 percent. Summit Materials gained 2.1 percent.
Traders also weighed the latest crop of company earnings and outlooks.
Tegna climbed 3.5 percent after the media company’s earnings beat estimates. Power company AES fell 6.6 percent after its full-year profit forecast disappointed investors.
Consumer stocks were among the biggest decliners. Kroger slid 3.2 percent, while Whole Foods Market dipped 1.5 percent.