The president came out swinging last week, directly pointing his finger at the Federal Reserve for the softening economic data and the stock market meltdown.

In fact, President Trump went so far as to say that the Fed is the “biggest risk” to the US economy.

He went so far as to blame Fed Chair Jerome Powell, saying in an interview last week, “It almost looks like he’s happy raising interest rates.”

Many believe it is political taboo for a president to comment on the Fed’s rate increases and actions. But ex-Chairman Alan Greenspan, who served under four presidents, said recently that every administration made its feelings known to him that it preferred low rates.

Besides, the president is right.

It’s simple: The Fed has gone too far, too fast in raising rates.

And the effect of the rate hikes pales in comparison to the Fed’s message about how many future moves it expects — expectations that are always wrong.

The Fed has two mandates: to control the rate of inflation and to create an environment that nurtures full employment.

The current inflation rate as measured by Friday’s gross domestic product report for the last quarter had prices rising 1.6 percent on an annualized basis — below the 2 percent level the Fed seeks.

Remember, we endured a sluggish decade in which wages and prices grew well below the 2 percent level.

And it seems counterintuitive for the Fed to cite a labor shortage as a reason to raise rates.

What is the first thing an employer will do if his business costs rise due to higher borrowing costs? He will put off hiring new employees.

Do that to 10,000 businesses, and you see unemployment begin to tick up.

What the Fed really is accomplishing with its forecast of four rate hikes through 2019 is to take the wind out of stocks and housing prices, which are barely back to where they were 10 years ago.

The average S&P 500 is off more than 20 percent from its highs this year as rates take a toll along with tariffs.

Let’s not forget the Federal Reserve has a long history of being wrong on inflation and completely overshooting its target, sending the economy into the doldrums.

Let’s hope Powell can learn from history, stop hiking rates on a hair trigger and take a little time to assess a hike’s effect.

He can always come back and revisit the inflation issue in 2019.