President Donald Trump has been tweeting more frequently about the stock market, whose record-setting performance has been one of the highlights of the 45th president. But it turns out, equities were advancing even more quickly in the early days of President Barack Obama.

S&P Global Market Intelligence compiled S&P 500 SPX, -1.11% performance for each postwar president, through the July of each president’s first term.