The stock market plunged last week as polls put the Leave camp ahead in the critical last few days of the EU referendum campaign.

What can investors do to protect themselves from possible shocks, and are there any smart ideas for investing in the wake of a Brexit vote?

Lee Gardhouse, chief investment officer at Hargreaves Lansdown, says:“We think it’s impossible to know the long term economic implications of a British exit from the European Union. While an out vote would most likely lead to a market fall, we cannot just assume this will be bad for the long term prospects of the stock market.

“Taking a market view on big economic events will add value if you can consistently get it right, but making such calls is notoriously difficult.”

However, digital wealth manager Nutmeg has done just that.

Chief executive Shaun Port said on Thursday: “As a result of the updated sentiment data coming out of the polls, we have reduced our holdings in equities in Europe and Japan, removed all exposure to the euro and cut holdings in sterling-denominated corporate bonds.

"The funds from these sales have been put into increasing cash holdings, adding to holdings in government bonds with a long time to mature (more than 15 years) and gold.”

He added: “We invest with a long-term horizon in mind and do not attempt to time swings in the markets, but given the enormity of the decision on 23rd June and two very different outcomes, we feel it is prudent to reduce risk in the short term.

Some investors have already been flocking to the traditional safe haven – gold. Adrian Ash, head of research at physical gold broker Bullion Vault, says: Nothing about the EU referendum is certain, and gold isn’t guaranteed to rise amid what could prove a high-risk event. But a growing number of UK investors aren’t waiting for the result to buy some gold as insurance.”

He reports a 60per cent rise this month in new UK customers – three-quarters of them over-60 – compared with a five per cent rise in its other markets.

Adrian Lowcock, head of investing at Axa Wealth, says: “Investing ahead of the actual vote with the view that the outcome will be Brexit is a brave decision. The outcome is binary and you are either right or wrong. There is no middle ground. Therefore it is only worth doing if you are absolutely convinced of the result.”

But Lowcock says a Leave vote would throw up opportunities. He recommends two funds that would benefit, Franklin Mutual UK Smaller Companies and Henderson European Selected Opportunities. “ Midsized and smaller companies are likely to suffer in the event of an exit vote but any sell-off will provide excellent long term opportunities.

“Europe is also likely to sell-off and the region could be more susceptible to speculation if fears of an EU break-up take hold. However that could provide some excellent investment opportunities for long term investors.”

Darius McDermott at investment platform FundCalibre says : “With the US election following hot on the referendum’s heels, volatility is likely to remain a fact of life wherever you invest this year. Who has previously proved they can steer their fund through a stock market storm?”

He gives an ‘elite’ accolade to eight managers, each of whom outperformed their sector average over the period from May 2008 to March 2009, when stock markets crumbled, and also outperformed the FTSE All Share, the market in which UK investors tend to have their largest holdings. He says each has "a track record of outperformance in turbulent times".

They are Baillie Gifford Japanese, run by Sarah Whitley and Matthew Brett in Edinburgh; Fidelity Strategic Bond under Ian Spreadbury; First State Global Listed Infrastructure, where Peter Meany seeks income and some capital growth from infrastructure companies and utilities; Investec’s Cautions Managed and Special Situations funds, both run by Alastair Mundy; Jupiter Merlin Balanced, run by a team headed by John Chatfeild-Roberts since 2002; Liontrust Special Situations managed by Anthony Cross; Schroder Asian Income, run by Richard Sennitt since 2001; and Schroder US Midcap under Jenny Jones.

Mark Whitehead, head of income at Martin Currie in Edinburgh, says markets have not really woken up to the implications of victory for Leave. “Everyone has been quite complacent, the bookies were talking about a 75 per cent probability of a Remain vote. So in the short-term it is going to be pretty bad in terms of the currency.

"But I think it is quite worrying for the EU as an institution, we already know there is a rise of more radical anti-EU politics in countries like Italy and France, does that produce a domino effect, and does that lead to more serious volatility in markets?”

Whitehead says investors need to be well diversified globally, and be favouring large-cap companies with dollar earnings. He adds: “You can’t be insulated from volatile markets, but high-quality portfolios should win over the long-term.”