Before the Fed lowered its target interest rate range on Wednesday, Donald Trump was already on Twitter, touching on two of his favorite topics: how the Fed doesn't lower interest rates enough and that the stock market's performance is thanks to him and his Republican pals.

The connection between a president and equity markets isn't straightforward. Many factors—the general health of the economy, investors sentiment, interest rates, financial stimulus, and global business conditions, for example—affect how stocks perform. But presidents also aren't unimportant.

"Policies may or may not be helpful for economic growth," says Kenneth Orr, CEO of investment research firm and value investment fund manager KORR Acquisitions Group. "Policies are led by the President and his Administration, but Congress must pass laws and budgets to affect those policies."
Because the market had already run up a long way before Trump was elected, the absolute numbers would be misleading. Instead, Fortune compared the performance under each president to his initial inauguration day to get an accurate comparison of growth under each.