The banks are still in turmoil after the Brexit vote, with shares in Lloyds Banking Group down 20% — and that’s after a recovery from their low on 6 July. Similarly, Royal Bank of Scotland shares are down 22%, with their nadir on the same day.

But it’s a different story at Barclays (LSE: BARC) and HSBC Holdings (LSE: HSBA).

What’s Barclays got?

At 216p, Barclays shares are actually up 16% since the EU vote. And though they did suffer a sharp dip in the immediate days afterwards, a massive 70% gain since 27 June will have left those who dived in and bought when the panic-mongers were dumping feeling very pleased with themselves. So why the difference?

For one thing, Barclays has already slashed its dividend to help it through the hard days and to focus on its balance sheet strength, while Lloyds is still forecast to shell out for a yield of 5.3% this year, rising to 6.2% next — and thinning cover by earnings must be making a lot of people fear a cut.

Ironically, Brexit and the resulting fall in the value of sterling could help banks like Barclays, as there’s surely going to be rising inflation over the next few years, which should eventually lead to rising interest rates and improving lending margins — we’re already seeing some bond yields and mortgage interest rates heading upwards.

That is, of course, if leaving the EU doesn’t damage Barclays’ business too badly, and on that score it’s in a better shape than many — while Lloyds, for example, does all of its business in the UK, around half of Barclays’ business is overseas.

That should shield it from much of the possible EU fallout, though there’s still significant risk — but I see Barclays as a good long-term investment.

What’s HSBC got?

International safety is also the biggest draw at HSBC Holdings, which gets almost none of its profits from here in the UK. In fact, in its last full year, around 85% of HSBC’s profits came from the Asia region.

Before the Brexit shock, it was that exposure that was seen as damaging HSBC’s outlook, as growth in China was feared to be falling. Many were terrified of a hard landing for the economy and that it would reveal the amount of toxic debt there was in the country’s opaque financial systems.

So far, that hasn’t materialised, and though growth has slowed a little, year-on-year it’s been maintained at around 6.7% to 6.8% for the whole of 2016 — and that’s a growth rate that the rest of the world can only dream about.

HSBC’s mooted dividend yields are still high at around 6% with cover at only around 1.3 times, and that might make some a little twitchy. But at Q3 time, the bank reported an improvement in its common equity tier 1 capital ratio to a very comfortable 13.9%, and stressed that it “reinforces our ability to support the dividend.

HSBC’s shares are showing the biggest gain since the Brexit vote, up 40% and with no short-term dip to speak of. That did come after three years in the doldrums, so some of that is much-needed recovery. But it does make HSBC look like a healthy long-term investment too — albeit with its own, rather different, risk.

Which of these is the better one to buy now? I really can’t tell — perhaps buy both?

What's your Brexit strategy?

Our banks offer both Brexit risk and opportunity, but what's the best long-term strategy to adopt? That's what the Fool's top experts have been pondering, and they've put together their brand new Brexit: Your 5-Step Investor's Survival Guide.

Plenty of people have been panicking since the vote, but that really is the last thing you should be doing now. Instead, get yourself a copy and read and digest these five key steps, and you'll be able to see far beyond any short-term fears.

What will the report cost you? Not a penny, not a euro, not a cent. Click here for your free copy now.

Alan Oscroft owns shares of Lloyds Banking Group. The Motley Fool UK has recommended Barclays and HSBC Holdings. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.