The escalation of the trade war between the US and China in the past 18 months has cast a pall over business sentiment and growth in the advanced economies.
By contrast, activity growth in China has remained fairly robust at around 7 per cent, and inflation is close to the People’s Bank of China’s 3 per cent target ceiling. This buoyancy is surprising, since China was expected by many analysts (and probably by Donald Trump’s administration) to be the main casualty from the trade wars.
How has China managed to survive the trade shock so far? The first issue is to quantify the size of the exogenous shock to the Chinese economy from the trade wars. 
Goldman Sachs economist Andrew Tilton, who has published excellent empirical research on the trade war, estimates that the initial rounds of tariffs that took effect before August 1 2019 have reduced Chinese gross domestic product by 0.4 per cent, via the direct trade effects alone. This is broadly consistent with the worsening of net trade’s contribution to expenditure in GDP from 2017-19, which suggests that the estimate is in the right ballpark.
There have also been potentially much larger negative effects on business investment from the huge rise in uncertainty about trade policy. These are very hard to estimate with any confidence.
However, staff economists at the US Federal Reserve Board have recently published a study that estimates trade policy uncertainty will have reduced real GDP in emerging economies, including China, by about 0.9 per cent by the end of 2019. This is very similar to global results published last week by IMF economists, and also close to the recorded decline in investment expenditure by foreigners in China, and by Chinese exporters since the trade war started.
If accurate, this suggests that the impact of trade uncertainty on Chinese GDP has been about three times larger than the direct trade impact, making a total contractionary shock to GDP equal to 1.3 per cent. 
This shock has been offset by timely Chinese policy stimulus and an exchange rate depreciation.
Several elements of domestic economic policy have been eased since the trade war started, though this has been done judiciously, with continued efforts to reduce the growth of debt in the economy, especially in the shadow banking sector.
There has been an emphasis on fiscal stimulus, which (according to the IMF) will increase the overall budget deficit by 1.5 per cent of GDP in 2019 alone. In addition, monetary policy has been eased, but only “prudently”. A key policy indicator, the 12-month medium-term lending facility interest rate, has remained unchanged, while the reserve requirement ratio has been cut by 4 percentage points. Credit policy has been loosened, and total credit is expected by JPMorgan to rise by 12 per cent in 2019. Housing policy has been an exception, with no relaxation of regulations that may be constraining construction so far.
The Goldman Sachs index of the overall stance of macro policy in China contains all these elements, and on this measure (see box) the easing seems large enough to have offset, almost exactly, the tariff and uncertainty shocks during the trade wars.
In addition, the 6 per cent decline in the exchange rate since the second quarter of 2018 could account for a further boost to GDP of about 0.7 per cent over a three-year period, calculated from the latest IMF study of currency effects on global economic activity.
In summary, the entire contractionary shock from the trade wars up to August 2019 has been comfortably offset by policy interventions in China.
As a result, China seems less concerned about the additional tariff measures promised by President Trump on August 1 and 23. Some of these new measures have been postponed, but in full they would constitute an additional shock almost as large as the total of all the announcements up to July 2019. China’s State Council has responded by announcing new fiscal and monetary measures that would once again be expected to offset part or all of this new shock.
In recent days, both sides — especially the White House — seem to be tiptoeing away from the brink. With the US economy now slowing more than China, Mr Trump has a large incentive to reach a truce before the start of his re-election campaign.
 All the estimates in this column are imprecise.
 The Fed model counts references in press reports related to “trade policy uncertainty” as an independent measure of the uncertainty shock. This measure is plugged into an econometric (VAR) model with other economic variables that together explain the behaviour of GDP, and the effect of trade uncertainty, in the global economy.
According to Goldman Sachs, the overall easing in Chinese macro policy has been significant (about one standard deviation as measured by their composite indicator of the macro policy stance). So far, this is about half as large as that in 2015-16, when the policy easing was followed by a rise of around 2 percentage points in the activity growth rate within 12 months. A rule of thumb estimate therefore suggests that the boost to GDP this time will be at least one percentage point. The devaluation effect will constitute a further boost of some 0.7 per cent.
Economic activity in China has continued, on balance, to expand at or above the authorities’ target of 6.0-6.5 per cent growth. This suggests that the expansionary effects of stimulative domestic policy and devaluation have more than offset the damaging effects of the trade war in the past 18 months.