A two-year bear market has left many investors thinking that there's no way to make money in stocks. Yet while some believe that this could be just a single episode in a much longer pattern of mediocre performance for the stock market, you can still find ways to make money even when the overall market doesn't cooperate.

Bad markets until 2016?
In the brand-new issue of the Fool's Rule Your Retirement newsletter, which will be available to readers this afternoon at 4 p.m. ET, Foolish retirement expert Robert Brokamp talks with Barry Ritholtz, the author of Bailout Nation, and a popular financial blogger and research analyst. In his conversation, Ritholz explains how he believes we're currently in the middle of a secular bear market, a long period of below-average returns that could last 15 years or more from its beginning at the market's peak in 2000.

Secular bear markets have happened before, and they aren't pretty. From 1966 to 1982, for example, stocks rallied sharply on several occasions, only to be followed each time by a pullback. The bear market of 1973-74 saw the S&P 500 lose half of its value, and several other less extreme corrections gave investors an extremely bumpy ride throughout the period. All told, by the end of those 16 years, stocks were trading at roughly the same levels as they had at the beginning, leaving investors with whatever dividend income they were able to earn -- and some painful experiences.

Bucking the losing trend
Before you conclude that you should just yank all your money out of the stock market and stick it somewhere safe, keep one thing in mind: Just because the overall market doesn't perform well doesn't mean that every single stock in that market does badly. If you work hard and focus on finding companies with strong business fundamentals, you'll find that you can often overcome the headwinds from a bear market.

For instance, 2008 hurt stocks pretty much across the board. But even in one of the worst recessions in decades, some investors realized that a weak economy would mean success for companies that focused on helping consumers save money on the things they needed most. As a result, Dollar Tree (NASDAQ:DLTR), McDonald's (NYSE:MCD), and Wal-Mart (NYSE:WMT) all posted gains last year, when even a break-even performance would have beaten the S&P's return by 37 percentage points.

You can find similar pockets of strong performance in past bear markets. From the beginning of 2000 to the end of 2002, technology stocks like Microsoft (NASDAQ:MSFT) and Amazon.com (NASDAQ:AMZN) brought big losses to shareholders. But stocks like Altria (NYSE:MO) and Teva Pharmaceutical (NASDAQ:TEVA), both of which clearly had little or no connection to technology, managed to double over those three years.

Gimme shelter
How can you be so sure that some stocks will beat the odds even during a bear market? The secret lies in investors' persistent pursuit of winning companies. No one wants to see their money languish in a losing stock. If you can identify the companies that will attract the attention of the restless crowd before they buy in, then you'll not only benefit from owning shares of a great company, but also enjoy even stronger returns once the herd starts buying en masse.

Such opportunistic investing may look a lot like short-term trading, but there's one critical difference: your intent. Sure, even if you really like a particular company, you might sell your stock if it gets too popular and becomes overvalued. But many of the stocks that beat bear markets do so not because they were in the right place at the right time, but because they involve great companies that would have succeeded regardless of the market environment.

In his Rule Your Retirement interview, Ritholtz explains in greater detail why he thinks that stocks are in a secular bear market, and describes some of the investing strategies he's found to tackle a weak market environment. The key takeaway, though, is that even a long-term bear market shouldn't stop you from investing. You can still find ways to build a winning portfolio and profit even when many other investors are going nowhere.

Want to know more? Subscribers will have full access to the newest Rule Your Retirement issue this afternoon, and you can too -- just click here sign up for a free 30-day trial to read everything Ritholtz has to say. You'll also be able to see the full range of Rule Your Retirement's other useful resources.

Fool contributor Dan Caplinger hasn't always managed to make money in tough times, but he does his best to defend his portfolio. He owns shares of Altria. Amazon.com is a Motley Fool Stock Advisor pick. Microsoft and Wal-Mart are Motley Fool Inside Value recommendations. Try any of our Foolish newsletters today, free for 30 days. The Fool's disclosure policy shows you our winners and stinkers alike.