Here's how the Trump rally stacks up against other presidents

President-elect Donald Trump is sworn in as President on January 20, 2017 at the US Capitol in Washington, DC.
Mark Ralston | AFP | Getty Images
President-elect Donald Trump is sworn in as President on January 20, 2017 at the US Capitol in Washington, DC.

After weeks of sizzling post-election gains, it looks like the stock market isn't quite sure what to make of PresidentDonald Trump as his administration officially takes office.

In the first few weeks after the billionaire's stunning victory in November, stocks soared in a "Trump rally" that produced a post-election victory not seen since voters sent Dwight Eisenhower to the White House in 1952.

Investors were apparently betting that Trump's campaign pledges to cut corporate taxes and eliminate red tape would be good for corporate profits.

But since mid-December, the Trump rally has taken a breather and stocks have largely tread water. That may be because the stock market also hates uncertainty. And in the last month, Trump's erratic tweets and conflicting policy statements from his cabinet nominees have given investors plenty of uncertainty to ponder.

Yet if history is any guide, investors in the Trump era may be in for a rocky start, but may be rewarded if they hold on. Most of Trump's predecessors faced rough market shoals when they first took office, only to see an upturn by the time they departed.

The stock market's jubilant response to Trump's election was initially compared to the reaction to Ronald Reagan's 1980 defeat of Jimmy Carter. Both Trump and Reagan campaigned on a platform that promised sweeping deregulation, a prospect that investors assume will help companies boost profits.

However, Reagan's post-election rally fizzled within weeks, thanks to an aggressive series of interest rates hikes in late 1980 aimed at snuffing out double-digit inflation. Between Election Day and the end of the year, short-term rates surged from 14 percent to just more than 20 percent.

Stock investors were ultimately rewarded during the Reagan administration, which followed through on its promises with major deregulation of industries such as telecommunications, among others. Still, those returns were sharply curtailed by the crash of 1987, which wiped out more than 25 percent of the market's value in a single week.

The biggest market rally for a change in administration followed the swearing in of Lyndon Johnson after the assassination of President John F. Kennedy in November 1963—which sparked a sharp sell-off. Within weeks, the market had recovered and continued to move higher.

Over the past six decades, however, stock market moves in the early days of a change of administration aren't necessarily a great predictor of investor returns over the full term of the incumbent.

The Kennedy administration had gotten off to a strong start. In the first 100 days after the inauguration in January, 1961, stocks jumped by 18.5 percent, as the U.S. economy shook off the economic drag from a recession that ended a month after Kennedy took office.

Former president Barack Obama had the worst first 100 days of any post-war president, with the stock market and the economy in the throes of the worst financial crisis since the Great Depression.

His predecessor, George W. Bush, also had a rocky start to his first term, after taking office in the middle of a major bear market sparked by the unwinding of the 2000s tech bubble.

However, that bubble helped the Clinton administration chalk up the best stock market performance of the last 11 presidents. During his eight years in office, the S&P 500 index soared from 433 to 1,343—a gain of more than 200 percent.

Obama turned in the second-best stock market performance, despite the financial crisis that raged at the start of his presidency. The market lost another 15 percent during his first two months in office before bottoming out. As of Friday, the S&P 500 was up 182 percent since he was first inaugurated in January 2009.

The financial crisis left his predecessor with the worst stock market record of the last 11 presidents. Markets under Bush's second term were briefly in positive territory, but those gains were more than wiped out by the crisis of 2008.