What do people do when they get an unexpected shock like the Brexit vote?

Many investors saw their shares falling and sold out at a loss. A lot of cash then went straight into shares that should be safe from the effects of leaving the EU… but only after they’d started rising. That knee-jerk approach is, I say, a mistake.

Instead, we should be prepared for surprises like this — whatever their nature, we know they’re going to happen at some point, and we should have our portfolios ready for them.

Now, that doesn’t mean we should do silly things like selling at-risk shares in advance of every possible adverse event, as all that would do is transfer our cash to our brokers in charges. No, what we need is to keep our portfolios balanced at all times, and stick with companies we think are good for the long term, even if they take a short-term battering on occasion.

Banks to miners

Banks have suffered badly since the referendum, while miners have been staging a comeback. So what would have happened if you’d sold Lloyds Banking Group and bought Glencore on, say, 1 July? Since the day of the referendum on 23 June, you’d have lost 24% on Lloyds and then gained 38% on Glencore. You’d be 5% up overall on mid prices, but you’d lose some of that in charges and spreads.

Instead, suppose the same money had already been split two ways between Lloyds and Glencore — a bank and a miner would surely add to your diversification safety, wouldn’t it? In that case, you’d be better off with an 8.5% overall gain, and with no charges and a lot less heartache.

As another example, suppose you sold out of the crashing Persimmon and put the proceeds into the rising Unilever, again on 1 July? You’d have lost 27% on Persimmon, and then gained only 2.4% on Unilever. You’d be 25% down overall, even ignoring charges. But with your money split 50/50 and staying put, the overall 13% drop at Lloyds coupled with Unilever’s 16% gain since 23 June would have left you up 1.5%.

Now, you might say to me that 1 July missed the best time to buy Unilever, so suppose you were canny enough to predict what was going to happen and you sold Persimmon and bought Unilever the day after the vote — a share swap would still have left you 18% down. In fact, on whatever day you could have done the swap in the post-Brexit week, you’d still have been better off with the 50/50 split.

Another trade?

What about a trade of hard-crashing Aviva shares for high-rising Burberry? Doing the sell/buy shimmy on 1 July you’d be 3% down (plus charges), but if you’d been split 50/50 between the two you’d now be 13% up (with no charges). What’s interesting here is that, despite the ‘sell off all financials’ panic sending Aviva down 22% in the first few days, the price has already recovered to its pre-vote level.

I admit I’m doing a little bit of cherry-picking here, but these genuinely are the kind of FTSE 100 shares that people were dumping and grabbing, and the more shares I examine, the more I think the results will show it’s better to stick with a diversified balance of good companies than try to pile into and out of the short-term panics.

What's your Brexit strategy?

Has your portfolio suffered any post-Brexit damage? What's your strategy now?

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 Aviva and Lloyds Banking Group. The Motley Fool UK owns shares of and has recommended Unilever. The Motley Fool UK has recommended Burberry. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.