President Donald Trump just announced 5 percent tariffs on Mexican imports in an effort to curb Mexican immigration to the U.S., and China just doubled its tariffs on U.S. goods to 25 percent, much to the dismay of the tech sector.

Trade groups and lobbyists say the trade wars will dramatically weaken the U.S. tech industry.

“Mexico is not only one of our top trading partners, it’s the number one export market for American consumer technology sector products – $41 billion worth of U.S. consumer tech sector goods in 2017, almost double that of our next highest export market,” the Consumer Technology Association said in a May 31 statement. “If Mexico reciprocates with tariffs of its own, our country’s employers and workers will end up paying twice over for the administration’s misguided trade policies.”

Information Technology Industry Council President Jason Oxman also condemned the tariffs in a statement, calling them “not an appropriate tool to address serious immigration challenges.”

“Their use in this context undermines the high-standard, market-opening trade rules that allow the United States to compete globally and lead in innovation, and if enacted, would threaten economic growth,” he said.

But Big Tech companies like Apple, Google and Microsoft and consumer electronics retailers like Amazon, Best Buy, Target, Walmart and others are actually in pretty good shape to withstand external shocks like tariffs.

RapidRatings CEO James Gellert told InsideSources that given the financial health of these companies (rated by RapidRatings), the trade war shouldn’t impact their outlook too much.

RapidRatings rates public companies’ financial health on a scale of 0-100. Companies closer to 100 are more financially sound, while companies closer to zero or below 60 are at greater risk to default.

“If you go back to the core concept that financial health ratings are indicative of companies’ resilience and positioning, then a company like Best Buy is in pretty good shape,” Gellert told InsideSources. “Alphabet and Apple are all in relatively good shape. The core health is the other thing to look at, particularly a shock from a trade war when you don’t know how long it will last.”

The financial health of retailers like Amazon, Best Buy and Target hovers around a 71, which means they are well-positioned to withstand a trade war. That doesn’t mean tariffs won’t do some damage, but it does mean the financially healthier companies could siphon business away from competitors who raise prices in order to offset the tariff costs.

“They have to absorb it and it will impact their margins and EPS,” Gellert said. “So without question tariffs will hurt these companies from a stock perspective to some degree and weaken the company, but you’d rather be looking at a company that’s really strong.”

Some analysts worry Apple will need to dramatically raise prices of iPhones in order to offset tariff costs, but the concern may be hyperbolic given Apple’s financial condition.

“Apple has the ability to weather a lot of storms because they are strong, they’ve got great brand loyalty and a tremendous amount of cash,” Gellert said. “While Apple’s margins could suffer for a handful of quarters or years, Apple is not at risk of falling over because of a higher supply chain cost. They are also looking at diversifying [their supplier base] away from China into other areas where we don’t have the same trade friction.”

Because of the back-and-forth tariffs, tech suppliers from other countries, particularly in Asia and South America, are increasingly attractive to U.S. tech companies and retailers. Ironically, a few Chinese tech suppliers recently set up shop in Mexico according to Latin America Reports, hoping to avoid the effects of the China-U.S. trade war.

But Gellert doesn’t think the Mexico tariffs will have quite the same impact as the China tariffs — furthermore, it’s not the big companies like Apple and Microsoft or the retailers like Best Buy and Target that will suffer, it’s the smaller companies farther down the supply chain.

The only Big Tech company that might really suffer is Qualcomm, which RapidRatings rates at a 59. Ultimately it’s not the tariffs that really damage company, Gellert said, because healthy companies are able to withstand those kinds of external shocks.

“When you look at a multi-year trend, you have to realize there are things happening inside of the company that are weakening it, and that needs to be assessed when it’s under stress,” Gellert said.

Follow Kate on Twitter