Our nation’s political debate has become so polarized, it was only a matter of time before your stocks got dragged into the mess.

It didn’t take long for CEOs at over a dozen U.S. companies to weigh in against President Donald Trump’s travel restrictions.

Let’s not get into the merits of Trump’s policy, aside from the horrendously sloppy execution that was troubling from a guy who ran on his supposed management prowess.

Whatever the merits, or lack thereof, the potential downside for you as an investor in the storm that ensued was apparent pretty fast.

Trump supporters, for example, immediately promised to unleash a boycott against Starbucks SBUX, +0.76% , even though the coffee chain’s pushback against the president was fairly innocuous. Essentially, Starbucks said: “We’ll hire more refugees.”

Other consumer-facing companies that openly took on Trump, like Ford F, -0.28% , Amazon.com AMZN, -2.47% , Twitter TWTR, +1.30% , Apple AAPL, -2.95% , Netflix NFLX, -2.44% and Microsoft MSFT, -1.78% , could face similar challenges.

Since Trump is unlikely to stop being controversial, and CEOs with big egos are unlikely to stop pushing back when they see fit, now is a good time to ask the following: Is it OK for companies to be messing with your portfolio like this? After all, you’re supposedly the boss as a shareholder, and boards and CEOs are supposedly working for you.

The short answer is “yes,” according to several corporate-governance and business experts. Let’s look at their logic first. Then we’ll get into some of the risks to your stocks that experts may be overlooking, just as they may have overlooked Trump’s prospects for victory during the election.

Enlightened self-interest

One of the most telling Trump pushbacks came from Goldman Sachs GS, +1.35% CEO Lloyd Blankfein, according to Columbia Law School professor and corporate-governance expert John Coffee. Blankfein left a voicemail to employees saying the policy is bad for the company, and rightly so. “A lot of the companies that have been outspoken get a very large percentage of their revenue internationally. And this looks like an attack on internationalism, which could hurt them,” says Coffee.

To his point, a big part of Starbucks’ response was to note that it has opened nearly 600 stores in Mexico since 2002, and that it has bought coffee beans there for three decades. The bottom line: Starbucks wants to build bridges on the border, not walls, said CEO and founder Howard Schultz, in a statement.

CEOs have an enlightened self-interest at home, too. “Companies have to be careful with what they do, but they are also members of society and they are affected by the broader society in which they operate,” says Bruce Freed, president of the Center for Political Accountability, which promotes greater transparency in corporate political campaign donations. That includes “the type of market they have and even basic things like the spending power of consumers,” he says.

As examples, he cites corporate support for racial integration in the U.S., and opposition to apartheid in South Africa, even if this may have alienated some customers at the time. “There are issues where companies do have a broader responsibility as a member of society. So they have to take a stand, even at a cost to shareholders,” says Freed.

Standing by core values

It’s also important to remember that just like people, companies can have “core values” they have to stand by, points out Columbia Business School professor William Klepper. CEOs have an obligation to “speak up if an executive order is contrary to their stated values,” he says.

One reason is that these “core values” can be part of why customers buy from them.

Starbucks’ stated mission is to “inspire and nurture the human spirit — one person, one cup and one neighborhood at a time.” So it makes sense that the company would want to support refugees by hiring them, one at a time. Apple has always been outspoken and iconoclastic, and that’s part of what draws consumers to its product. “That is their style. They aren’t to going to hide what their position is,” says Coffee.

Next, a lot of large companies are “culturally progressive” because it appeals to their diverse work force, says Eric Dezenhall, CEO of Dezenhall Resources in Washington, D.C., a crisis-management consultancy. “I am not at all surprised that corporate leaders have pushed back on the travel issue because the benefits of appeasing their work force, including not getting sued, outweigh their fears of ticking off POTUS over a policy that has been wildly unpopular in the dominant media culture,” says Dezenhall.

As a practical matter, tech companies hire a lot of foreign nationals, so they’re going to naturally resist travel restrictions because that’s in their interest.

Boycotts don’t work

Then there’s the little matter of the ineffectiveness of boycotts. “It is easy to make pronouncements that you are not going to drink Starbucks coffee and organize a boycott. But it never seems to work,” says Howard Anderson, who has taught at Harvard Business School and MIT’s Tuck School of Business. “I don’t think it makes too much difference. Every airline I have flown on I have sworn I would never fly on again, and guess what. I am still flying.”

Facebook targets TV ad dollars with set-top video app

Motley Fool Inside Value editor Rich Greifner, who follows Starbucks closely as an investor, agrees that boycotts won’t have “a meaningful impact on Starbucks’ long-term ability to generate free cash flow” or its intrinsic value.

But is it different this time?

All of these points make a lot of sense, of course. But it’s hard not to notice we have moved into a new era politically. And so companies, and you as a shareholder, may face greater risks with their political activism. Just as almost everyone discounted Trump’s potential during the elections, analysts may now overly discount the power of Trump supporters to do real damage to companies via boycotts. There are, after all, a lot of Trump supporters out there, and they are passionate.

Besides, boycotts can work. According to consumer surveys, the Chick-fil-A brand took a hit after activists openly challenged the opposition to same-sex marriage espoused by the restaurant’s president, Dan Cathy, points out Ira Kalb, assistant professor of clinical marketing at USC Marshall School of Business. The lesson? In general, companies should avoid getting “embroiled in political issues” if their customers are likely to be split on the topic, he says.

Tweetstorms

Then, of course, there’s the risk of retaliation from Trump himself. He’s got a track record of being vindictive against perceived antagonists, like the CNN reporter who was openly denied the opportunity to ask a question at a press conference.

And Trump’s twitter account can move stocks. He’s shaved tens of billions of dollars off the biotech sector with a single tweet on drug pricing. Other tweets have sparked temporary setbacks in the shares of Lockheed Martin LMT, +0.77% and Boeing BA, +2.42% .

There’s also the possibility that Trump could roll out government spending or policy decisions fine-tuned to target companies — as he’s threatened to do with Ford over plant locations, and Lockheed and Boeing over the amounts these companies charge the government for aircraft.

“Never in my career have I seen a president strike such terror into the hearts of senior corporate leadership,” says Dezenhall, at Dezenhall Resources. “Corporate chiefs now believe they are facing an absolute ruler versus a broad-based government. And they are trying to figure out where on the spectrum of avoidance to confrontation they need to be. As a general rule, avoidance is the better of your bad options.”

In short, laying low may mean the presidential tweetstorm moves on to another target. “So why go to war?”

Besides, as much as CEOs make, openly taking on the president may be above their pay grade. “It’s not the job of a CEO to be gratuitously tough; it’s the job of a CEO to create and maintain value for shareholders,” says Dezenhall. “Getting into an unnecessary war with POTUS could become a fire-able offense if the share price tanks.”

Reform begins at home

If this seems overly obsequious, then here’s a modest proposal for you and all the politically activist CEOs who risk tanking their stocks by taking on Trump.

Why not start close to home, with your social activism?

Many economists lament the widening of the wealth gap under President Obama. They cite it as a continuing source of social unrest, which often turns violent. Lavish CEO pay packages have definitely contributed to the wealth-gap problem, including those at companies now taking on Trump — like Starbucks, Ford, Facebook FB, -3.26% , Amazon.com and Apple.

If the CEOs at these companies really want to make the world a better place, why not take a two-thirds pay cut, sell two-thirds of your company stock, and redistribute all the money to the bottom 20% of your workforce in the form of a pay hike? After all, this would have a measurable impact on the growing wealth gap. And it could even change the world by example.

Who knows, it might even help shareholders by putting CEOs more in touch with customers, and reality. “I think this explosion of CEO pay has been very damaging for companies because it puts CEOs in a rarified category,” says Freed, at the Center for Political Accountability. “Many of them are out of touch.”

Starbucks, Ford, Facebook, Amazon.com and Apple all declined to comment on whether their CEOs might consider adopting my modest proposal. So in fairness to these companies, I’ll point out that a lot of their CEO pay comes in the form of stock and options grants. So shareholders benefit along with them. And in the cases of Starbucks, Amazon.com and Facebook, the CEOs are founders who deserve a lot of credit for creating solid companies — and lots of jobs.

At the time of publication, Michael Brush had no positions in any stocks mentioned in this column. Brush has suggested SBUX, AMZN, NFLX, FB and GS in his stock newsletter, Brush Up on Stocks. Brush is a Manhattan-based financial writer who has covered business for the New York Times and The Economist group, and he attended Columbia Business School in the Knight-Bagehot program.

Read next:This, not Donald Trump, is the true revolution upending stock-market investing