The presidential election is fast approaching, and the candidates are bashing international trade. Both are opposed to the latest trade deal, the Trans-Pacific Partnership. Donald Trump would go so far as to jack up tariffs on China and Mexico.

The candidates are wrong to trash trade. They should embrace it.

We do run a trade deficit with the rest of the world - we import more combined goods and services than we export - but this isn't costing us lots of jobs. Indeed, after you tot up all the positives and negatives from trade, it is an unambiguous net positive for the economy and our national security.

Our trade deficit is entirely in consumer products, such as vehicles, clothes, and consumer electronics, and despite the fracking boom we still need to import petroleum products, primarily from Canada and Mexico.

If these things were produced here at home, would they mean more U.S. jobs? Yes. But all of us would be paying much more for many of the items we buy at Walmart, on Amazon, or at any other retailer. We would thus have less money to spend on other things, things that are produced here, and support jobs here.

These goods are produced overseas because they require lots of unskilled labor. That doesn't describe the typical American worker, who is highly skilled. It makes little sense to have our skilled workers using their talents to make these low-value-added products.

Meanwhile, we run a large and growing trade surplus in services. This includes tourism, which is one of the most important sources of job creation across many U.S. communities.

Services also include education, financial services, health care, accounting and legal services, media and entertainment, and logistics. When SpaceX puts a satellite into orbit for a foreign telecommunications company, it is exporting a service.

These activities create lots of jobs. Some are relatively low-paying, as in tourism, but most are very high-paying. More important, a lot more of these jobs are set to be created here at home because the rest of the world is now wealthy enough to afford our services, and no one in the world is better at them than we are.

It would be very dark irony for us to step back from global trade just when it is set to be an enormous boon for our economy.

This brings us back to the TPP, the trade deal that both candidates have disavowed. This is a deal among 12 Pacific rim nations, including us. Tariffs would come down as part of the deal, but more important, it puts in place protections for intellectual property. Think Coke's secret formula or Apple music. The TPP is currently in front of Congress for an up-or-down vote.

It won't be a huge deal for our economy if the TPP never becomes law. The best research shows little direct impact on U.S. jobs.

But it is a big deal for our national security. The pact would bind us closer to many up-and-coming emerging economies in Southeast Asia and Latin America. This is especially important given China's aggressive economic and military posture in that part of the world. China is very notably not part of the TPP.

More broadly, the closer the world is tied together through trade, investment, and immigration, the less likely the world will resort to conflict, armed or otherwise. That's because our interests will be aligned. It won't be in anyone's interest to hurt their trading partners, because they would be effectively hurting themselves.

While more trade is good for our economy, it is critical to recognize it isn't good for everyone in our economy. There are winners, and there are losers. There are many disillusioned and even angry former manufacturing workers, in Pennsylvania and in mostly Midwestern and Southern towns, who lost their jobs over the years because of trade.

This is why trade is front and center in the presidential debate. However, the answer to these folks isn't to pull back from trade; it is to help them gain the skills needed for better jobs, many of which will be created by increased trade. This means providing the taxpayer dollars needed for effective re-education and job training.

The answer also includes investing in our dilapidated infrastructure. Not only will these steps create jobs in the same places where people are out of work because of trade, it will also make our businesses more internationally competitive.

Corporate tax reform that scales back tax breaks for specific companies and industries and uses the revenues to pay for lower tax rates for all businesses would go a long way to improve our competitiveness, too.

None of this is to say that we can't strike better trade deals. TPP has its problems, and perhaps the next president will work to strike a better arrangement for us, but killing TPP and pulling back from trade is a bad idea.

Mark Zandi is chief economist at Moody's Analytics help@economy.com