When it comes to President Trump and trade, it’s been all pain, no gain.

Last week began with China retaliating against a planned 10 percent tariff on $300 billion of its exports by letting its currency fall significantly against the dollar. Markets tanked. When Trump announced that he would delay implementing those tariffs, markets regained most of their losses, only to decline steeply again on more trade war fallout, including spillovers to other countries. The “fear” index, which tracks market volatility, has spiked 75 percent over the past month.

I wish I could report some upside to this war of Trump’s own choosing, but there is none. When the Federal Reverse recently cut the interest rate it controls, it cited the trade war as generating business uncertainty and dampening investment. Articles warning of the next recession cite the trade war as a contributor.

But if Trump’s trade policy has been a disaster, with the potential to do lasting damage to supply chains, trade flows, and global stability, it does raise an important question: What does good trade policy look like?

Democrats might know that they stand against Trump’s policies, but coming up with their own plan is harder than you think. For a long time, the party’s top echelon has been captive to free trade orthodoxy. Since Bill Clinton, the theory of the case among the Democratic Party’s elite has been the more globalization, the better — with mostly a deaf ear turned to the people and places most badly affected. Worse, their response to globalization’s excesses has been: “Here’s a new trade deal, much better than the last one.”

Working people were right to disbelieve them. Trade deals, which are necessary to set out the rules by which countries with different systems engage in international commerce, haven’t improved much from the perspective of working-class people on either side of the border. Who benefits from the deals is, unsurprisingly, a function of who gets to write them. For the Trans-Pacific Partnership, Obama’s signature trade pact that never did get ratified, 85 percent of those who gave direct input to US trade negotiators were from “corporate interests and their related trade associations,” according to the Washington Post.

There’s a better approach, one that avoids Trump’s reckless trade war and Democrats’ longstanding alignment with the corporate class on trade. We’ve already heard glimmers of this in the campaign, with Sens. Elizabeth Warren and Bernie Sanders having the most detailed plans thus far. Tellingly, even moderates like former Vice President Joe Biden explicitly recognize the need for a new direction for Democrats on trade. (Disclosure: I was Vice President Biden’s economic adviser from 2009 to 2011.)

The following is a rough guide for a progressive trade policy, one that aims to preserve the benefits of global trade flows while ensuring that those gains flow more equitably to working people both here and abroad. Targeted, not sweeping tariffs; an understanding of what trade deficits mean and what they don’t; export-oriented industrial policies; trade deals representing a very different group of stakeholders; a laser focus on those left behind — these are some of the foundational ideas that any Democratic trade policy should champion.

No more sweeping tariffs

Tariffs can be a useful tool, but the problem with Trump’s is that they’re far too sweeping.

An effective approach to tariffs would be more surgical. Tariffs should be targeted at specific goods that are being dumped in our country — that is, sold far below cost to capture market share.

To be effective, administrations must be willing to move quickly to go after such practices, and, in fact, presidents of both parties have done so. The way countries underprice all their exports is through currency misalignment, but tariffs are far too indirect a tool against that problem.

For example, about a decade ago, the Obama administration placed a tariff on a specific grade of Chinese tire exports, which our Commerce Department believed were being sold here as much as 200 percent below their normal market value. Importers of US poultry have long cried, um, “fowl” (sorry) against alleged dumping by American exporters. The current list of US anti-dumping investigations includes steel from India, tomatoes from Mexico, and something called strontium chromate (don’t ask me) from France.

Not as sexy, perhaps, as Trump’s tariffs on essentially everything from China but a far more legit path to fairer trade.

The trade deficit is not a scorecard

Another problem with Trump’s current approach is that its goal is balanced trade. On the other side, globalization’s cheerleaders — the dominant center left/right coalition noted above — view trade deficits as always benign, which is also problematic.

To be sure, there are times when a growing trade deficit is not undesirable. When our economy is doing notably better than others, we pull in more imports than exports, as both our relative demand and our currency are stronger than those of our trading partners. In this way, trade deficits enable American consumers and investors to spend and invest more than we produce. And because such periods are typically associated with high employment, those in sectors that have to compete with imports can find jobs (though the quality of those jobs may be worse than the ones they lost).

But when demand is weak, trade deficits compound the problem. They’re a further drag on growth, and they’re not offset by more activity coming from the non-tradable sectors. In fact, scholars have argued, correctly in my view, that this has been a long-term factor underlying “secular stagnation”: the long-term lackluster performance of the US economy.

The policy prescription calls for a trade balance serenity prayer. First, we must admit the problem: Trade deficits are not always benign. Second, we must recognize periods when the trade deficit is hurting our markets and sapping demand that’s not being replaced from other growth components. Third, at such times, we must reduce trade imbalances by investing in our own exporters and pushing back on currency misalignment.

Speaking of which …

We need export-oriented industrial policies

Shaping globalization doesn’t mean trying to shut it down with fantasies of widespread import substitution, producing here what we’re now buying abroad. Nor does it mean hoping that more of trade’s benefits will finally trickle down to workers if only the next trade deal were even more protective of Big Pharma and international investors.

It means looking around corners to find new, remunerative, productive opportunities for American exporters to meet global demands, and positioning American producers to meet those demands. Green technology, including solar, wind, and energy storage capacity, are obvious targets, as are robotics, AI, genomics, transportation, and sustainable agriculture.

Two ways to move this process along: a) help smaller manufacturers link up to global supply chains, and b) strengthen connections between R&D and expanding production and exports into new areas.

As it happens, we already have government functions that perform both of these roles, but they need to be scaled and strengthened. The Manufacturing Extension Partnership is designed to help smaller manufacturers make both these supply and R&D connections; the 14 Manufacturing USA Institutes are public-private partnerships focused on the diffusion of advanced manufacturing technology.

Our trade competitors are already deep into implementing such industrial policies. It’s time we executed our own.

Trade deals must be written by a broader set of stakeholders

From NAFTA to the Trans-Pacific Partnership, our trade deals have not been about lowering tariffs and, you know, freeing up trade. They’ve been technical rulebooks on how to manage trading among countries with different legal, financial, labor, and environmental systems and standards.

As you’d expect, whom these rules help is a function of writes them. Thus far, that’s been investors, not workers or consumers. That’s why you find the TPP and even Trump’s new NAFTA replacement deal extending US drug patents (this, by the way, is why Doctors Without Borders opposed the TPP). This is clear protectionism, not free trade, and yet there it is in one trade deal after another.

The new rules of the road must be written by labor, environmental, and consumer advocates. Yes, there must be room for the usual suspects — investor protections are necessary if we want to see capital flow to countries with weaker rule of law than our own. But there’s no reason for such protections to crowd out the others.

Trade deal expert Lori Wallach and I wrote an essay on what the new rules of the road should include, but the way forward is through a much more inclusive, transparent processes, with enforceable rules that replace the corporate capture of the current system with ones that raise sovereign rights and labor, consumer, and environmental standards.

We must get currency right

Here’s something that’s long been missing from US trade policy: mechanisms to push back on currency manipulation. In the wake of the recent China dustup, this problem of countries holding down the value of their currency relative to the dollar to make their imports cheaper (and our exports more expensive) has been elevated. The media warns of a “currency war,” or, in economists’ lingo, “competitive devaluations” (using your currency to purchase the foreign currency you want to strengthen).

In fact, while China did for years suppress the value of its currency in a powerful and successful effort to gain a trade advantage, it has not done that for a few years now, though some other countries still do so. This includes what happened in China last week: This latest fall in the value of the yuan is market-driven, as the People’s Bank of China had been propping up the currency (when the bank stopped for a moment, it tanked).

Still, the fact that China or other large exporters are not now manipulating says nothing about future efforts, and it is increasingly mainstream thinking that we need some enforceable rules in place (besides being too late, the Trump administration’s formal labeling of China as a manipulator is toothless).

The most effective ways to push back on currency manipulation is to offset it by either taxing it, thus making it more expensive, or doing unto others what they’re doing unto us: If they buy dollars in international exchange markets to push up the dollar exchange rate, we buy the same amount of their currency to offset their misalignment play.

Truly helping those left behind

Finally, Trump has usefully blown away the false notion that everybody wins from expanded trade — though he never had any intention of truly helping those left behind. To the contrary, similar to the tilted trade deals described above, his tax plan further redistributes income upward, exacerbating the ongoing forces of inequality. A fulsome, alternative trade policy must correct this.

The two most promising policy ideas to do so are refundable tax credits to those whose earnings are too low for them to make ends meet, and subsidized employment in places where trade imbalances have long sapped labor demand. Both ideas are in play, as Democrats have a spate of tax plans that work in the opposite direction of Trump’s and job-creating programs targeting people and places where, even at low national unemployment, gainful opportunities are limited and the jobs they lost have higher value added and compensation than the ones they can get.

Of course, there are many details to flesh out. How do we recognize misaligned currencies? What’s the most effective jobs program for workers displaced by trade? What are the best sectors in which to seek new, global market share?

These are tough questions. But they’re the ones we want to be asking if our goal is to finally build a policy architecture that neither ignores nor exacerbates the challenges posed by international trade.

Jared Bernstein is a senior fellow at the Center on Budget and Policy Priorities and was the chief economic adviser to Vice President Joe Biden from 2009 to 2011.