(Jorge Ribas/The Washington Post)

NEW YORK — In what some are calling the “Trump rally,” investors are pushing U.S. stock markets to new heights in anticipation that the president-elect will work with the Republican-led Congress to lower taxes and pass more business-friendly policies.

In the five weeks since Donald Trump’s surprise win, traders have rushed into the market, accelerating gains that had been building all year. Their enthusiasm had the Dow Jones industrial average flirting with a record-high 20,000 mark that once would have seemed unattainable in 2016.

For now, many are willing to look past potential stumbling blocks that lie ahead for the U.S. economy. The Federal Reserve , for instance, is beginning to raise interest rates—it bumped up a key lending rate Wednesday, a move that traditionally has added costs for businesses—and the global economy is bracing for Britain's pending departure from the European Union.

There’s also the risk that Trump himself could disrupt global trade with protectionist policies, perhaps stirring a backlash from China. Investors have already learned to beware of Trump’s Twitter account: The president-elect sent shares in Lockheed Martin, and the rest of the defense industry, tumbling after lashing out at the cost of the company’s F-35 fighter jet earlier this week. Boeing, too, has felt his wrath and a pharmaceutical industry that once looked forward to less red tape reeled when the president-elected vowed to bring down drug prices.

Even before Trump’s election, some market analysts were warning that stock prices were too high given recent corporate financial results.

Specialist trader Mario Picone wears a "DOW Almost 20,000" cap as he works at his post on the floor of the New York Stock Exchange on Thursday. (Brendan Mcdermid/Reuters)

“A pullback in this market would certainly be healthy. Trees don’t grow to the sky,” said Art Hogan, chief market strategist at Wunderlich Securities.

Trump, too, spent much of his presidential campaign raising caution about the rising U.S. stock market, calling it a “big, fat, ugly bubble” and warning that investors would soon be “wiped out.” (His spokesman said he sold his entire portfolio in June).

And yet, as shares have pushed even higher, Trump‘s supporters have embraced the rally as a referendum on his pro-business policies, creating ever higher expectations for quick results once he assumes office.

Just Thursday, the National Association of Home Builders reported that U.S. builders’ confidence jumped to the highest level in more than a decade.

“This notable rise in builder sentiment is largely attributable to a post-election bounce, as builders are hopeful that President-elect Trump will follow through on his pledge to cut burdensome regulations that are harming small businesses and housing affordability,” Ed Brady, chairman of the trade group, said in a statement.

The Dow, an index of 30 large publicly owned companies, has long been viewed as a proxy for the broader market, but its movements can be affected by big swings in individual stocks. About 20 percent of the Dow’s rise over the last month is due to one company that market analysts say could benefit greatly from Trump’s policies: Goldman Sachs.

The Wall Street giant’s stock has soared amid expectations that his administration will roll back regulations put in place to rein in the banking sector after the 2008 financial crisis. It hasn’t hurt that Trump picked Goldman veterans to lead the Treasury Department and chair his team of economic advisors.

Goldman Sachs has not been the only beneficiary. Virtually every other sector of the market has also felt a lift in recent weeks.

Investors are enjoying the ride. Many traders have talked openly about holding onto their shares this year in hopes the taxes they pay on gains could be lower next year.

Institutional investors and other big traders, meanwhile, have shifted money out of bonds, a traditional safehaven during economic turbulence, to snap up more stock and ride the momentum. The combined market value of the 500 companies tracked by the Standard & Poors 500 has climbed nearly $1 trillion since Trump was elected.

“It is the difference between investing for a slow-growing economy and investing for strong growth,” said Jeff Carbone, a managing partner for Cornerstone Financial Partners.

In nearing the 20,000 threshold, the Dow has staged an improbable recovery in a year that started with massive selloffs as economists worried about China’s rocky economy and falling oil prices, and then panicked when Britain voted to leave the European Union. Now, investors who began the year hoping to just break even are experiencing one of their most profitable periods in years.

“The world doesn’t change when the Dow hits 20,000. That is simply a psychological barrier,” said David Schiegoleit, a managing director at U.S. Bank. But “it can’t be ignored because market psychology can be self fulfilling. It could generate enthusiasm that will turn markets even higher.”

Much of that enthusiasm appears tied to expectations that Trump will usher in a period of deregulation and lower taxes. Trump has also, for example, that said he would lower the corporate tax rate and encourage companies that currently hold more than $2 trillion in profits overseas, where it can’t be taxed by the Internal Revenue Service, to bring that money back to the United States. Those companies may try to use some of the cash they bring back to pay dividends for shareholders or to buy back their stock, reducing the supply and pushing up the prices for the shares that remain, market analysts said.

Lower corporate taxes could also help revive the market for companies wishing to go public, which has languished in recent years, market analysts say. Only about 105 companies are expected to go public by the end of the year, half as many as would occur during a typical year, according to Renaissance Capital, a manager of funds focused on initial public offerings.

“Everything we see now says that 2017 should be a very strong year for IPOs,” said Kathleen Smith, a principal at Renaissance Capital.

But there are also warning signs.

Twenty years ago, Nobel laureate economist Robert Shiller developed a system for determining whether stocks may be overvalued by comparing the stock price of companies listed on the S&P with corporate profits over a 10-year period. A high ratio indicates that stocks may be too expensive, the theory goes. That ratio climbed to 27.9 last week , a relatively high level.

But even for Shiller, Trump complicates the picture. When the ratio is “high like it is now, it suggests that returns will be weak,” he said. But Trump “is a unique political figure and it is difficult to measure his affect on the market.”

“Trump seems to have some powers of persuasion, inspiration that have propelled the economy since he was elected,” Shiller said. “In the long term it might not work out as well, but at least in the short run” it is propelling stocks forward.

Even some Trump enthusiasts are beginning to worry the recent market exuberance may be overblown. Billionaire investor Carl Icahn was one of Trump’s earliest and most vocal Wall Street supporters and when stocks initially tumbled upon his election, Icahn left the Republicans’ victory party to snap up about $1 billion in stock, later lamenting that he hadn’t bought more.

But now, Icahn told CNN, “it’s gone too far.”

“I personally think it’s a little overdone,” Icahn said of the stock market’s rise.