The technology sector has been the most impressive part of the stock market for some time now -- certainly over the past decade as it provided the propulsion for the longest bull market in U.S. history. How things will play out over the next 10 years is impossible to know, but experts expect tech companies will continue to flourish, transforming industries from finance to healthcare to energy as they blaze new trails with artificial intelligence, robotics, and more.

One excellent way for investors to capitalize on the general trend of technological advancement -- but without betting on which companies will provide the breakthroughs -- is by buying technology-focused exchange-traded funds (ETFs). These offer both access to companies with great potential and diversification to temper the risks.

Two of the best technology-focused funds on the market right now are the Invesco QQQ ETF (QQQ -2.07%) and the Fidelity MSCI Informational Technology Index ETF (FTEC -2.70%). But which is the better buy?

A businesswoman at her desk, looking out as if pondering a question.

Image source: Getty Images.

Invesco QQQ 

The Invesco QQQ is one of the most popular ETFs on the planet with about $180 billion in assets under management. It tracks the Nasdaq 100 index, which is made up of the 100 largest nonfinancial stocks on that exchange. Those happen to be primarily tech sector stocks. As of June 30, the ETF had about 49% of its assets in technology stocks, 19% in communication services, and 17% in consumer discretionary stocks. Its three largest holdings were Apple (10.99% of assets), Microsoft (9.81%), and Amazon (8.34%).

Its performance over the years has been fantastic. Through the second quarter, the Invesco QQQ was up by 44% over the prior 12 months, has grown at an annualized rate of 28% over the past five years, and a rate of 21% over the past 10 years. Year to date, the ETF was up roughly 14% through July 20. Its expense ratio is 0.20%, which is below its category average. In terms of its risk measures, it has a standard deviation of 27.7% and a beta of 1.02.

Fidelity MSCI Information Technology Index ETF

The Fidelity MSCI Information Technology Index ETF tracks the MSCI USA IMI Information Technology Index, which tracks about 350 IT stocks, including large-, mid-, and small-cap names. The fund employs a representative sampling strategy, which means it invests in a representative sample of securities that have an investment profile similar to the index. The securities selected are based on several factors -- including market capitalization and industry weightings, fundamental characteristics, and liquidity measures. Thus, it invests at least 80% of its assets in the stocks in the index. Its three largest holdings are Apple, Microsoft, and Nvidia.

Launched in 2013, this Fidelity ETF does not yet have a 10-year track record to compare to the QQQ, but it has performed extremely well over the period we can measure. Over the past 12 months through June 30, it has returned 44%, and over the last five years, it has posted annualized returns of 30.8%. Since its inception in 2013, it has an annualized return of 23.7%. And year to date as of July 20, it was up 14%. It has a low expense ratio of 0.08%, well below the category average. Also, looking at risk metrics, it has a beta of 1.07 and a standard deviation of 9.58%.

Which is the better buy?

While these are both considered tech funds, there are some significant differences between them. The Fidelity ETF is purely a tech fund, while the Invesco QQQ is largely focused on tech stocks, but is diversified into other sectors as well. That said, the Fidelity ETF is more diversified within the IT sector, with holdings that run the market-cap gamut, and with more than three times as many holdings as the Invesco QQQ.

These are both excellent ETFs, but if I had to pick one, I'd go with the Fidelity ETF. It outperformed the Invesco QQQ significantly over the past five years, and has had excellent returns since its inception. It also has a considerably lower expense ratio and more consistent returns, as measured by its standard deviation.