Marissa Mayer will pocket $186 million when Verizon fully acquires Yahoo next month — in yet another example of a CEO being paid for luck rather than performance.

Yahoo’s core business stagnated under Meyer’s leadership. However, when she took the job, she inherited Yahoo’s 15 percent stake in Alibaba, the Chinese e-commerce colossus. Alibaba’s increasing value caused Yahoo stock to double over her five-year tenure. And so Meyer will be rewarded handsomely for the stocks and options she holds in her company — for essentially doing nothing.

This is how “pay-for-performance” works in corporate America.

The CEO pay system, loaded with massive stock options and stock awards, inevitably leads to pay-for-luck. Stock market upswings — not the CEO’s performance — determine most of their gains from options. General market conditions account for 70 percent of any individual stock’s movements.

When the market rallies, the CEO can make money even if the company is performing poorly. If the market is up, say, 15 percent, a well-managed company should be up by 15 percent or better. Meanwhile, a poorly managed company in this same market could see a boost of less than 15 percent, giving the CEO an undeserved bump. Similarly, a CEO who’s loaded with stock options will benefit when the Fed lowers interest rates or when Wall Street falls in love with the particular industry that his or her company falls into, even if the company itself is flagging.

“Pay-for-luck” means that CEO performance and rewards are completely divorced. The Wall Street Journal’s 2014 pay survey found that only one of the 10 highest-paid CEOs ranked among the top 10 percent by investor performance. Five rigorous academic studies have found little, or even negative correlation between CEO pay and performance. The most comprehensive of these, a study of 1,500 companies, found that the more a CEO got paid, the worse the shareholders did. The top 5 percent of companies in CEO pay did 15 percent worse, on average, than their peers.

Even worse is that CEOs never suffer like shareholders, who gain when the stock goes up and lose when the stock goes down. Instead, CEOs always win when their stock goes up and break even when their stock goes down because they paid nothing for their options. Therefore, the CEO has an economic interest in taking more risk than the shareholders would.

Stunningly, companies do not even include a CEO’s gains on stock and stock options as part of their reported compensation. For example, Nike reported that CEO Mark Parker’s total compensation was $47.6 million in 2016. But he also received $53.7 million from exercising stock options, an amount not included as compensation.

Where did this $53.7 million come from? According to the company, it came from the tooth fairy.

Stunningly, companies do not even include a CEO’s gains on stock and stock options as part of their reported compensation.

The rest of the shareholders lost money because their shares were diluted when Nike printed more shares to give to the CEO. The fact that shareholders bought their stock on the open market while Parker was given his for nothing is a distinction that Nike does not find germane.

It would be hard to design a worse compensation system for CEOs. Pay-for-luck. Encourage risk. Keep shareholders in the dark.

If people understood the insane level of true CEO pay, maybe things would change. The Securities and Exchange Commission should require companies to disclose true CEO pay with gains on stock and options included.

If that happened, the resulting outrage might become so intense that boards and politicians would seriously consider curbing excessive CEO compensation. My favorite remedy is a luxury tax, a levy used by Major League Baseball to control player salaries. Every MLB team in the US pays a luxury tax if its payroll exceeds $195 million, which is then redistributed to other less wealthy teams who can’t afford big ticket players. The more a payroll exceeds $195 million, the higher the tax rate.

The IRS should do the same to corporations. For every dollar over $6 million that a company pays an executive, it should pay a dollar in luxury tax to the US government. This would include all forms of compensation including gains on stock options and golden parachutes.

Is this very simple solution politically possible? Yes, if CEO pay becomes a big political issue. After all, who wants to run on the platform of “Pay the boss more”? In fact, this may be the sole issue on which both Trump and Clinton voters totally agree.

Steven Clifford is the author of “The CEO Pay Machine: How it Trashes America and How to Stop It” (Blue Rider Press), out now.