Investors have historically favored companies that return capital to investors through dividends and share buybacks. That’s shifted over the past two years as traders have started to reward companies that invest in themselves.

Going back decades, investors have traded stocks with their own best interests in mind.

That means favoring companies that use capital to directly enrich shareholders. Since 1991, S&P 500 stocks offering the highest combined dividend and share-buyback yields have returned an annualized 15.5%, according to data compiled by Goldman Sachs.

That has outpaced comparable returns for companies spending the most to grow their businesses organically – a measure also known as capital expenditures, or capex – and it has also beaten returns for the benchmark index itself, according to Goldman data.

But as companies increasingly invest in themselves, that’s all changing.

Since the beginning of last year, a Goldman-curated basket of stocks spending the most on capex and research and development has beaten a similarly constructed index of companies offering high dividends and buybacks by a whopping 21 percentage points. That outperformance has totaled 11 percentage points in 2017 alone, according to the firm's data.

Goldman also forecasts that companies will boost capex by 8% in 2018. And in Goldman's mind, it's at least partially a reaction to economic conditions that are grinding out slight improvements over time.

"Investors should continue to reward firms positioning themselves for future growth given a solid but unspectacular economic backdrop," David Kostin, the chief US equity strategist at Goldman Sachs, wrote in a client note.

10 30 17 capex and r and d COTD

Foto: Traders are starting to reward companies that invest in improving themselves organically, a shift from the past three decades. source Goldman Sachs

So how do you take advantage of this? By zeroing in on the companies offering the most in the way of capex, of course.

Goldman's capex and R&D basket contains 50 companies across a wide range of sectors, with the heaviest concentrations in consumer discretionary, healthcare, industrials, and tech. Here's a sampling of its 10 most pronounced components, ranked by the companies spending the most on reinvestment, relative to market cap: