While the latest market sell-off turned out not to be the big "crash" that a bunch of experts have been calling for, that doesn't mean we're out of the woods just yet.

Now, I don't particularly believe that we're heading for a crash anytime soon, but that doesn't mean it can't happen. When investing, it's always a good idea to hope for the best, but be prepared for the worst.

So if you want exposure to the financial sector in your portfolio that can produce great returns no matter what the market is doing, here are three companies well-prepared to withstand a crash as well as make money during the good times.

The best big U.S. bank, hands down
If I had to pick one of the "big four" U.S. banks to own during a crash, it would have to be Wells Fargo (NYSE:WFC).

Wells Fargo definitely performs well during market crashes. After all, it remained profitable during the entirety of the financial crisis. And the bank made some savvy moves to take advantage of weaker competitors, such as the fire-sale acquisition of Wachovia, which actually gave Wells Fargo its now-thriving brokerage business.

And in addition to performing excellent during crashes, Wells Fargo also thrives when the economy is strong. Since the crisis ended, Wells Fargo has become the nation's number one mortgage lender, the number one auto lender, and has built a thriving credit card business. In fact, Wells Fargo's earnings last year were more than 50% higher than they ever were before the crisis.

For excellent performance during a crash, look to the north
Nothing tells us how well a company will perform during a future crash as its performance during the last one, and the Canadian big banks actually did well during the crisis. TD Bank (NYSE:TD) is my preference of the big banks based in Canada.

TD Bank (short for Toronto-Dominion) actually has substantial U.S. operations and is actually known as "America's Most Convenient Bank" thanks to its long operating hours and seven-days-per-week banking availability. Through acquisitions as well as organic growth, TD Bank has growth tremendously, more than tripling its assets over the past decade.

Although I love TD Bank's business model, perhaps the most compelling reason to buy it if you believe a crash is coming is for its performance during the financial crisis. And while its share price fell during the crisis, the company was never in anything resembling "bad" financial shape. In fact, while other banks needed bailouts and cut their dividends, TD Bank actually raised its dividend from 2008 to 2009, and has increased the payout every year since then.

And the bank never had a losing year. Even during the height of the financial crisis, the bank still earned more than enough to keep paying its dividend, and by 2011 was earning more than it ever had before.

Invest with the best
Although it's not a pure-play financial company, Berkshire Hathaway (NYSE:BRK-A) (NYSE:BRK-B) is still primarily an insurance operation and has substantial exposure to the banking sector. In fact, Wells Fargo is Berkshire's largest common stock holding at about $23.5 billion, and the portfolio also includes substantial positions in Bank of New York Mellon (about $900 million worth), Goldman Sachs ($2.3 billion), M&T Bank ($625 million), U.S. Bancorp ($3.3 billion), as well as American Express ($13 billion) and Visa ($385 million).

You also get exposure to a bunch of other great companies in other industries hand-selected by Warren Buffett and his trusted stock pickers specifically for the purpose of outperforming the market in bad times.

In Berkshire's most recent letter to shareholders, Buffett said that he expects to fall short of the market's performance during very strong years. And its history confirms this fact: Berkshire has underperformed the S&P 10 times, and all but one of those occurred when the S&P gained more than 15%.

However, this is OK because, as Buffett knows, outperformance in bad years is the most important thing to long-term investing success. In fact, over the past 50 years the S&P 500 has had 11 down years, and Berkshire has outperformed the market during every single one.

So if you think the market might drop significantly anytime soon, Berkshire's 100% track record of beating the market in down years should help you sleep at night.

In good times and bad
All three of these companies have delivered excellent performance no matter what the market is doing, and the results speak for themselves.

WFC Total Return Price Chart

Since 2000, Wells Fargo, TD Bank, and Berkshire Hathaway have produced total returns of 286%, 500%, and 281%, respectively, handily beating the performance of the S&P 500 over the same time period. As I mentioned before, doing well during bad times is one of the best ways to produce excellent long-term returns, and these three companies are excellent examples of this principle in action.

Matthew Frankel has no position in any stocks mentioned. The Motley Fool recommends American Express, Berkshire Hathaway, Goldman Sachs, Visa, and Wells Fargo. The Motley Fool owns shares of Berkshire Hathaway, Citigroup, JPMorgan Chase, Visa, and Wells Fargo. Try any of our Foolish newsletter services free for 30 days. 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.