Mining companies typically suffer first and hardest when markets are roiled and risk premiums rise. Yet London's two largest, listed mining companies Rio Tinto (RIO) - Get Report and  BHP Billiton (BHP) - Get Report emerged reasonably unscathed from the Brexit-induced carnage and there is good reason to suspect they can continue to ignore the turmoil.

Rio Tinto shares traded Monday morning at 2,083 pence ($27.54), up less than 1% on their Friday close and only marginally lower than their Thursday close, before British voters shocked the market by electing to leave the European Union. BHP Billiton shares traded at 858.3 pence, also marginally higher than their Friday close and down just 1.6% on their Thursday close.

The fall in the value of the pound, which has tumbled 10% against the dollar since Thursday, means that the shares have still posted significant falls in dollar terms. Rio's Australian-listed shares are down 4.5% since it became apparent that Britain would vote to leave the EU during Australian trading hours on Friday. BHP's Australian shares are down 6%.

But mining companies' credentials as a defensive play are premised on three factors.

The first is that they sell a vanishingly small amount of product to Britain's services-focused economy. If the widely forecast UK recession comes to pass it will be little more than a blip on the miners' radars.

Second, the fluctuations in the pound are an irrelevance to mining companies. They bill for their minerals, ores and metals in dollars, and declare their dividends in dollars too, though the payments are made in pounds. On the flip side, mining companies also mine next to no product in the U.K., so they won't benefit from lower production costs due to the fall in the value of the pound.

And finally, BHP and Rio have spent of much of the past four years cutting debt, meaning they are well positioned to resist a possible decline in credit availability if banks pull back on lending while licking their wounds from the collapse of their own equity valuations.

The relatively poor performance of another U.K.-listed mining giant Glencore, which is down almost 10% since Thursday's close, is a reflection of its weaker balance sheet. In the longer term miners could benefit from cuts in interest rates in the U.K. and possibly the EU, which may help them lower financing costs.

None of that makes the mining companies bullet proof.

Rio and BHP are still coping with historically low commodity prices. Spot iron ore prices fell about 2.5% in the wake of the referendum vote to just over $50 a ton. That is still well above the $38 per ton that iron ore traded at toward the end of last year, but well down on the glory days of $180 a ton in 2011.

If Brexit spills over into a wider European economic downturn then the pressure on iron ore prices will increase. Analysts are not overly worried though. Goldman Sachs on Sunday cut its eurozone GDP growth forecast by just half a percentage point to 1.2% over the next two years.

Pricing for mining commodities will, as ever, depend mostly on China, which consumes more than 50% of the output of all mined commodities. The Chinese economy has its weaknesses, but exposure to Brexit is not one of them, according to analysts at Goldman and BNP Exane.  Both sets of analysts forecast that China will be untouched by Brexit unless political rupture in Europe exacerbates the EU's woes.