It can be hard to know how to invest your money in a bull market. Everything seems to be going up, but eventually it has to come back down. If you don't want to chase Tesla Motors into the stratosphere, you don't have to. It has never been a better time to buy great companies at low valuations.

Companies like John Wiley & Sons (JW.A 0.59%), Weight Watchers International (WW 4.66%), and Coca-Cola (KO -0.01%) may underperform the market in the next year or two, but I think investors can count on them to outperform in the long run.

Under-the-radar moat
Most people know John Wiley as a book publisher. It publishes books and textbooks in specialized fields such as accounting, computer programming, and mathematics. What most people do not know is that book and textbook publishing makes up less than half of Wiley's revenue and only 16% of its profit. The bulk of Wiley's value is derived from an under-the-radar niche: academic journals.

The academic journals business is much better than the book and textbook publishing businesses. For instance, it cannot be replicated by a competitor and it has a shrinking physical asset base. Wiley publishes a wide range of academic journals that dominate narrow niches. Examples include Journal of Computer Assisted Learning, Ecology of Freshwater Fish, and Biometric Journal. These are niches in which there is room for only one to journal, or perhaps two at the most. As a result, Wiley faces little competition from other journal publishers.

In addition, the move to digitize academic journals is cutting back on publishing costs, making the business even more profitable. Also, the libraries and government agencies that subscribe to Wiley's bundle of journals are forced to keep buying from Wiley lest they deny their patrons access to the top journals in numerous fields.

As a result of Wiley's pricing power and improving product economics, I view the stock's 12-times-free-cash-flow multiple as low enough to give long-term investors a solid return over the next decade.

A brand name becomes a deep value pick
I have been bullish on Weight Watchers for a while -- and apparently I'm the only one! The stock has reliably declined by a large amount each quarter over the last year or so and now trades at less than half of what it did in August.

Source: Yahoo! Finance

However, the market seems to be giving long-term investors an opportunity to earn a high return. Weight Watchers has struggled from the impact of free apps and poor advertising campaigns, but it is still the best company in the weight-loss business. Its meetings involve people sharing stories and lending support to one another. Weight Watchers has proved to be the most effective weight-loss program, receiving U.S. News' top ranking in the weight-loss category.

Moreover, the company has a far bigger advertising budget than any of its peers. The company spent slightly less than $300 million in advertising in 2013, only $50 million less than NutriSystem (NASDAQ: NTRI) generated in revenue. Free apps like MyFitnessPal are unlikely to gather anything close to a $300 million advertising budget, so Weight Watchers has a permanent lead in that department.

If you agree that Weight Watchers is the most effective program and has the biggest megaphone (i.e., advertising budget) to tell everyone about it, then you probably agree that Weight Watchers is cheap at less than five times free cash flow. The company will have another bad year in 2014, and 2015 will not be its best either; but the best company usually wins out in the long run. If Weight Watchers really is the best company in the industry -- and most signs say it is -- then the stock is a wonderful buying opportunity for long-term investors.

An inevitable winner
Coca-Cola is another stock that long-term investors should consider buying today. The market is concerned that its weak performance in 2013 is a sign of things to come; the market's myopia gives long-term investors a chance to buy a durable business at a low price.

Although soft-drink consumption is declining in the United States, the world will drink more Coke in 10 years than it drinks today. The top 10 Coke-drinking countries outpace the rest of the world's Coke consumption by a factor of four. Even as top-consuming nations like Mexico and the United States cut back on consumption, up-and-coming countries like Brazil, India, and China will increase their consumption. As a result, I believe that Coke will do more business in 2024 than in 2014.

Source: The Coca-Cola Company

If you believe in the durability of the Coca-Cola brand, it may serve you well to scoop up shares near its lowest price in more than a year.

Bottom line
Long-term shareholders need not worry about how bubbly or depressed the rest of the market is at any given time. The key to long-term outperformance is to buy good businesses at low prices and hold them for the long run. If you can do that, you will do well over time regardless of what the market does in the next year or two.