Is Trump's post-election stock market rally so remarkable?

President Donald Trump is eager to tweet about the stock market, telling his followers the S&P 500's rise reflects "great confidence" in his administration. But is the rally in the first year following his election win one for the record books? 

Yes and no, according to an analysis of the stock market's performance at the first-year election anniversaries of U.S. presidents. The Standard & Poor's 500 index, the broadest measure of the stock market, has notched 61 record highs and climbed 21.3 percent in the year since Trump was elected.

That puts the stock market rally in the year since Trump won the election at fifth among all rallies experience by presidents in the first year after their election victories going back to 1950, according to LPL Financial. In terms of first-term election anniversaries, Trump's rally exceeds the S&P 500's gain of all but two presidents since World War II: George H.W. Bush (21.7 percent) and John F. Kennedy (27 percent), according to CFRA Research.

When including second-term elections, Trump's post-election rally trails the S&P 500's gain in the first year after the second-term elections of Clinton (31.7 percent) and Obama (23.4 percent).

Yet the Trump post-election stock market surge outpaces the market's performance in the same postelection period of several other modern-era White House occupants, including Ronald Reagan (-3.3 percent), Bill Clinton's first-term election (10.3 percent) and Barack Obama's first-term election win (3.9 percent). 

The billionaire's surprise electoral victory initially set off a steep sell-off in Asian markets. But by the end of the day on Nov. 9, 2016, global markets had steadied and the S&P 500 index closed sharply higher. The market's rally continued for several weeks, driving the major U.S. stock indexes to record highs. This year, stocks have gradually moved higher, clocking new milestones for the indexes along the way.

Eight years into the bull market, investors have been betting that Trump and a GOP-controlled Congress will have a clear pathway to cut taxes, relax regulations and enact other business-friendly policies, despite legislative stumbles that have delayed the administration's efforts.

But Wall Street analysts credit the market's gains mainly to strong corporate profits.

"The most important thing that's happened is we've had very good earnings seasons," said JJ Kinahan, chief market strategist at TD Ameritrade. "Companies are making money. Earnings drive the market and earnings have been good."

Investors have also continued to bet big on economic growth in the U.S. and worldwide as economies in Europe and Asia have bounced back, Kinahan noted.

Since Trump's election, technology companies have led the way with a 39 percent surge. Banks and industrial and basic materials companies have also soared. Only phone company stocks are down from a year ago.

During the first presidential debate between Trump and his Democratic rival Hillary Clinton in September 2016, Trump cautioned that the stock market was in bubble and that even a small increase in interest rates would bring the market "crashing down."

That's not happened, even though the Federal Reserve has been raised interest rates twice this year and is expected to do so again next month.

On average, the S&P 500 has continued "sailing along" for another year after a president's first-term election anniversary, before declining 10 percent or more, said Sam Stovall, chief investment strategist at CFRA Research.

He notes that the shortest time was 36 days following Kennedy's first election anniversary, while the longest stretch was nearly four years after Clinton was elected.

"Should history repeat, and there is no guarantee it will, this bull (market) could continue to surprise investors with its resiliency," Stovall said.