Daron Acemoglu and Pierre Yared argue that militaristic states are less likely to engage in trade (NBER Working Paper 15694):
Despite the major advances in information technology that have shaped the recent wave of globalization, openness to trade is still a political choice, and trade policy can change with shifts in domestic political equilibria. This paper suggests that a particular threat and a limiting factor to globalization and its future developments may be militarist sentiments that appear to be on the rise among many nations around the globe today.
We proxy militarism by spending on the military and the size of the military, and document that over the past 20 years, countries experiencing greater increases in militarism according to these measures have had lower growth in trade. Focusing on bilateral trade flows, we also show that controlling flexibly for country trends, a pair of countries jointly experiencing greater increases in militarism has lower growth in bilateral trade.