Donald Trump’s chief economic adviser, Gary Cohn, pocketed somewhere between $47 million and $235 million by selling his Goldman Sachs stock earlier this year.

The sum was massively fattened as a result of the Goldman Sachs GS, -2.91% stock boom that has followed Trump’s election victory.

And it also included somewhere between $4.5 million and $22.5 million that Cohn, the investment bank’s former president, saved by cashing out just before Goldman’s recent stumble.

You can file this under “Swamp, Draining of.”

Oh, yeah, and Cohn also saved millions more, thanks to a massive tax break, courtesy of his new job at the Trump administration.

That’s Donald Trump for you. Making America Great Again, one Wall Street millionaire at a time.

Government documents

Documents provided to MarketWatch by the federal government’s Office of Government Ethics show that Cohn sold his stock between January and March of this year, in a series of transactions, at an estimated average price of $240.

That represented a huge gain in the stock price since Trump’s election victory. Early last November, when the stock market expected Hillary Clinton to win, Goldman traded for just $180.

Read:Should Wall Street fear a government shutdown? Here’s how stocks fared during past closures

By amazing good fortune, Cohn also managed to cash out just before Goldman’s recent stumble, which has taken the shares down to $218.

Nice work.

We don’t know the exact figures, incidentally, because the government documents provide only ranges for the value of each transaction.

Lucky man

Cohn is presumably the beneficiary of good fortune, and not of anything nefarious. He sold because he was required to when he joined the administration. The transactions would presumably have been handled by his brokers.

But, as they like to say, it’s better to be lucky than to be good.

And if you think this is the end to Cohn’s luck, think again.

Joining the Trump administration is turning into some of the smartest financial planning in history.

When Cohn took the job, the Goldman Sachs board gave him a big, fat, sloppy golden goodbye on the way out the door, and accelerated his future stock and option awards.

And when he sold the stock, he got a wonderful, glorious tax break on his capital gains.

An ordinary schmuck cashing out his company stock would have to hand over 20% of the long-term gains, and up to 43.6% on any short-term.

Cohn? Er ... zero percent.

No kidding.

Tax break for the rich

A special break, available to rich people picked to join the government, lets them cash out and defer their capital gains taxes ... well, possibly forever. All they have to do is sell their stock — to avoid conflicts of interest — and then invest the proceeds in diversified funds.

In other words, it lets them convert a risky, concentrated portfolio into a more stable, diversified one without having to pay any of those icky taxes first.

Those, as we all know, are for the little people.

Yes, Cohn has to pay income taxes on those parts of his rewards deemed income. And he, or his heirs, will eventually have to pay taxes on capital gains when, or if, these diversified funds are sold.

Taxes will also be owed when their kids and grandkids inherit the fortune — unless the Republican Party succeeds in abolishing inheritance tax, as it says it wants to.

Deja vu

Wall Street tycoons, incidentally, have begun a sly misinformation campaign to persuade you that this tax deferral is really no break at all, because taxes have to be paid eventually. Sure. Try telling the IRS you don’t want to pay your taxes until some distant day in the future, possibly after you’re dead, and see what they say.

Gary Cohn’s windfall recalls a previous Goldman honcho. Hank Paulson was able to cash out his entire stake in the bank just before the financial crisis when he joined the Bush administration as Treasury secretary. Once in office, by an amazing coincidence, his actions just happened to help the bank.

Some people say history doesn’t repeat itself, “it rhymes.” Phooey. When it comes to money and politics, I say it repeats itself. Tell me I’m wrong.