President Donald Trump loves to boast about the stock market as it continues its meteoric rise to new record highs, but he has good reason to as the markets during his tenure have outperformed when compared to the majority of his predecessors.

Since Trump was elected in 2016, the S&P 500 has seen returns of more than 50%, which is more than double the average 23% for presidents three years into their term, according to Bespoke Investment Group data that runs all the way back to 1928.

This year has been especially good for the S&P 500 under Trump, with returns better than 29% year to date. The average for presidents in the third year of their term is only 12.8% in comparison.

“Year three has been by far the best year of the cycle with an average gain of 12.81%, and the playbook has stuck to the script in year three of the current cycle,” wrote Bespoke Investment Group in a note to clients last month, according to CNBC.

The S&P 500 is now over 3,200 points, which was the seventh round-number milestone the index has hit this year alone. Volatility surrounding uncertainties in the ongoing U.S.-China trade war has spooked business investment a bit, but public market investors are keeping the rally going by putting more money into stocks.

The Federal Reserve has helped drive the market up during Trump’s tenure by cutting interest rates three times in 2019, which the president still thinks isn’t enough as he has called out the central bank and its chief Jerome Powell repeatedly for not lowering rates to zero (or into negative territory).

The 50-year low unemployment rate is at 3.5% as well, and Americans working means Americans spending. Strong consumer activity has helped prop up the economy that has seen some weakness in other sectors, like a four-month contraction in manufacturing.

While Trump’s third year has seen markets surge, it doesn’t look like it will beat the best year ever. That mark was set in 2013 under former President Barack Obama (to Trump’s chagrin) when the S&P 500 returned 32% while recovering from the Great Recession.

Trump’s first year was also strong, with a 19.4% return, around triple the average of other presidents. But the markets stumbled a bit in his second year, 2018, when Wall Street saw its worst December since the Great Depression.

History is on Trump’s side for 2020, too, as the S&P 500 has been up over 72% of the time in past president’s fourth years in office.

Wall Street analysts project markets will continue to go up in 2020, but at a much more modest rate. The average target for the S&P 500 from analysts polled by CNBC is 3,330 points, which would only be 4% higher than Tuesday’s close.

A lot of the market’s success in 2020 will ride on the outcome of trade negotiations between the U.S. and China. The two countries have agreed to phase one of a new deal, but markets weren’t rocked in either direction by the announcement earlier this month, mostly because there are still a lot questions surrounding the overarching deal.

For now, investors can just keep enjoying the markets as they continue to set higher and higher records to finish off 2019.

To our friends: A former hedge fund manager exposes how Wall Street is failing American investors and shows how to prepare for the end of the bull market.