Inflation cools
People walk by the New York Stock Exchange on Wall Street in August. Data released by the Commerce Department on Friday show that inflation is cooling. Spencer Platt/Getty Images

Just two days after Monday's downturn, Wall Street surged for the second straight session on Wednesday to set record highs at two of the three major stock indices.

The Dow Jones Industrial Average rose 431 points (1.03%) to close at a record-high 42,513, while the S&P 500 also notched a fresh high by climbing 40 points (0.71%) to 5,792.

The Nasdaq Composite also fared well with a 108-point rise (0.60%) to close at 18,291 as the tech-heavy index fueled many of the gains. Leading Wednesday's rally was Amazon and Apple, which each gained more than 1%.

The gains came as the Federal Reserve's monthly meeting minutes indicate the likelihood of another 50 basis points interest rate cut on the horizon. Investors reacted much the same as they did after the Fed's Sept. 18 rate cut.

Wednesday's rally came despite uncertainty in international and domestic affairs. A brewing conflict in the Middle East threatens to disrupt oil markets and the approach of Hurricane Milton, the second major storm to hit Florida in two weeks, could prove to be one of the costliest in history.

Still, the Fed's words were music to investors' ears. "The Fed is the key thing, that's the big driver," Mike Bailey, director of research at FBB Capital Partners, told CNBC.

"Again, anything can happen at any moment. You wake up and there's a headline about the hurricane, energy. At this point, we're really not seeing a lot of those risks getting priced in."