After suffering through an 18-month meltdown that saw Canada’s benchmark stock exchange shed some 20% of its value, investors have been treated to much nicer markets over the last few months.

On January 20, 2016, the TSX Composite hit an almost three-year low, closing at 11,843. Stocks did test those lows again in February, but other than that it’s been smooth sailing for most Canadian companies. As I write this, the TSX Composite trades at 14,103, an improvement of nearly 20% over just a few months.

Although I’m happy about these results, I can’t help but feel a little nervous. A 20% move in just four months is huge, especially considering Canada’s somewhat tepid overall economic numbers. There are still significant risks facing Canada as well, including the housing bubble, further weakness in commodities, or strength in the Canadian dollar.

I’m not saying investors should pack up and move everything to cash. But I would advocate that perhaps some gains should be taken off the table at this point; move cash into assets that are less correlated to the overall economy.

Fairfax Financial Holdings Ltd. (TSX:FFH) is such a stock. It’s a terrific hold no matter what the market is doing, but especially so during bear markets. Here’s why.

An interesting portfolio

Prem Watsa, the man in charge of Fairfax since 1985, has a unparalleled reputation as a value investor.

Like Berkshire Hathaway, Fairfax uses insurance float–premiums that have been paid by policyholders–as a form of free money. This money is then invested in undervalued stocks. By the time the company is forced to pay out claims, this float has gone up in value.

Fairfax has consistently done this over the last 30 years, growing book value by more than 20% annually since the current management team took over. That’s an amazing record over five or 10 years. It’s all the more impressive over three decades.

Fairfax is also a good insurer, regularly boasting a combined ratio of under 100%. This means the company is profitable as an insurer alone. All of the investment gains are just gravy.

These days, Watsa has switched his strategy a bit. Instead of stuffing his portfolio full of undervalued stocks, Fairfax’s CEO has elected to use some of his cash to buy derivatives to bet against the market. Watsa is convinced the market is overvalued, so he’s positioned Fairfax’s portfolio to make money if stocks crash.

In fact, as recently as February, Watsa announced that Fairfax was 100% hedged, meaning for every dollar it has in stocks, it has a dollar bet on markets going down.

Naturally, this means Fairfax does well as investors get bearish. In February, when markets were close to retesting January lows, Fairfax hit a 52-week high of $778 per share. These days, shares trade hands at $670, a decline of nearly 15%.

Fairfax shares have become a pretty effective hedge, which is exactly what we’re looking for.

The potential bonus

The market views Fairfax as a great insurance company with an impressive capital allocator in charge. There’s almost zero value put on the company’s giant deflation bet.

Watsa has spent some US$650 million of Fairfax’s money on derivatives that pay out handsomely if deflation hits the United States, Great Britain, or the Eurozone.

These contracts could be worth up to US$109 billion, but that’s only if deflation strikes in a very big–think world ending–way. If we just get a mild bout of it, Fairfax will still likely get a few billion from the trade. For a stock with a market cap of $15.7 billion, that’s a big deal.

Even if the deflation bet doesn’t pay off, there are still plenty of reasons to like Fairfax over the long term. It’s not just for investors looking for an effective market hedge.

Don't miss our TOP PICK for 2016!

Exports of liquefied natural gas could be one of the best growth opportunities out there for long-term investors. And, we think we've identified the Canadian company to invest in. We like this stock so much that we think it soars... no matter what the rest of the market does.

Don't miss out on our 1 Top Stock for 2016 and Beyond. To find out why, click here now to learn how to access your FREE copy today!

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Nelson Smith owns Berkshire Hathaway (B shares) and Fairfax Financial preferred shares. The Motley Fool owns shares of Berkshire Hathaway (B Shares). Fairfax Financial is a recommendation of Stock Advisor Canada.