This tool was developed as part of my master's project. It is designed to simplify the extraction of financial and ESG data for S&P 500 companies, enabling efficient analysis and research.
-
Historical Quarterly Financial Data Extraction:
Extract historical quarterly financial data for S&P 500 companies, including:- Balance sheets
- Cash flow statements
- Financial ratios
- Dividends
Data is exported to CSV files for easy integration and analysis.
-
Historical Monthly Sustainability Data Extraction:
Extract historical monthly sustainability data, including:- ESG scores for each company
- ESG scores for their peer groups
Data is exported to CSV files.
-
S&P 500 Tickers Extraction:
Extract the list of S&P 500 company tickers and save them to a JSON file.
- Clone this repository:
git clone https://github.com/fedibaklouti/ESG-Finance-Collector.git
- Install the required dependencies:
npm install
- Run the tool to extract the desired data:
npm run start
- Select an option from the menu:
1to Extract Financial Data from Discounting Cashflows (Requires API Key for full data)2to Extract ESG Data from Yahoo Finance3to Extract S&P 500 Companies Tickers4to Extract ESG Data from FMP (Requires API Key for full data)5to Quit
- You'll find that the data is extracted in either output/output_esg/output_esg_v2 folder depending on your choice
Please note that you'll extract a limited amount of financial data without an API key from discountingcashflows.com; so get yours and add it to .env under the variable name DISCOUNTING_CASHFLOW_API_KEY. Visit this page for more details.
As for ESG Data from FMP, you need an API key from them; Add it to .env under the variable name FMP_API_KEY. Visit this page for more details.
- Financial Data: Discounting Cashflows
- ESG Scores: Yahoo Finance
- Tickers: S&P 500 Companies Dataset
- FMP ESG Scores: Financial Modeling Prep