The technology-heavy Nasdaq Composite index has been on a remarkable tear over the past decade, outperforming the S&P 500 by a wide margin. But one popular exchange-traded fund (ETF) has done even better: the Invesco QQQ Trust (QQQ 1.54%).

No, don't write off the Nasdaq. That said, the QQQ could still be the better buy. It has been unstoppable over the past decade, appreciating by 400% and never falling further than 36% from its high. Will that continue in the years ahead?

Riding the "Magnificent Seven" to big gains

Exchange-traded funds are collections of stocks that trade under one ticker symbol. This makes them an easy way for investors to diversify their portfolios. The Invesco QQQ Trust holds shares of 101 companies in its portfolio.

However, it is often the case that a small group of relative outliers has the most impact on a system's performance. That's true here. The Invesco QQQ Trust's portfolio is weighted heavily toward the "Magnificent Seven" stocks. All sit among its top 10 holdings, and they collectively account for roughly 40% of the fund's value.

That's not necessarily a bad thing. The Magnificent Seven are among the largest, most deep-pocketed U.S. technology companies, and have firm footings in some of the hottest growth sectors, such as cloud computing, digital advertising, and artificial intelligence (AI).

Will the fund's hot performance continue?

Nobody can predict with any certainty what the market or specific stock prices will do. However, the Federal Reserve recently indicated that it still plans to reduce the benchmark federal funds rate later this year.

Whether it does so, when, and by how much will depend largely on how inflation trends over the coming months and what the macroeconomic picture looks like, but those rate cuts could be a positive for technology stocks, which tend to thrive in lower-rate environments. (Just look at what happened to their share prices when rates were too low in 2021.)

Additionally, AI has become a central growth trend in the tech sector that could drive years of investment and expansion in data centers, software, and other industries where the Invesco QQQ Trust's largest holdings operate. Check out long-term earnings growth estimates for the fund's top 10 holdings.

MSFT EPS LT Growth Estimates Chart

MSFT EPS LT Growth Estimates data by YCharts.

Analysts are least optimistic about Apple and Costco Wholesale, but even they are still expected to deliver over 9% annualized earnings growth. Predictions for all the others are in the mid-teens percentages or higher. In other words, the combination of a friendly interest rate policy and earnings growth could mean the fund's holdings (and the fund itself) will perform well for years.

How to invest in the Invesco QQQ Trust today

The Invesco QQQ Trust has proven fairly steady over the years. Many individual stocks have fallen far further than 36% from their highs. Still, you can't take that for granted; investors must be prepared for volatility, even if the long-term trends point to higher share prices.

Don't be impatient and buy all your Invesco QQQ Trust shares at once. Instead, consider adding to your position gradually through small, scheduled purchases -- a strategy called dollar-cost averaging. That's a way to build a position in an asset with a blended cost, ensuring that the cost basis of your investment won't be at the very top of the asset's medium-term range -- nor at the very bottom.

You'll be glad you didn't jump in with both feet on day one if the market gets volatile and offers up better buying opportunities later.