Image source: Getty Images

It's a shame that Wall Street spends so much time chasing the next big thing. While spotting the next Facebook or Amazon early can do wonders for your portfolio, many businesses that have been around for years hardly get the attention they deserve, either because they operate in boring segments or in mature markets that don't offer obviously fertile fields for growth. But the truth is, if investors paid more attention to these kinds of stocks, they would find that they are just as capable of generating those elusive market-beating returns.

GWW Total Return Price Chart

GWW Total Return Price data by YCharts

Let's take a quick look at a few companies that don't get much attention from Wall Street, but that have solidly outperformed the market over the years.

Behind the scenes

For many of us, it's much easier to understand consumer-facing companies because we are typically well aware of what they do, and companies that we interact with on an everyday basis are just easier to keep tabs on. However, there are a slew of companies that exist exclusively in the business-to-business realm that can go overlooked even though they can make great investments. One that falls into this category is W.W. Grainger (GWW -1.30%)

Grainger supplies maintenance, repair, and operations equipment to businesses, from safety and janitorial equipment to power tools and motors. By giving its clients a single supplier for a wide range of products, it makes procurement that much easier.

While parts and equipment may sound boring, these are mostly consumable products that need to be purchased on a regular basis, providing Grainger with rather stable revenue streams.

On top of the company's strong and consistent business model, its management has done a great job of running a tight ship operations and investment-wise. For more than 20 years, they've cranked out returns on equity well in excess of 10% a year, and built a strong track record for growing Grainger's dividend.

GWW Return on Equity (TTM) Chart

GWW Return on Equity (TTM) data by YCharts

With shares trading at 20 times trailing earnings, the stock isn't exactly cheap. Then again, it's never been cheap. That P/E ratio may just be the price you have to pay to get a company that solidly crushes the S&P 500 on a total return basis. 

Doing the dirty work

Just like Grainger, Waste Management (WM -0.52%) is one of those companies that you probably don't think of often, though the odds are high that when you take your trash out, it's either the company coming to collect it or the owner of the landfill it's heading toward.

Trash may not be the most exciting business, but there is a pretty constant stream of it that needs to be taken care of. When you consider all the capital it takes to build out a fleet of trash-handling vehicles, plus the regulatory hurdles for opening and operating a landfill, it's obvious that Waste Management possesses a pretty wide economic moat. What puts the company over the top, though, is that management has done a great job over the years of keeping operational costs under control and generating high rates of return for investors. Like Grainger, WM has generated returns on equity well in excess of 10% pretty consistently for more than a decade, and built a history of regular dividend increases. 

WM Return on Equity (TTM) Chart

WM Return on Equity (TTM) data by YCharts

Waste Management shares rose more than 40% over the past 12 months, and the company's valuation is well above its historical average, so today may not be the best time to buy the stock. However, continue to monitor the company for a time when its earnings and stock price get back to more normal levels.

Making magical returns

Magellan Midstream Partners (MMP) has a hand in bringing tens of millions of Americans a product we use every day -- though most of us don't even realize it. The company owns and operates the nation's largest network of refined petroleum product pipelines and storage terminals. If you live east of the Rockies, chances are the gasoline in your car has spent some of time either in a Magellan pipeline or one of its storage tanks. 

While prices for oil and gas experience wild ups and downs, the cost of moving those products remains pretty consistent. More than 80% of Magellan's revenue comes from fixed-fee contracts that have "take or pay" clauses, which mean even if a company isn't using space in a pipeline or in a tank at any given moment, it has to pay to keep reserving that space. This produces a  steady stream of cash flow that the company has generously returned to shareholders in the form of a dividend that today yields 4.3% and has grown 12% annually for more than a decade. 

MMP Return on Equity (TTM) Chart

MMP Return on Equity (TTM) data by YCharts

Shares of Magellan have been on the rise recently thanks to investors starting to dip their toes back into the energy industry. Today's dividend yield is below the company's 10-year historical average, but it's still a respectable return, making this a stock that investors probably won't regret buying and holding for the long term.