You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FinanceDatabase serves the role of providing anyone with any type of financial product categorization entirely for free. To achieve this, the FinanceDatabase relies on community involvement to add, edit, and remove tickers over time. This is made easy enough that anyone, even those with a lack of coding experience, can contribute because of the use of CSV files that can be manually edited with ease.
I'd like to invite you to go to the Contributing Guidelines to understand how you can help. Thank you!
As a private investor, the sheer amount of information that can be found on the internet is rather daunting. Trying to understand what types of companies or ETFs are available is incredibly challenging, with millions of companies and derivatives available on the market. Sure, the most traded companies and ETFs can quickly be found simply because they are known to the public (for example, Microsoft, Tesla, S&P 500 ETF, or an All-World ETF). However, what else is out there is often unknown.
This database tries to solve that. It features 300,000+ symbols containing Equities, ETFs, Funds, Indices, Currencies, Cryptocurrencies, and Money Markets. It therefore allows you to obtain a broad overview of sectors, industries, types of investments, and much more.
The aim of this database is explicitly not to provide up-to-date fundamentals or stock data, as those can be obtained with ease (with the help of this database) by using the Finance Toolkit . Instead, it gives insights into the products that exist in each country, industry, and sector and provides the most essential information about each product. With this information, you can analyze specific areas of the financial world and/or find a product that is hard to find. For examples of how you can combine this database with the earlier mentioned packages, see the Usage section.
Some key statistics of the database:
Product
Quantity
Sectors
Industries
Countries
Exchanges
Equities
158.429
12
63
111
83
ETFs
36.786
295
22
111
53
Funds
57.881
1541
52
111
34
Product
Quantity
Category
Currencies
2.556
175 Currencies
Cryptocurrencies
3.367
352 Cryptocurrencies
Indices
91.183
64 Exchanges
Money Markets
1.367
3 Exchanges
The Finance Database is used within or referenced by:
Installation
Before installation, consider starring the project on GitHub, which helps others find the project as well.
To install the FinanceDatabase, simply use the following:
pip install financedatabase -U
Then within Python use:
importfinancedatabaseasfd
Usage
This section explains in detail how the database can be queried with the related financedatabase package. Note that examples here are purposely cut off to a maximum of 10 entries due to the sheer size of the database. Furthermore, the summary column is also omitted for readability. For the full detailed results, see the Notebook here. Let's start by importing the package:
importfinancedatabaseasfd
Initialization of each asset class is only required once. It is therefore important that you save the class to a variable so that you can query the database much more quickly. A simple example is shown below.
With show_options, all possible options are given per column. This is useful as it doesn't require loading the larger data files. For example, obtaining all options for equities is done as follows:
fd.show_options("equities")
This returns all available options for each column.
Since the equities database has already been loaded, it is also possible to use similar functionality from within the class as follows. The main difference is that this functionality allows you to see the options based on specific filtering. For example:
equities.show_options(country='Netherlands')
This shows a more concise list of parameters given the focus on the Netherlands.
Given this information, it then becomes possible to filter the database based on the parameters you are interested in. For example, if you are interested in 'Insurance' companies in the 'Netherlands', you can use the following. Note that I omit the sector here, given that the selection I make is on a deeper level and therefore it is a given that the sector is 'Financials'.
You'll see that the same company can appear multiple times. This is because by default all exchanges are shown. There are two methods to focus on one entry:
Use the only_primary_listing parameter. This will only show the primary listing of each company. This is useful mostly if you are looking at US exchanges.
Use the exchange or market parameter. This will allow you to filter on a specific exchange or market. This is useful when you are not necessarily looking at US exchanges and are already filtering on a specific country.
For example, when filtering on the Netherlands, it makes sense to select a Dutch exchange as well. This could be the exchange "AMS" or the market "Euronext Amsterdam". This will give you a much smaller selection.
Given that the Netherlands is a relatively small country, it is not uncommon for the list to become small quickly. For example, the same selection for the United States is already much larger, also utilizing the only_primary_listing parameter.
For any of the variables, it is also possible to provide a list instead, which means that it will return all entries that match any of the variables. As an example, the queries above can be combined into one:
equities.select( country=['Netherlands', 'United States'], industry='Insurance', market=['Euronext Amsterdam', 'Nordic Growth Market', 'OTC Bulletin Board', 'New York Stock Exchange', 'NASDAQ Global Select', 'NYSE MKT', 'NASDAQ Capital Market'] )
This returns a larger selection of companies given the increased number of countries and markets.
If the current categorization doesn't lead to the results you are looking for, it is possible to use the search parameter. This allows you to filter on any column in the database via a custom string. This means that if the word or sentence you input is found somewhere in the column you select, it will return the result.
By default, the result will not be case sensitive, but you can adjust this by setting case_sensitive=True. You can also filter the index (symbol column) by using index as shown below. Just like the select function, you can also provide lists here.
This returns instruments that are listed on the Frankfurt Stock Exchange, are in an industry group with the word "Equipment," and have either "Robotics" or "Education" in the summary column. The index parameter is used to filter on the symbol column, which in this case is ".F". The filtering on the index is an alternative way of finding the exchange or market you are looking for.
Lastly, the Finance Database has a direct integration with the Finance Toolkit, making it possible to do financial analysis on the companies you've found in the Finance Database. Returning to the earlier example of the 3 insurance companies in the Netherlands, it becomes possible to load these into the Finance Toolkit with the to_toolkit functionality.
To be able to get started, you need to obtain an API Key from FinancialModelingPrep. This is used to gain access to 30+ years of financial statements, both annually and quarterly. Note that the Free plan is limited to 250 requests each day, 5 years of data, and only features companies listed on US exchanges.
Obtain an API Key from FinancialModelingPrep here.
Then you can go ahead and run the following code, changing the API_KEY to your own API Key:
With this integration, I can now access some of the most important financial metrics for these companies. Let's start simple with historical data:
toolkit.get_historical_data()
Which returns, selecting only "ASRNL.AS" as an example:
date
Open
High
Low
Close
Adj Close
Volume
Dividends
Return
Volatility
Excess Return
Excess Volatility
Cumulative Return
2025-03-31
52.86
52.98
52.56
52.98
52.98
547650
0
-0.0049
0.0175
-0.0474
0.0206
4.2726
2025-04-01
53.22
53.6
52.98
53.44
53.44
486098
0
0.0087
0.0175
-0.0329
0.0206
4.3097
2025-04-02
53.18
53.58
52.7
53.3
53.3
485768
0
-0.0026
0.0175
-0.0446
0.0206
4.2984
2025-04-03
52.32
53.22
52.18
52.42
52.42
567242
0
-0.0165
0.0175
-0.057
0.0206
4.2274
2025-04-04
52
52.5
49.45
50.4
50.4
485024
0
-0.0385
0.0175
-0.0775
0.0206
4.0645
Now let's make it more advanced by automatically calculating 60+ financial ratios for each company. This is just a small snippet of what is available within the Finance Toolkit; see the GitHub page of the Finance Toolkit here or the example Notebook here for more information.
toolkit.ratios.collect_all_ratios()
Which returns, selecting only "ASRNL.AS" as an example with a few ratios:
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
Interest Coverage Ratio
4.0535
4.2287
6.6142
5.152
3.2238
2.2508
3.1188
3.0962
4.1177
0
Income Before Tax Profit Margin
0.1078
0.1265
0.1843
0.159
0.1515
0.1104
0.1231
0.1783
0.1089
0.0701
Effective Tax Rate
0.1923
0.2351
0.195
0.2334
0.1983
0.2075
0.2233
0.2196
0.2181
0.2647
Return on Capital Employed
0.0183
0.0192
0.0235
0.0176
0.0218
0.0145
0.0205
0.0205
0.0283
0.0382
Net Income per EBT
0.7908
0.7603
0.7985
0.743
0.7917
0.7798
0.768
0.7705
0.774
0.6972
EBT to EBIT Ratio
0.7469
0.7611
0.8472
0.801
0.7654
0.7023
0.7628
0.6654
0.3289
0.2389
EBIT to Revenue
0.1327
0.163
0.2107
0.1803
0.1885
0.1481
0.1553
0.2564
0.3196
0.2567
Debt-to-Assets Ratio
0.0442
0.0605
0.0504
0.0546
0.094
0.1172
0.0923
0.068
0.0856
0.0771
All of these methods are also available for the other asset classes. The only difference is that the class name changes and the available columns. For example, for ETFs you would use fd.ETFs() instead of fd.Equities() and the select option has parameters such as category_group and family instead.
etfs=fd.ETFs()
etfs.select( category_group='Fixed Income' )
This gives you results like the following:
symbol
name
currency
category_group
category
family
exchange
^BND
VANGUARD BD IDX FD
USD
Fixed Income
Investment Grade Bonds
Vanguard Asset Management
NIM
^BNDX
VANGUARD CHARLOTTE
USD
Fixed Income
Investment Grade Bonds
Vanguard Asset Management
NIM
^VCIT
VANGUARD SCOTTSDAL
USD
Fixed Income
Corporate Bonds
Vanguard Asset Management
NIM
^VCLT
VANGUARD SCOTTSDAL
USD
Fixed Income
Corporate Bonds
Vanguard Asset Management
NIM
^VCSH
VANGUARD SCOTTSDAL
USD
Fixed Income
Corporate Bonds
Vanguard Asset Management
NIM
This also translates to the available options. For example, let's select fd.Indices() instead:
Lastly, both the search and to_toolkit functions also apply to each of the asset classes, using fd.Funds() and fd.Cryptos() respectively. For example, let's find the funds that focus on pension plans:
funds=fd.Funds()
funds.search(summary='Pension')
A sample of the output is shown below:
symbol
name
currency
category_group
category
family
exchange
0P000017AH.F
OpenBank Renta Variable Europa PP
EUR
Equities
Equities
Santander Asset Management SGIIC
FRA
0P000017AJ.F
Alcal Futuro Uno PP
EUR
Financials
Allocation
Caser Pensiones EGFP
FRA
0P0000189U.F
Caser Julio 2021 PP Acc
EUR
Financials
Bonds
Caser Pensiones EGFP
FRA
0P000018ML.F
Cajamar Renta Variable PP
EUR
Equities
Equities
Cajamar Vida Se. y Re.
FRA
0P000019H0.F
Bestinver Global PP
EUR
Financials
Blend
Bestinver Pensiones
FRA
For Cryptos, let's collect the historical data of Ethereum in multiple currencies:
A sample of the output is shown below, focusing on ETH-BTC:
Date
Open
High
Low
Close
Adj Close
Volume
Dividends
Return
Volatility
Excess Return
Excess Volatility
Cumulative Return
2024Q2
0.0559
0.0558
0.0554
0.0554
0.0554
108145
0
0.0992
0.159
0.0558
0.144
2.6763
2024Q3
0.0406
0.0407
0.0403
0.0405
0.0405
169579
0
-0.269
0.1433
-0.307
0.1445
1.9565
2024Q4
0.0358
0.0365
0.036
0.0362
0.0362
291317
0
-0.1062
0.1857
-0.1519
0.1679
1.7488
2025Q1
0.0221
0.0222
0.0217
0.0219
0.0219
119665
0
-0.395
0.1813
-0.4375
0.1639
1.058
2025Q2
0.0218
0.0217
0.0216
0.0216
0.0216
195229
0
-0.0137
0.1415
-0.053
0.1361
1.0435
Questions & Answers
In this section you can find answers to commonly asked questions. In case the answer to your question is not here,
consider creating an Issue.
How is the data obtained?
The data is an aggregation of various publicly available sources. I strictly maintain the rule that all data in this database must be freely accessible to everyone. Data requiring API keys or paid subscriptions is never included. Information that companies charge for is typically owned and maintained by those companies, making public sharing of such data a violation of their Terms of Service (ToS). However, publicly available data can be freely shared (read more about the legality of web scraping here). This database will always remain completely free.
What categorization method is used?
The categorization for Equities is based on a loose approximation of GICS (Global Industry Classification Standard). This database attempts to reflect sectors and industries as accurately as possible through manual curation, without collecting any actual data from MSCI's proprietary sources. The official GICS datasets curated by MSCI remain the most up-to-date, paid solution and were not used in developing any part of this database. All other categorizations in the database are independently developed and can be freely modified.
How can I find out which countries, sectors and/or industries exist within the database without needing to check the database manually?
For this you can use the show_options function from the package attached to this database within a specific asset class or on a higher level without requiring any data to be loaded beforehand. See Usage for more information.
When I try collect data I notice that not all tickers return output, why is that?
Some tickers are merely holdings of companies and therefore do not really have any data attached to them. Therefore, it makes sense that not all tickers return data. If you are still in doubt, search the ticker on Google to see if there is really no data available. If you can't find anything about the ticker, consider updating the database by visiting the Contributing Guidelines.
How does the database handle changes to companies over time - like symbol/exchange migration, mergers, bankruptcies, or symbols getting reused?
For American exchanges, the database automatically updates every Sunday using data from this repository. This process includes checks for market cap changes and updates asset classifications accordingly. Delisted tickers are intentionally retained for historical research purposes.
While professional financial data services like Bloomberg charge over $25,000 annually for comprehensive market data maintenance, this database relies on community contributions. When companies outside American exchanges undergo changes (migrations, mergers, bankruptcies), we depend on community members to identify and update these entries.
Most companies don't change so rapidly that the database becomes obsolete - major changes like Facebook's rebrand to META are quickly incorporated. Even when companies go bankrupt, their ticker information remains valuable for historical analysis.
If you notice outdated information, please consider contributing through the Contributing Guidelines.
Contributions
This section is meant to thank those that contributed to the project. Looking to contribute as well? Have a look here.