The last 15 years have been a magical time for the stock market—but don’t count on it lasting. While U.S. stocks may indeed have the bright future markets currently predict, the cost of growth will be more volatility.

Since the financial crisis, simply investing the S&P 500 has offered great returns and fairly modest risk. Other than the odd bad months (especially around the pandemic), there have been long periods of smooth and steady gains.

Compared to previous 15-year periods, there have been much lower returns and similar, if not more, variability in most months. The figure below is annual volatility on monthly returns for the past 60 years. Annual realized volatility has had some very risky years, but it mostly fluctuated around a similar range and is about the same, on average, for each 15-year period.

What it all means is this: On a risk-adjusted basis, the last 15 years were an exceptionally great time to be an investor.

And the risk outlook is looking even better. Stock prices are forward-looking, and they appear to be counting on profitable future for the S&P. The implied volatility of the S&P 500—the volatility suggested by one-month options contracts—has also been remarkably low lately, indicating that markets continue to expect low risk.

Don’t get too complacent. A transformative period may well be imminent for the U.S. and global economy—but it will also mean more risk.

First of all, much of the S&P’s growth is being driven by the so-called “Magnificent Seven” technology stocks. There have been other periods of extreme concentration—the “Nifty 50” biggest stocks dominated markets in the 1950 and1960s, when the top 10 stocks were a bigger share of the S&P than they are today. But concentration levels are rising, and at the rate the big tech stocks are growing, market concentration will reach record highs in the next few years.

That means less diversification if you own the S&P 500. True, it could also mean less risk, because these are very large and mature companies, which tend to be less volatile than smaller ones. And past periods of high concentration were not especially volatile.

Still, the concentration does leave investors (and the broader economy) more exposed to whatever happens to a few stocks instead of many. And in terms of diversification, seven is much less than 50—and all seven stocks are in the same not-yet-fully-mature industry. That argues that this era of concentration will be more risky than in the past.

The argument is not, to be clear, that tech isn’t the future. Artificial intelligence may well make the whole economy more productive, and the big tech companies—especially Nvidia—are poised to reap the rewards. Rather, the argument is that too little attention is being paid to how rocky the path to that future will be.

Periods of extraordinary innovation are inherently unpredictable. Over the next decade or so, there will be plenty of false starts, with overinvestment in some areas and underinvestment in others. No one really knows how exactly AI will transform the economy, and while it could justify the market’s positive growth outlook, there will be a lot of creative destruction along the way. That means more volatility in the stock market, especially among the Magnificent Seven.

There is another reason to expect more instability: The U.S. economy is probably entering a period of higher interest rates and inflation. Such periods tend to come with higher volatility in general, including in stock valuations.

So what to make of the VIX predicting low risk? The Bank for International Settlements speculates that it can be explained by the increased popularity of structured investment products that aim to reduce risk for investors. It says that these products employ a trading strategy that has dampened the volatility of the S&P. But their popularity and effectiveness may change in a more extreme macro environment. Moreover, the VIX is fairly short-term—it predicts volatility over the next month—and does not account for longer-term structural forces.

Of course, there are benefits as well as risks to increased volatility. An economy in transition presents unprecedented opportunities for businesses and investors alike. The one thing no one should expect, however, is stability.

Allison Schrager is a Bloomberg Opinion columnist covering economics. A senior fellow at the Manhattan Institute, she is author of An Economist Walks Into a Brothel: And Other Unexpected Places to Understand Risk.

This article was provided by Bloomberg News.