bearishpy


Namebearishpy JSON
Version 0.26.0 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2025-07-25 15:41:26
maintainerNone
docs_urlNone
authoraan
requires_python<3.13,>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ๐Ÿป Bearish

**Bearish** is a package for **querying financial and price data** from various equities across different countries, and **persisting it into a well-structured SQLite database** for further data analysis and stock screening.

---

## ๐ŸŽฏ Use Case

This package is intended for **active retail investors** with a strong passion for **data analysis**, who require well-structured, clean, and large datasets locally to:

- Run **custom technical and fundamental analysis**
- Perform in-depth **data analysis**
- Identify patterns and investment **insights**
- Build **custom screeners**

Bearish is **not designed for real-time trading**, but for extensive analysis of historical and current financial data.

---

## ๐ŸŒ Global Scope

Bearish is designed to collect large-scale data from exchanges in different countries. It **fetches data politely** โ€” meaning it does not make large-scale concurrent API calls and instead respects the rate limits and policies of each data provider. So, **patience is required** during large data retrieval.

The data fetched includes:

- Historical **price data**
- Company **fundamentals**
- **Balance sheets**, **income statements**, and more

All data is stored in a **local SQLite database** from which you can query, analyze, and build insights.

---

## ๐Ÿ“Š Data Sources

Bearish pulls data from multiple sources:

- [๐Ÿ“ฆ FinanceDatabase](https://github.com/JerBouma/FinanceDatabase) for basic ticker information
- [๐ŸŒ InvestPy](https://github.com/alvarobartt/investpy) for country-level equity listings
- [๐Ÿ“‰ yFinance](https://pypi.org/project/yfinance/) as the primary source of prices and fundamentals
- [๐Ÿ“Š Financial Modeling Prep (FMP)](https://financialmodelingprep.com/)
- [๐Ÿ” AlphaVantage](https://www.alphavantage.co/)
- [๐Ÿ“ˆ Tiingo](https://www.tiingo.com/)

> Ticker information is **enriched** using additional sources like yFinance, FMP, etc.  
> Bearish is also **extensible** โ€” you can add support for any data source or API.

By default, Bearish relies primarily on **yFinance** due to limitations in free-tier APIs of other providers. However, if you have a **premium subscription**, you can use other sources more fully.

---

## ๐Ÿ“ฅ Installation

Install Bearish with pip:

```bash
pip install bearishpy
```

---

## ๐Ÿš€ Fetch & Store Data

### ๐Ÿ›๏ธ Country-Level Data

Fetch and store stock data for selected countries:

```bash
bearish run /path/to/sqlite/db Belgium France --api-keys=config.json
```

โœ… This command:

- Loads tickers from FinanceDatabase and InvestPy
- Filters relevant equities from the selected countries
- Enriches the data with fundamentals and prices
- Stores everything in your local SQLite database

> โฑ๏ธ This operation can take some time depending on the size of the countryโ€™s exchange โ€” data is fetched "politely", not in bulk.

Once your database is populated, future updates are quicker.

![img.png](docs/img/img.png)

---


The `config.json` contains the API keys of the different providers (if needed):

```json
{
  "FMPAssets": "your Financial Modeling Prep API key",
  "FMP": "your Financial Modeling Prep API key",
  "AlphaVantage": "your Alphavantage API key",
  "Tiingo": "your Tiingo API key"
}
```

---

## ๐Ÿ”„ Updating Data

### ๐Ÿ’ต Update Prices

To update only the price data:

```bash
bearish prices /path/to/sqlite/db Belgium France --api-keys=config.json
```
![img_2.png](docs/img/img_2.png)
---

### ๐Ÿงพ Update Financials

To update financial and fundamental data:

```bash
bearish financials /path/to/sqlite/db Belgium France --api-keys=config.json
```
![img_1.png](docs/img/img_1.png)
---

## ๐ŸŽฏ Fetch Specific Tickers

To fetch and store data for specific tickers:

```bash
bearish run /path/to/sqlite/db US --filters NVDA,TSLA,RHM.DE --api-keys=config.json
```

> You must always provide the country where each ticker is traded along with the desired tickers as filters.

---

## ๐Ÿ“š Summary

| Feature | Description |
|--------|-------------|
| ๐ŸŒ Country-level support | Fetch equities from any exchange |
| ๐Ÿง  Fundamental data | Balance sheets, cash flow, income statements |
| ๐Ÿ“‰ Price history | Up-to-date historical prices |
| ๐Ÿ—„๏ธ Local database | Data saved in SQLite for offline analysis |
| ๐Ÿ”Œ Extensible | Plug in your own APIs or providers |
| ๐Ÿงช Designed for analysis | Ideal for custom screeners and research |

---

## ๐Ÿ› ๏ธ Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve Bearish.

---

## ๐Ÿ“„ License

Bearish is released under the **MIT License**.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bearishpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "aan",
    "author_email": "andoludovic.andriamamonjy@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/9f/e2/9297980fba3fbba7502d55b216d5672284cbceaf2847cca8317cb9da5c29/bearishpy-0.26.0.tar.gz",
    "platform": null,
    "description": "# \ud83d\udc3b Bearish\n\n**Bearish** is a package for **querying financial and price data** from various equities across different countries, and **persisting it into a well-structured SQLite database** for further data analysis and stock screening.\n\n---\n\n## \ud83c\udfaf Use Case\n\nThis package is intended for **active retail investors** with a strong passion for **data analysis**, who require well-structured, clean, and large datasets locally to:\n\n- Run **custom technical and fundamental analysis**\n- Perform in-depth **data analysis**\n- Identify patterns and investment **insights**\n- Build **custom screeners**\n\nBearish is **not designed for real-time trading**, but for extensive analysis of historical and current financial data.\n\n---\n\n## \ud83c\udf0d Global Scope\n\nBearish is designed to collect large-scale data from exchanges in different countries. It **fetches data politely** \u2014 meaning it does not make large-scale concurrent API calls and instead respects the rate limits and policies of each data provider. So, **patience is required** during large data retrieval.\n\nThe data fetched includes:\n\n- Historical **price data**\n- Company **fundamentals**\n- **Balance sheets**, **income statements**, and more\n\nAll data is stored in a **local SQLite database** from which you can query, analyze, and build insights.\n\n---\n\n## \ud83d\udcca Data Sources\n\nBearish pulls data from multiple sources:\n\n- [\ud83d\udce6 FinanceDatabase](https://github.com/JerBouma/FinanceDatabase) for basic ticker information\n- [\ud83c\udf10 InvestPy](https://github.com/alvarobartt/investpy) for country-level equity listings\n- [\ud83d\udcc9 yFinance](https://pypi.org/project/yfinance/) as the primary source of prices and fundamentals\n- [\ud83d\udcca Financial Modeling Prep (FMP)](https://financialmodelingprep.com/)\n- [\ud83d\udd0d AlphaVantage](https://www.alphavantage.co/)\n- [\ud83d\udcc8 Tiingo](https://www.tiingo.com/)\n\n> Ticker information is **enriched** using additional sources like yFinance, FMP, etc.  \n> Bearish is also **extensible** \u2014 you can add support for any data source or API.\n\nBy default, Bearish relies primarily on **yFinance** due to limitations in free-tier APIs of other providers. However, if you have a **premium subscription**, you can use other sources more fully.\n\n---\n\n## \ud83d\udce5 Installation\n\nInstall Bearish with pip:\n\n```bash\npip install bearishpy\n```\n\n---\n\n## \ud83d\ude80 Fetch & Store Data\n\n### \ud83c\udfdb\ufe0f Country-Level Data\n\nFetch and store stock data for selected countries:\n\n```bash\nbearish run /path/to/sqlite/db Belgium France --api-keys=config.json\n```\n\n\u2705 This command:\n\n- Loads tickers from FinanceDatabase and InvestPy\n- Filters relevant equities from the selected countries\n- Enriches the data with fundamentals and prices\n- Stores everything in your local SQLite database\n\n> \u23f1\ufe0f This operation can take some time depending on the size of the country\u2019s exchange \u2014 data is fetched \"politely\", not in bulk.\n\nOnce your database is populated, future updates are quicker.\n\n![img.png](docs/img/img.png)\n\n---\n\n\nThe `config.json` contains the API keys of the different providers (if needed):\n\n```json\n{\n  \"FMPAssets\": \"your Financial Modeling Prep API key\",\n  \"FMP\": \"your Financial Modeling Prep API key\",\n  \"AlphaVantage\": \"your Alphavantage API key\",\n  \"Tiingo\": \"your Tiingo API key\"\n}\n```\n\n---\n\n## \ud83d\udd04 Updating Data\n\n### \ud83d\udcb5 Update Prices\n\nTo update only the price data:\n\n```bash\nbearish prices /path/to/sqlite/db Belgium France --api-keys=config.json\n```\n![img_2.png](docs/img/img_2.png)\n---\n\n### \ud83e\uddfe Update Financials\n\nTo update financial and fundamental data:\n\n```bash\nbearish financials /path/to/sqlite/db Belgium France --api-keys=config.json\n```\n![img_1.png](docs/img/img_1.png)\n---\n\n## \ud83c\udfaf Fetch Specific Tickers\n\nTo fetch and store data for specific tickers:\n\n```bash\nbearish run /path/to/sqlite/db US --filters NVDA,TSLA,RHM.DE --api-keys=config.json\n```\n\n> You must always provide the country where each ticker is traded along with the desired tickers as filters.\n\n---\n\n## \ud83d\udcda Summary\n\n| Feature | Description |\n|--------|-------------|\n| \ud83c\udf0d Country-level support | Fetch equities from any exchange |\n| \ud83e\udde0 Fundamental data | Balance sheets, cash flow, income statements |\n| \ud83d\udcc9 Price history | Up-to-date historical prices |\n| \ud83d\uddc4\ufe0f Local database | Data saved in SQLite for offline analysis |\n| \ud83d\udd0c Extensible | Plug in your own APIs or providers |\n| \ud83e\uddea Designed for analysis | Ideal for custom screeners and research |\n\n---\n\n## \ud83d\udee0\ufe0f Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests to improve Bearish.\n\n---\n\n## \ud83d\udcc4 License\n\nBearish is released under the **MIT License**.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "0.26.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a376b163f2a356a3c430902a41e98cff66b0b5725bfc97faef7143bc8ae01a88",
                "md5": "cb7c0b7d050c2aa0c7ea7f5982a151d2",
                "sha256": "ce3f3fdf4da11e712cd717b0e7351faf4509ec9c7e9c045e890c08151f96135b"
            },
            "downloads": -1,
            "filename": "bearishpy-0.26.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cb7c0b7d050c2aa0c7ea7f5982a151d2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 58790,
            "upload_time": "2025-07-25T15:41:25",
            "upload_time_iso_8601": "2025-07-25T15:41:25.337716Z",
            "url": "https://files.pythonhosted.org/packages/a3/76/b163f2a356a3c430902a41e98cff66b0b5725bfc97faef7143bc8ae01a88/bearishpy-0.26.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9fe29297980fba3fbba7502d55b216d5672284cbceaf2847cca8317cb9da5c29",
                "md5": "38b2e723789dd75507ff80ed39b023c0",
                "sha256": "5612bbe142537e5a93a473517dc155fa4a068ee9a62d1a0ca843e1eee435c888"
            },
            "downloads": -1,
            "filename": "bearishpy-0.26.0.tar.gz",
            "has_sig": false,
            "md5_digest": "38b2e723789dd75507ff80ed39b023c0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 41382,
            "upload_time": "2025-07-25T15:41:26",
            "upload_time_iso_8601": "2025-07-25T15:41:26.675534Z",
            "url": "https://files.pythonhosted.org/packages/9f/e2/9297980fba3fbba7502d55b216d5672284cbceaf2847cca8317cb9da5c29/bearishpy-0.26.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-25 15:41:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "bearishpy"
}
        
aan
Elapsed time: 1.23643s