Sandy has a lesson for you, and you don't have to be in the affected area or an investor in directly affected sectors like insurance to learn it. This is a lesson that, if you keep it front and center in your investing, you'll sleep better and likely end up with a fatter portfolio than you otherwise would have.

But that lesson starts with the destructive path of Hurricane Sandy.

Upping the toll
After Sandy made landfall and carved a watery path through the northeast U.S., catastrophe specialist Eqecat upped its estimates of the damage to a range of $30 billion to $50 billion in total economic losses and $10 billion to $20 billion in insured losses. To put that in perspective, last year's Hurricane Irene, which also battered the East Coast, is estimated to have led to around $4.5 billion in insured losses.

It was a confluence of factors that led to such a massive amount of damage from Sandy. On a conference call explaining how they modeled out Sandy's financial wrath, members of the Eqecat team highlighted the fact that the storm charged ahead to the west over highly populated areas, rather than taking a northern path along the coast as Irene did. An unusually high storm surge was caused by high tide at the height of the storm, a full moon, and the perpendicular path of the storm to the coast. 

The storm also ravaged a particularly vulnerable (and costly!) area. There are some $20 trillion in insurable assets in the area that Sandy marched through. Building codes in the Northeast aren't as stout as those in Florida, where nasty hurricanes are a regular concern. And there are also more timber structures and finished basements in the Northeast that are particularly susceptible to storm damage.

Take out one or two of these factors, and the damage wrought by Sandy wouldn't have been as bad. But come together they did, and the results have been jaw-dropping.

Still standing?
This will mean a significant toll on the bottom lines of property and casualty insurance companies. Travelers (TRV -0.28%) posted an underwriting loss in the third quarter of 2011 as loss expenses jumped nearly 30% from the prior year thanks to losses from Irene and Tropical Storm Lee. AIG (AIG -0.03%) broke out Irene specifically in its Q3 2011 report, noting $372 million in losses from that storm. That helped drive a $582 million underwriting loss for AIG's P&C unit for that quarter. This gives us some picture of the losses that Sandy will drive.

And while Irene may have had modest, if any, impact for reinsurers like Berkshire Hathaway's (BRK.A -0.56%) (BRK.B -0.47%) General Re and Berkshire Hathaway Reinsurance, the magnitude of Sandy's damage could mean that more losses spill over to reinsurers.

Despite this, nobody is expecting that major insurers will go belly-up from Hurricane Sandy. And really, when all is said and done, it's unlikely that Sandy will hold a candle to the earthquake and tsunami in Japan, which Munich Re estimates led to insured losses of around $40 billion. 

In light of these costly disasters, how do insurers manage to keep their heads above water?

Here comes that lesson
Catastrophes are not a surprise to insurers. Sure, they may not be able to predict when catastrophes will take place, but they know that it is indeed a game of when and not if. As a result, this expectation is in the very bones of the business -- financial buffers are kept topped up, year-to-year business planning is done with the unpredictability of catastrophes in mind, and the risks that they take are calculated and spread out so that one major catastrophe doesn't mean lights out.

If you look at the results of the best insurers -- think Berkshire Hathaway, Travelers, or Markel (MKL -0.88%) -- you can find significant volatility in underwriting results on a year-to-year or quarter-to-quarter basis. But look at the bigger picture, and you find solid, profitable underwriting that's made these companies extremely successful over time.

As investors, we should be thinking more like these insurers. Yes, the S&P 500 has returned something like 9% per year (with dividends) going back decades. But zoom into a single given year, month, week, or minute during that period, and you're going to find results that significantly vary from a smooth 9%-per-year climb. 

The crash of 2008-2009 may have been particularly severe, but investors seemed truly in shock that the market would dive like that. Like earthquakes, major hurricanes, and other natural disasters, stock market swoons aren't a question of if; they're a question of when.

With this in mind, it seems hardly a coincidence that many of the best investors in the world are associated with insurance businesses. Warren Buffett of course invests the insurance float for Berkshire Hathaway, and Lou Simpson headed up subsidiary GEICO's portfolio until recently. There's also Tom Gayner at Markel, Prem Watsa at Fairfax Financial (NASDAQOTH: FRFHF), and even famed short-seller David Einhorn has Greenlight Capital Re (NASDAQ: GLRE).

What can you do?
Think safety first. Make sure you are only investing funds that you can keep invested for the long term, and have a cash buffer set aside in case tough times hit. If you have expertise in a certain market sector, you should certainly be using that in your investing, but you should also spread your risk so you're not overexposed to a major downturn in one area. This can easily be done through low-cost index funds and ETFs.

Most importantly though, don't have your head in the sand when it comes to stock market catastrophes. They happen, and sometimes they're massive. Keep that in mind, and you'll find yourself in a much better position to take advantage of them.