Stocks closed at record highs on Wednesday as investors bet on a potential rate cut from the Federal Reserve later this month after the release of weaker-than-expected economic data.

The Dow Jones Industrial Average gained 179.32 points to end the day at 26,966, notching intraday and closing all-time highs. The Nasdaq Composite advanced 0.7% to 8,170.23.