The post-Trump rally over the past year is the fifth best since 1950, according to LPL Financial.

The best returns were seen after the start of President Bill Clinton's second term, and the worst came after the first year of President George W. Bush.

US President Donald Trump has long touted the stock-market rally that's taken hold since he took office.

The S&P 500 has closed at a record high in 60 of 251 sessions — or about 24% of the time.

"Stock market hit yet another all-time record high yesterday," Trump tweeted on November 7. "There is great confidence in the moves that my Administration...."

As Wednesday is the first anniversary of his election, we decided to look at how the rally over the past 12 months stacks up against those seen after other presidential elections.

The team at LPL Financial put together a list looking at S&P 500 returns for the year following every US election since 1950 and found that the post-Trump rally of 21.1% ranks fifth out of 17.

"Although no one at the time would have believed it, the 12 months since Election Day have been among the least volatile ever for equity markets; not to mention the solid 21% gain the S&P 500 Index racked up along the way that has the bulls smiling," Ryan Detrick, senior market strategist at LPL Financial, said.

Although Trump has recently touted the postelection stock rally as "virtually unprecedented," the data from LPL Financial suggests otherwise.

While the last year's rally is among the highest on the list, there were both similar and greater rallies.

The best returns were seen after the start of President Bill Clinton's second term; the worst came after the first year of President George W. Bush's tenure.

And for what it's worth, similar gains were seen in the year after President Barack Obama was reelected for his second term.

As for which stocks contributed the most to the S&P 500's rally in the last year, that would be: Apple, Microsoft, Facebook, Alphabet, and Amazon, according to data cited by CNBC's Shannan Siemens and Carl Quintanilla.

In any case, ultimately, the president alone does not dictate what happens with the market.

Yes, investor sentiment after an election can have an impact. And, yes, presidential policies affect the economy and investor sentiment, which then in turn can drive markets.

But there are a bunch of other factors not wholly connected to presidential policies — such as oil-price shocks, productivity shocks, the strength of the US dollar, corporate earnings, and international-policy initiatives such as China's devaluation of its currency — that all influence what happens with the stock market.

Plus, we must reiterate that the US stock market is not the US economy.

Even LPL Financial said the best gains came under Clinton "during the 1990s bull market" and the worst under the Bush "amid the tech bubble," implying that there is more to the market than just who's sitting in the White House.