ETFs Explained and how to use Python to determine your ETF allocations.

Photo by Patrick Weissenberger on Unsplash

What is an ETF?

Exchange-Traded Funds or ETFs are investment funds that purchase and rebalance a basket of individual securities such as stocks and bonds.

What are the Benefits of ETFs?

Some of the benefits of ETFs include:

  • Low-Cost Structure
  • Diversity & Transparency
  • Index Tracking

Low-Cost Structure

Unlike Mutual Funds, ETFs never charge a load fee, and their expense ratios are typically much smaller.

Diversity & Transparency

One of the more significant advantages of ETFs is the diversity they provide to a portfolio. Instead of owning a single or handful of stocks, ETFs can provide you with access to an entire index with a single purchase.

Index Tracking

Index tracking, or indexing, is the practice of buying all the components of a market index, such as the Standard & Poor’s 500 Index, and an ETF’s ability to perform this style of investing conveniently may be its most significant benefit.

How to display ETF Data on my Platform?

With the ever-growing popularity of ETFs amongst investors, Intrinio is proud to be supplying the next generation of fintech companies with a high-quality ETF data offering. Powered by CFRA, our ETF API endpoints provide in-depth metadata, stats, analytics, and complete holdings of every active ETF in the U.S. and Canada.

  • Retrieve ETF Holdings’ Allocations
  • Aggregate ETF Holdings’ Allocations Across Multiple ETFs

Retrieve ETF Holdings’ Weights

The following _etf_holdings_dataset function accepts two arguments, an etf_ticker and allocation, and ultimately returns a Pandas DataFrame with the necessary columns — ticker | sedol | allocation — to later aggregate holding allocations across ETFs.

ETF Holdings & Allocations

Aggregate ETF Holdings’ Allocations Across Multiple ETFs

The _etf_diversity_dataset function below accepts a dictionary of key-value pairs where the keys are ETF tickers, and the values are an investor’s allocations to those ETFs.

ETF Diversity of Holdings Dataset

Where to access clean market data

At Intrinio, we’re recognized for being one of the top data providers that specializes in high-quality data, immediate customer service, and modern tools for a variety of fintech platforms and businesses. Our dedicated team wants to help you find the best data package that fits your unique needs. Reach out to one of our data specialists today to find out more about our equities, options, fundamentals, ETF, and analyst ratings data packages. And to learn more about all our financial services and data please visit

Full Code Walkthrough

Full Walkthrough



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


High-quality financial data. Tools built for developers. First-class, US-based support. Data doesn’t have to be hard or expensive.