Goldman Sachs isn't that bullish on stocks right now, but the firm found one measure that suggests stocks may still be pretty cheap.
The S&P 500 traded Thursday about half a percent below its all-time high set July 27. Its more than 10 percent gain this year into record territory has many analysts worried about whether the stock market is at an unsustainable level.
Indeed, Goldman's Chief U.S. Equity Strategist David Kostin and a team of analysts pointed out in a report Wednesday that the median S&P 500 stock and the index as a whole are near historically high extremes — the 85th to 100th historical percentile — when looking at many valuation measures such as the ratio of enterprise value to sales, forward price to earnings and price to book.
Kostin's official year-end price target for the S&P 500 is 2,400, about 3 percent below Wednesday's close.
Only free cash flow yield is in a far lower historical percentile – 52nd for the entire S&P 500 and 47th for the median stock in the index, the report said.
The "S&P 500 is expensive according to most valuation metrics, but appears attractively valued on free cash flow yield due to reduced capex investment," Kostin said.
Free cash flow yield is a measure of financial performance based on a company's cash flow from operations, minus capital expenditures, divided by the stock's market capitalization. Generally, a higher free cash flow yield is more attractive.
S&P 500 highly valued on all metrics except free cash flow yield
Source: Goldman Sachs Global Investment Research
In another encouraging sign for the stock market, companies appear ready to make capital expenditures again. Many have criticized corporations for artificially boosting stock prices through massive share buyback programs.
After four years of decline, global capital expenditures are expected to grow 5.5 percent this year, S&P Global Ratings said Monday in its fifth annual global corporate capex survey.
In this environment, Kostin said investors can find investment opportunities by looking at an "adjusted free cash flow yield" that incorporates a company's spending on research and development.
The strategy has performed well historically. Goldman said its basket of 50 stocks with the highest trailing 12-month total capex and research and development spending as a share of market cap has climbed 41 percent since the beginning of 2016, versus 25 percent for the S&P 500.
By combining a high adjusted free cash flow yield strategy with a high growth investment ratio strategy, Kostin recommends American Airlines, General Motors, Eli Lilly, NetApp, software design and consulting firm Synopsys, and aerospace defense company Textron.
"These firms are among the cheapest in their sector on adjusted FCF yield (offering value) and have invested the most in growth capex and R&D over the previous three years (offering growth)," Kostin said.
— CNBC's Michael Bloom contributed to this report.