All the turmoil in Washington isn't bothering Wall Street in the least bit.

The Dow, S&P 500 and Nasdaq soared to record highs on Wednesday, the fifth-straight day of all-time highs.

It's the first time all three major market averages have achieved that feat since January 1992, according to a FactSet analysis provided to CNNMoney.

"It's downright remarkable, especially because following the news out of Washington is downright depressing," said Ed Yardeni, president of investment advisory Yardeni Research.

The Dow has skyrocketed an incredible 2,279 points since the presidential election. Wall Street has celebrated President Trump's stimulus plans as well as strength in the American economy.

But the latest gains have come in the face of drama in the White House that threatens to derail or at least delay Trump's promises for huge tax cuts and deregulation.

Last week, Trump's immigration executive order was dealt a legal blow, and the president has been dogged this week by the controversy over the resignation of national security adviser Michael Flynn.

And then just as U.S. markets were closing at record highs on Wednesday, restaurant CEO Andrew Puzder withdrew as Trump's labor secretary nominee amid resistance from the U.S. Senate.

"So far, you have to conclude the market doesn't care," said Yardeni. "But at some point the market might care."

Related: Nasdaq notches longest record streak since '99

Wall Street is apparently betting that tax cuts and deregulation are still coming, because despite Trump's troubles, Republicans still control the White House and Congress.

Federal Reserve chief Janet Yellen agrees that Wall Street is reacting to these stimulus plans, especially on the tax side.

U.S. stocks received another boost on Wednesday after Trump said at a meeting with retail CEOs his administration is "doing a massive tax plan. It's going very well."

Asked on Wednesday why stocks have gone up, Yellen said investors are "likely anticipating shifts in fiscal policy that will stimulate growth and perhaps raise earnings."

Wall Street is also hoping that a corporate tax overhaul will encourage companies like Apple (AAPL) and Microsoft (MSFT) to bring that money sitting overseas back to America for dividends, mergers and real investment.

It's no wonder that the Nasdaq has closed at record highs for seven days in a row, something that hasn't happened since the dotcom bubble in 1999.

Related: Trump isn't killing the bull market. Here's why

But how long can this rally really last?

Ryan Detrick, senior market strategist at LPL Financial, warned that in the short term, "things could have gotten a little overdone" in the markets.

But he said the "broad-based strength" of the rally, which includes small and medium-sized stocks, "bodes well for future gains."

For now, investors don't seem bothered by Trump's less business-friendly campaign ideas. That includes a tough stance on trade that could spark a trade war, promises to break up the banks and threats to the independence of the Federal Reserve.

"Love him or hate him, the market is focusing on the bullish aspects of Trump's plan," Yardeni said, "and dismissing the potential bearish ones."