FetchFinancialsExcel


NameFetchFinancialsExcel JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/username/FetchFinancialsExcel
SummaryA Python package for fetching financial data from Excel files and performing fundamental analysis
upload_time2025-08-30 10:10:46
maintainerCarl Viggo Gravenhorst-Lövenstierne
docs_urlNone
authorCarl Viggo Gravenhorst-Lövenstierne
requires_python>=3.8
licenseMIT
keywords finance stocks fundamental analysis financial data eodhd excel
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FetchFinancialsExcel

A Python package for fetching and analyzing fundamental financial data using the EODHD API in the background. This package allows you to process Excel files containing stock tickers to generate financial analysis reports. It reads ticker symbols from an input Excel sheet, queries the EODHD API for relevant financial data, and outputs a comprehensive analysis report in a new Excel file.

## Features

- **Concurrent Data Fetching**: Efficiently fetches financial data for multiple stocks concurrently.
- **Comprehensive Analysis**: Calculate key financial metrics not directly avaibale in EODHD including:
  - Conservative investment scores
  - Quality scores
  - P/E ratios, ROCE, revenue growth, EPS growth
  - Free cash flow metrics, buyback data, insider ownership
  - Technical indicators and moving averages
- **Excel Integration**: Read ticker lists from Excel file and output results to an file

## Installation

### From PyPI
```bash
pip install FetchFinancialsExcel
```

### Development Installation
```bash
git clone https://github.com/username/FetchFinancialsExcel.git
cd FetchFinancialsExcel
pip install -r requirements.txt
pip install -e .
```

## Prerequisites

1. **EODHD API Key**: You need an API key from [EODHD](https://eodhd.com/) to fetch financial data

## Start

### 1. Prepare Excel File

Create an Excel file (`.xlsx`) with the following format:

<img src="examples/figures/ticker_list_example.png" alt="Alt text" width="200"/>

**Important Notes:**
- First Column: Company names
- Second Column: Ticker symbols
- Note! Make sure to use proper ticker formats (e.g., `DANSKE.CO` for Copenhagen exchange) that are compatible with EODHD. 

### 2. Run the Analysis

```bash
fetch-financials-excel --api-key YOUR_EODHD_API_KEY --input tickers.xlsx --output results.xlsx
```

### 3. View Results

The output Excel file will contain comprehensive financial data and analysis for all tickers.

## Command Line Usage

### Basic Usage
```bash
fetch-financials-excel --api-key YOUR_API_KEY --input input.xlsx --output output.xlsx
```

### Advanced Usage
```bash
# Custom number of concurrent workers (default: 10)
fetch-financials-excel --api-key YOUR_API_KEY --input tickers.xlsx --output results.xlsx --workers 5

# Short form arguments
fetch-financials-excel --api-key YOUR_API_KEY -i tickers.xlsx -o results.xlsx -w 5
```

### Command Line Arguments

| Argument | Short | Required | Description |
|----------|-------|----------|-------------|
| `--api-key` | | Yes | Your EODHD API key |
| `--input` | `-i` | Yes | Path to input Excel file |
| `--output` | `-o` | YEs | Path to output Excel file |
| `--workers` | `-w` | | Number of concurrent workers (1-50, default: 10) |
| `--version` | | | Show version information |
| `--help` | `-h` | | Show help message |

## Python API Usage

```python
from fetchfinancialsexcel import FundamentalDataFetcher

# Initialize with your API key
fetcher = FundamentalDataFetcher(api_key="YOUR_EODHD_API_KEY")

# Process an Excel file
fetcher.process_excel_file(
    input_file="path/to/tickers.xlsx",
    output_file="path/to/results.xlsx",
    max_workers=10
)

# Or work with data directly
company_list, ticker_list = fetcher.extract_tickers_from_excel("tickers.xlsx")
df, separate_data = fetcher.fetch_all_data(company_list, ticker_list)
analyzed_df = fetcher.analyze_data(df, separate_data)
```

## Output Data

The output Excel file contains the following types of data:

### Financial Metrics
- **Price Information**: Current price, currency, sector
- **Valuation Ratios**: P/E ratios (current and 5-year average), ROCE
- **Growth Metrics**: Revenue growth, EPS growth, asset growth
- **Profitability**: Gross profitability, free cash flow metrics
- **Balance Sheet**: Accruals, total yield, insider ownership percentage

### Analysis Scores
- **Greenblatt Formula**: Magic Formula ranking based on P/E and ROCE
- **Conservative Formula**: Risk-adjusted scoring based on volatility, NPY, and momentum
- **Quality Score**: Overall quality assessment

### Technical Data
- **Moving Averages**: Various period moving averages
- **Volatility Metrics**: Historical volatility measures
- **Price Momentum**: Momentum indicators

## Testing

Before pushing changes, run the test script to validate functionality:

```bash
python test_package.py
```

## Author

**Carl Viggo Gravenhorst-Lövenstierne**

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/username/FetchFinancialsExcel",
    "name": "FetchFinancialsExcel",
    "maintainer": "Carl Viggo Gravenhorst-L\u00f6venstierne",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "finance, stocks, fundamental analysis, financial data, EODHD, excel",
    "author": "Carl Viggo Gravenhorst-L\u00f6venstierne",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/87/f8/e1d6edf34acb618d0de4281cfa8b07974b6a4280371a05ee851ec1d4e85c/fetchfinancialsexcel-0.2.0.tar.gz",
    "platform": null,
    "description": "# FetchFinancialsExcel\n\nA Python package for fetching and analyzing fundamental financial data using the EODHD API in the background. This package allows you to process Excel files containing stock tickers to generate financial analysis reports. It reads ticker symbols from an input Excel sheet, queries the EODHD API for relevant financial data, and outputs a comprehensive analysis report in a new Excel file.\n\n## Features\n\n- **Concurrent Data Fetching**: Efficiently fetches financial data for multiple stocks concurrently.\n- **Comprehensive Analysis**: Calculate key financial metrics not directly avaibale in EODHD including:\n  - Conservative investment scores\n  - Quality scores\n  - P/E ratios, ROCE, revenue growth, EPS growth\n  - Free cash flow metrics, buyback data, insider ownership\n  - Technical indicators and moving averages\n- **Excel Integration**: Read ticker lists from Excel file and output results to an file\n\n## Installation\n\n### From PyPI\n```bash\npip install FetchFinancialsExcel\n```\n\n### Development Installation\n```bash\ngit clone https://github.com/username/FetchFinancialsExcel.git\ncd FetchFinancialsExcel\npip install -r requirements.txt\npip install -e .\n```\n\n## Prerequisites\n\n1. **EODHD API Key**: You need an API key from [EODHD](https://eodhd.com/) to fetch financial data\n\n## Start\n\n### 1. Prepare Excel File\n\nCreate an Excel file (`.xlsx`) with the following format:\n\n<img src=\"examples/figures/ticker_list_example.png\" alt=\"Alt text\" width=\"200\"/>\n\n**Important Notes:**\n- First Column: Company names\n- Second Column: Ticker symbols\n- Note! Make sure to use proper ticker formats (e.g., `DANSKE.CO` for Copenhagen exchange) that are compatible with EODHD. \n\n### 2. Run the Analysis\n\n```bash\nfetch-financials-excel --api-key YOUR_EODHD_API_KEY --input tickers.xlsx --output results.xlsx\n```\n\n### 3. View Results\n\nThe output Excel file will contain comprehensive financial data and analysis for all tickers.\n\n## Command Line Usage\n\n### Basic Usage\n```bash\nfetch-financials-excel --api-key YOUR_API_KEY --input input.xlsx --output output.xlsx\n```\n\n### Advanced Usage\n```bash\n# Custom number of concurrent workers (default: 10)\nfetch-financials-excel --api-key YOUR_API_KEY --input tickers.xlsx --output results.xlsx --workers 5\n\n# Short form arguments\nfetch-financials-excel --api-key YOUR_API_KEY -i tickers.xlsx -o results.xlsx -w 5\n```\n\n### Command Line Arguments\n\n| Argument | Short | Required | Description |\n|----------|-------|----------|-------------|\n| `--api-key` | | Yes | Your EODHD API key |\n| `--input` | `-i` | Yes | Path to input Excel file |\n| `--output` | `-o` | YEs | Path to output Excel file |\n| `--workers` | `-w` | | Number of concurrent workers (1-50, default: 10) |\n| `--version` | | | Show version information |\n| `--help` | `-h` | | Show help message |\n\n## Python API Usage\n\n```python\nfrom fetchfinancialsexcel import FundamentalDataFetcher\n\n# Initialize with your API key\nfetcher = FundamentalDataFetcher(api_key=\"YOUR_EODHD_API_KEY\")\n\n# Process an Excel file\nfetcher.process_excel_file(\n    input_file=\"path/to/tickers.xlsx\",\n    output_file=\"path/to/results.xlsx\",\n    max_workers=10\n)\n\n# Or work with data directly\ncompany_list, ticker_list = fetcher.extract_tickers_from_excel(\"tickers.xlsx\")\ndf, separate_data = fetcher.fetch_all_data(company_list, ticker_list)\nanalyzed_df = fetcher.analyze_data(df, separate_data)\n```\n\n## Output Data\n\nThe output Excel file contains the following types of data:\n\n### Financial Metrics\n- **Price Information**: Current price, currency, sector\n- **Valuation Ratios**: P/E ratios (current and 5-year average), ROCE\n- **Growth Metrics**: Revenue growth, EPS growth, asset growth\n- **Profitability**: Gross profitability, free cash flow metrics\n- **Balance Sheet**: Accruals, total yield, insider ownership percentage\n\n### Analysis Scores\n- **Greenblatt Formula**: Magic Formula ranking based on P/E and ROCE\n- **Conservative Formula**: Risk-adjusted scoring based on volatility, NPY, and momentum\n- **Quality Score**: Overall quality assessment\n\n### Technical Data\n- **Moving Averages**: Various period moving averages\n- **Volatility Metrics**: Historical volatility measures\n- **Price Momentum**: Momentum indicators\n\n## Testing\n\nBefore pushing changes, run the test script to validate functionality:\n\n```bash\npython test_package.py\n```\n\n## Author\n\n**Carl Viggo Gravenhorst-L\u00f6venstierne**\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package for fetching financial data from Excel files and performing fundamental analysis",
    "version": "0.2.0",
    "project_urls": {
        "Bug Reports": "https://github.com/username/FetchFinancialsExcel/issues",
        "Documentation": "https://github.com/username/FetchFinancialsExcel/blob/main/README.md",
        "Homepage": "https://github.com/username/FetchFinancialsExcel",
        "Source Code": "https://github.com/username/FetchFinancialsExcel"
    },
    "split_keywords": [
        "finance",
        " stocks",
        " fundamental analysis",
        " financial data",
        " eodhd",
        " excel"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9266c16f58191e61a32138ca97fe5e98edf580f1632cfd7b9b296f74658009f1",
                "md5": "8db786e92c5c05821b2b0299c9102778",
                "sha256": "e6e2ee2faca1d8ada95e157c469961bab3ec443a729ffd5291a94c027d68019c"
            },
            "downloads": -1,
            "filename": "fetchfinancialsexcel-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8db786e92c5c05821b2b0299c9102778",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19696,
            "upload_time": "2025-08-30T10:10:45",
            "upload_time_iso_8601": "2025-08-30T10:10:45.657331Z",
            "url": "https://files.pythonhosted.org/packages/92/66/c16f58191e61a32138ca97fe5e98edf580f1632cfd7b9b296f74658009f1/fetchfinancialsexcel-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "87f8e1d6edf34acb618d0de4281cfa8b07974b6a4280371a05ee851ec1d4e85c",
                "md5": "e20cc34f89bef8c1182c3b8ff222e8a0",
                "sha256": "b82d74855a722ba6f9f206f635149fde0349f03c575b0de5f25aaef651d5acb4"
            },
            "downloads": -1,
            "filename": "fetchfinancialsexcel-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e20cc34f89bef8c1182c3b8ff222e8a0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 24366,
            "upload_time": "2025-08-30T10:10:46",
            "upload_time_iso_8601": "2025-08-30T10:10:46.679742Z",
            "url": "https://files.pythonhosted.org/packages/87/f8/e1d6edf34acb618d0de4281cfa8b07974b6a4280371a05ee851ec1d4e85c/fetchfinancialsexcel-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-30 10:10:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "username",
    "github_project": "FetchFinancialsExcel",
    "github_not_found": true,
    "lcname": "fetchfinancialsexcel"
}
        
Elapsed time: 1.01411s