Whether stocks are soaring in a big bull market or plummeting in response to crisis situations, you can find strategies that will help you profit from big moves in either direction. What's really challenging, though, is figuring out what to do when markets stand still. With the right investment strategy, you can take inevitable doldrums in stocks and ride them to riches.

Dealing with sideways markets
In this month's brand-new issue of the Fool's Rule Your Retirement newsletter, which hits the digital presses today at 4 p.m. ET, guest interviewer and Hidden Gems co-advisor Andy Cross took the opportunity to talk with Vitaliy Katsenelson, author of the book Active Value Investing and director of research at Investment Management Associates. In the interview, Katsenelson shares some insight on how financial markets work and how investors can take advantage of their quirks.

In particular, Katsenelson draws a contrast between the way markets should behave versus how they do behave. Theoretically, rational investors should expect modest, steady growth, with share prices going up in a gently sloping line without the bumps and dips that we've seen so much of lately.

Instead, investors act irrationally, going through cycles of optimism and pessimism that distort stock values. During long-term secular bull markets, investors bid stocks up, pushing price-to-earnings multiples way above their historical norms to levels that are unsustainable in the long run. Those markets produce huge returns for stocks, as they benefit not only from underlying fundamental growth but also from the multiple expansion that puts a higher price tag on every dollar of earnings a company generates.

Conversely, when investors get more pessimistic, it often leads to sideways performance for stocks even when the underlying fundamentals of individual companies are largely unchanged. For instance, fellow Fool Morgan Housel last year highlighted five companies whose earnings had doubled even as their stock prices went nowhere, including Johnson & Johnson (NYSE: JNJ), WellPoint (NYSE: WLP), and Google (Nasdaq: GOOG). Once earnings multiples get to a certain point, they start to contract -- which causes stock prices to stagnate even if profits continue to grow.

How to handle sideways markets
Sideways markets can obviously be incredibly frustrating for investors, especially when the companies they've invested in seem to be firing on all cylinders. Anyone who's been sitting on dead money since the 1999-2000 bull market top can sympathize with flat to negative returns despite some decent economic growth. Moreover, after the huge stock market bounce that has seen the S&P 500 double since early 2009, Katsenelson sees the current sideways market being only half over. Although multiples based on future earnings estimates don't seem unreasonable, they're based on record-high profit margins -- margins that are likely unsustainable over the long run.

To make sure you put yourself in the best position to profit, you have to make the right moves. One recommendation that Katsenelson makes is to invest in dividend-paying stocks. As survivors of the lost decade have discovered, dividends can turn a flat portfolio into a profitable one, and Katsenelson points out that during sideways markets, dividends account for more than 90% of total stock returns.

That philosophy suggests dividend stocks with cheap valuations and without big run-ups in price might do best. For instance, defense stocks Lockheed Martin (NYSE: LMT) and General Dynamics (NYSE: GD) may fit the bill, with pessimism over potential budget cuts overshadowing their profitability and low earnings multiples. Similarly, value plays like energy giant Total (NYSE: TOT) and France Telecom (NYSE: FTE) also have healthy payouts that can give you good returns even if share prices stay flat.

Get more tips
Going with dividend stocks is just one of the five strategies that Katsenelson discusses in the new Rule Your Retirement issue. You can read about all of them in the new issue, which you can access through the Fool's free 30-day trial offer. Trial subscribers get not only the new issue but also access to all of Rule Your Retirement's other resources.

Sideways markets may be boring, but how you handle them will make a huge impact to your long-term returns. If you can stay rational and seek out inevitable bargains, then boring markets may become your favorite markets.

Get started with your free trial of Rule Your Retirement today.