An old Wall Street axiom suggests the stock market is the only place in the world where buyers are more comfortable paying a higher price for the product. If that’s the case, the line at the checkout counter is about to get longer.

The S&P 500 stock index now trades at 19 times forward earnings estimates, its highest valuation in more than a decade and nearly 15% above its 5-year average price-to-earnings ratio. There’s no denying the majority of U.S. stocks have become more expensive. What most people really want to know: “Is it still a good time to invest in equities?”

Every investor wants to buy low and sell high. Price-to-earnings (P/E) ratios are a helpful tool to determine whether a company (or an index) appears cheap or expensive.

Most readers of this column know the S&P 500 increased almost 30% last year. What you may not realize is nearly all of those gains can be attributed to an increase in the market’s multiple rather than an increase in earnings.

Data compiled by Goldman Sachs show that 92% of the S&P’s 2019 gains were due to expansion in the benchmark’s P/E ratio. Only 8% of the gains were attributable to earnings growth. For the sake of comparison, more than two-thirds (68%) of the S&P’s total gains since March 2009 are the result of earnings growth, with only 32% due to P/E expansion.

Put another way, investors bid up the stock market in 2019 anticipating that future earnings would make that bet pay off. A lot needs to go right in order to justify currently lofty valuations. If the latest earnings are any indication, however, most companies are on the right path.

With fourth-quarter reporting season nearly complete, the index is on pace for year-over-year earnings growth of 0.7%. That might not sound impressive, but it’s well above the 1.7% earnings decline that was forecast as of year-end.

Also significant is that the companies with the most influence on benchmark performance (remember the S&P 500 is market-cap weighted) continue to be some of the best performers.

Valuations are elevated, but it’s unlikely they have peaked. In the last 11 economic cycles, equity prices tended to top out when the benchmark’s P/E reached a 25% premium to its five-year average. With the S&P currently trading at a 15% premium to its five-year average, there is still room for this bull market to run. Another quarter of strong earnings would lengthen that runway.

Political uncertainty and the fallout from coronavirus may increase short-term volatility, but neither, in our view, present a major long-term obstacle. As for historical comparisons, remember that none of those previous bull markets benefited from the exceptionally friendly Fed policy still in place today. All signs point toward the Fed remaining neutral in 2020, which means a favorable environment for stocks and persistently low yields from alternative asset classes like bonds and cash.

Recent fund flows may also provide more fuel for equities. Investors withdrew more than $41 billion (net) from equity funds in 2019, according to Morningstar. Such behavior rarely coincides with market peaks.

More likely, we remain in the later stages of this economic expansion. The relative upside for stocks may not be as high as a year ago, but as long as earnings deliver, the upside remains.

Ben Marks is chief investment officer at Marks Group Wealth Management in Minnetonka. He can be reached at ben.marks@marksgroup.com. Brett Angel is a senior wealth adviser at the firm.