Fiber optic cables carrying internet providers are seen running into a server room at Intergate.Manhattan, a data center owned and developed by Sabey Data Center Properties, during a tour of the facility in lower Manhattan, in New York Thomson Reuters After the initial shock-and-awe reaction to the surprise Trump victory, the markets rejoiced last week… a lot.

“The Dow closed at an all-time high on Thursday, while the S&P and the Nasdaq were flirting with their record highs entering Friday,” reported CNBC.

Others were less thrilled with the election result. Some experts claimed Trump’s plans to raise tariffs on China, withdraw from NAFTA, and otherwise stop globalization in its tracks would surely set off a trade war and hurt the markets.

I disagree.

I think Trump can’t start a trade war because we are already in one. It’s been going on for years, right under our noses… and it’s happening in cyberspace.

US data collection hurt tech giants

Thanks to Edward Snowden, we learned in 2013 that US intelligence agencies were gathering massive amounts of data from both Americans and foreigners.

To make sure no terrorist was left behind, then-NSA Director Gen. Keith Alexander employed a simple strategy: “ Collect it all. ”

Like it or not, Microsoft (MSFT), Google (GOOGL), and Yahoo (YHOO) must comply with the US government’s orders, which means giving them your data equals letting Washington read your e-mail.

That didn’t go over well with foreign governments and customers of the “Big Three.” We don’t know if the NSA’s data intrusion stopped any terrorists—but we do know that it’s taught the rest of the world not to trust US technology firms.

The result: Today, we see “data localization” laws requiring businesses to keep customer data inside a country’s borders. These are simply trade tariffs in disguise because they impose costs on moving data across national borders.

That’s a real problem when you want to store data centrally so it’s accessible anywhere, anytime… which is the whole point of cloud technology.

The European Union, for instance, is “harmonizing” the way businesses store personal data with a new General Data Protection Regulation. To comply, the tech industry must rebuild its infrastructure, which makes cross-border data transfer more expensive—much like a tariff would.

Earlier this year, Internet Association president Michael Beckerman told a congressional panel, “Forced localization is nothing more than protectionism, really. It hurts trade and investment. The way the Internet works is a free flow of information across borders, not requiring companies to build data centers.”

I guess the last sentence is wishful thinking at this point, because that’s probably not what the future of data transfer looks like.

Russia’s data localization laws restrict US business

Russia's President Putin holds a glass during a ceremony of receiving diplomatic credentials from foreign ambassadors at the Kremlin in Moscow Thomson Reuters Another piece of evidence that data localization laws can have teeth: Last week, a Russian court ruled that business social network LinkedIn (LNKD) could be banned because it stored Russian citizens’ data outside the country.

Experts see this as a warning to other social networks like Facebook (FB) and Twitter (TWTR), which also operate in Russia.

LinkedIn is being acquired by Microsoft, which has other issues with Russia. The country’s Federal Anti-Monopoly Service says Microsoft isn’t giving Russian anti-virus companies like Kaspersky fair notice about security changes in the Windows operating system.

Is Moscow protecting its people from harm, protecting Russian companies from competition, or is this something else?

I don’t know, but it doesn’t really matter. The whole point of a social network is to network. It’s much less useful if you can’t reach people in other countries.

That makes the company itself less valuable—another hidden trade tariff.

Hardware companies also got hit

The equipment that moves and processes US data is hitting border checks, too.

In 2014, journalist Glenn Greenwald set off Silicon Valley alarm bells with some photos from Snowden’s NSA data trove. Taken from a 2010 NSA internal newsletter, the images showed NSA workers intercepting product shipments of networking giant Cisco (CSCO). They opened the boxes, implanted spyware, and then sent them on to customers. No one ever knew a thing.

Cisco executives freaked out. CEO John Chambers fired off a letter to President Obama, saying:

We simply cannot operate this way; our customers trust us to be able to deliver to their doorsteps products that meet the highest standards of integrity and security… We understand the real and significant threats that exist in this world, but we must also respect the industry’s relationship of trust with our customers.

It was a nice try, but too late. Instead of respecting Cisco’s hard-won customer loyalty, the US government exploited it without even asking permission—and sure enough, Cisco’s sales to emerging-market countries plunged that quarter.

It got worse, too.

A few months later, Chinese authorities ordered government agencies, banks, and state-owned enterprises to begin purging foreign computer gear and replace it with Chinese-made alternatives.

More recently, China has been demanding foreign companies accept “security reviews” that critics say are just attempts to swipe US technology for Chinese firms.

Washington has its own national security review process for foreign companies that want to buy US assets. It has blocked transactions with Chinese tech companies like Huawei, which of course cried foul.

What is all this if not a secret trade war?

Technology buyers increasingly react to these hassles and fears by preferring locally made equipment, even when their governments don’t force them to. That’s bad news if you are a tech company with global aspirations.

Trump wants to weaken encryption

While President Trump probably can’t solve these problems, he could potentially make them worse.

For example, he’s been talking about forcing Apple (AAPL) to start making its iPhones in US factories. He also said the government should make Apple decrypt a phone belonging to the dead San Bernardino terrorists.

Trump ally Sen. Richard Burr (R-NC), who just won reelection, tried last year to pass a bill that would have forced US tech companies to give the government “backdoor” access to encrypted memory. It will likely pass if he tries again this year.

The tech industry fiercely opposes weakening encryption, arguing it makes everyone’s data vulnerable to hackers and give foreign buyers another reason to avoid US products.

American tech companies dominate the world because their products work anywhere and anyone can use them. The developing cyber trade war gives a leg up to foreign competitors.

If you own any tech stocks whose growth plans include customers outside the US, you might want to review their valuation.

Don't assume borders will always be as open to trade as they are now. The gates are closing fast.

Subscribe to Connecting the Dots—and Get a Glimpse of the Future

We live in an era of rapid change… and only those who see and understand the shifting market, economic, and political trends can make wise investment decisions. Macroeconomic forecaster Patrick Watson spots the trends and spells what they mean every week in the free e-letter, Connecting the Dots. Subscribe now for his seasoned insight into the surprising forces driving global markets.