When President Bill Clinton was impeached in 1998 the US economy was doing well and the stock market was booming.

Those good times for investors are being echoed now during the impeachment proceedings against President Trump.

This may sound superficial, but the mood of the country during these trying political times is what matters the most. And that mood is mostly dictated by how the country is doing economically and how voters are doing financially.

So, what is the same and what’s different between 1998 and 2020? Who had (or has) the better environment in which to go through impeachment, Clinton or Trump?

Let’s start with the economy. Twenty-two years ago, the gross domestic product was growing at an impressive 4.5 percent rate, and the impeachment lasted until February 1999, when the annual rate was even better, hitting 4.8 percent.

Meanwhile, Trump’s impeachment is occurring when annual growth is in the 2-plus percent range. The numbers for 2019 aren’t out yet, but expansion has slowed from 2018’s 2.9 percent.

Nevertheless, 2-percent growth is being seen as the new normal — and most economists view the president’s record as a success.

My conclusion: Since people have lived through the Great Recession, they now seem as content with a 2-percent economy as they were with 4 percent-plus growth during Clinton’s impeachment.

Just in case they aren’t, the president returned to this theme on Tuesday, saying the GDP would be growing at 4 percent annual rate if it weren’t for the Federal Reserve.

As far as the all-important job market is concerned, it’s Advantage, Trump.

As readers of this column know, the US Labor Department’s measurements of jobs and joblessness are flawed. But when the numbers are backed up by anecdotal evidence, like the stories of the difficulty companies are having hiring workers, then the stats become more believable.

Back in 1998 the unemployment rate was 4.4 percent.

Today’s rate is much better, 3.5 percent, for all of 2019. But it’s also the perception that’s important.

What’s more, voters of a certain age clearly remember the grim days of the Great Recession in 2009, when the jobless rate was a staggering 9.9 percent. So today’s 3.5 percent — the lowest in 50 years — feels even better given the vast improvement in 11 years.

Plus, the current excellent job market isn’t leaving out minority groups. It’s hard to kick a president out of office when he can credibly claim he is creating jobs.

In terms of the stakes for the two impeached leaders, Clinton was not up for re-election in 2000, while Trump’s troubles are happening in an election year.

So, Clinton scores the advantage because his reputation was the only thing at stake in the 1998 impeachment. Not only is Trump’s reputation at stake but so is his job.

Clinton’s impeachment also made the public aware of the process for removing a president. That makes for less shock value among voters and the markets this time around.

The Fed and rates: The advantage here goes to Clinton even though borrowing costs today are a lot lower than they were back in the late ’90s. In fact, it was better for Clinton because rates were higher back then.

Because rates were substantially higher in ’98 (when the Fed funds rate started the year at 5.5 percent), there was more room for the Fed to cut borrowing costs than today when that rate is between 1.5 percent and 1.75 percent.

The Fed, however, has new (and in my opinion, dangerous) tools nowadays that can help Trump. The Fed could return to the quantitative easing money-printing it started during the Great Recession.

In fact, many people (myself included) think the Fed already has done so with the desperate repurchase agreements, or repos, of government securities that have been going on during the past few months.

The banking environment: The one thing that can change Fed policy and shake up the nation is a problem with the banking system.

In 1998, the Fed was cutting rates and everyone assumed it was because of problems with a hedge fund called Long-Term Capital Management, whose massive problems threatened to infect the whole banking system.

The added advantage of the rate cuts helped the nation’s economy during the disruptive Clinton impeachment.

There’s no crisis of equal proportion — at least not yet — that the Fed can use as an excuse to cut rates during the Trump impeachment, although the frantic repo action recently led some people to wonder if bad stuff is happening in the banking system that the public doesn’t know about it yet.

The stock market: The Dow Jones industrial average rose more than 2,000 points, or 17 percent, during the few months of Clinton’s impeachment proceedings.

That was the era of the dot-com bubble. People were happy and the impeachment was basically a sideshow to that happiness.

That market euphoria wouldn’t last, but it continued long enough to help Clinton.

Stocks are booming again today, and one wonders how long this euphoria will last?

Well, impeachment isn’t the final act of today’s political drama. As I’ve said in this space before, that will come when Attorney General Bill Barr and US Attorney John Durham have their say in the coming months.

It remains to be seen how stocks will respond then.