Investors around the world responded with shock and disbelief on Friday when it became clear that Britain would vote to leave the European Union.

Australia’s own S&P/ASX 200 (Index: ^AXJO) (ASX: XJO) plunged as much as 3.8% before closing 3.2% lower at the end of the session, with markets in the United States and Europe also enduring heavy selloffs.

Those sell-offs continued on Monday night, but regained some ground last night as investors continue to adjust their appetite for risk and sell those shares which they believe to be most at risk.

Of course, it did come as a surprise. Betting agencies and financial experts alike had thought it most unlikely that the Leave campaigners would actually win, while even the Leave campaigners themselves appeared somewhat flabbergasted at the result!

As such, it’s no surprise that investors were also shocked, and that markets tanked. After all, markets are forward-looking and typically utilise whatever information that is available to determine what prices across an index should be.

While that may be the case, ‘Leave’ was always a possible outcome, no matter how unlikely it may have seemed prior to the vote. To be fair, numerous polls in the lead up to 23 June (London time) also showed that the result would be too close to call, meaning that investors (myself included) perhaps should have taken that possibility more seriously.

The lesson here for investors is how important it is to always be prepared for an unexpected incident.

For instance, investors across Europe who were heavily exposed to the banking sector will unfortunately have been crippled by the enormous losses endured in just a few short days. Local shareholders of Clydesdale Bank plc (ASX: CYB) will have experienced something similar, albeit limited to one stock.

Clearly, diversification is a must. Although it may be tempting to heavily load up on some of your favourite shares if you are too overweight on one stock it is dangerous. As one event could trigger a dramatic sell-off which takes a large chunk of your portfolio with it.

To be clear, a portfolio made up of Commonwealth Bank of Australia (ASX: CBA), Australia and New Zealand Banking Group (ASX: ANZ), Westpac Banking Corp (ASX: WBC) and National Australia Bank Ltd. (ASX: NAB), with 25% in each stock is NOT diversified.

Diversification needs to be across industries, geographies and even company sizes, ensuring you are not overly exposed to any one set of risks.

But it goes beyond that. Every investment comes with its own set of risks, but some carry greater risks than others. Some are also more susceptible to a pull-back in the market or the economy, which investors need to consider before buying those shares.

Take BHP Billiton Limited (ASX: BHP) as an example. The miner is heavily reliant on steady or rising commodity prices for earnings growth. However, if countries stop constructing buildings or other infrastructure, iron ore, coal, copper and petroleum can all suffer.

Even retailers such as Harvey Norman Holdings Limited (ASX: HVN) are susceptible. If the economy were to take a hit, consumers would likely reign in their spending on items such as televisions and new furniture, which could really hurt Harvey Norman’s bottom line.

Of course, this doesn’t mean investors should avoid all companies that are susceptible to a pullback in the economy, but they do need to assess the risks of owning those shares. They should also look at holding shares of some businesses which are less likely to endure such a pullback, such as Somnomed Limited (ASX: SOM), CSL Limited (ASX: CSL) and Burson Group Ltd (ASX: BAP), all of which possess somewhat defensive characteristics.

Finally, investors should always ensure they are not completely at the mercy of the market. Markets will endure heavy falls, from time to time, so you’ll need to keep some cash at the ready in case conditions do worsen. Meanwhile, holding that cash can be a great advantage for when shares of high quality businesses do go on sale, as many could over the coming weeks.

3 Rotten Shares to Sell, and 1 to Buy Today

Shares are likely to remain volatile, so investors are right to be cautious. You'll find a full rundown below of 3 shares we think you should avoid today plus one top pick worth buying, even if the market turns south and the RBA keeps rates at an "emergency low." Simply click here to uncover these stocks.

HOT OFF THE PRESSES: Motley Fool’s #1 Dividend Pick for 2017!

With its shares up 155% in just the last five years, this ‘under the radar’ consumer favourite is both a hot growth stock AND our expert’s #1 dividend pick for 2017. Now we’re pulling back the curtain for you... And all you have to do to discover the name, code and a full analysis is enter your email below!

Simply enter your email now to receive your copy of our brand-new FREE report, “The Motley Fool’s Top Dividend Stock for 2017.”

By clicking this button, you agree to our Terms of Service and Privacy Policy. We will use your email address only to keep you informed about updates to our website and about other products and services we think might interest you. You can unsubscribe from Take Stock at anytime. Please refer to our https://www.fool.com.au/financial-services-guide">Financial Services Guide (FSG) for more information.

Motley Fool contributor Ryan Newman owns shares of Burson. The Motley Fool Australia owns shares of Burson. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy. This article contains general investment advice only (under AFSL 400691). Authorised by Bruce Jackson.