Skip to main content

No project description provided

Project description

🐻 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:

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:

pip install bearishpy

🚀 Fetch & Store Data

🏛️ Country-Level Data

Fetch and store stock data for selected countries:

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


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

{
  "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:

bearish prices /path/to/sqlite/db Belgium France --api-keys=config.json

img_2.png

🧾 Update Financials

To update financial and fundamental data:

bearish financials /path/to/sqlite/db Belgium France --api-keys=config.json

img_1.png

🎯 Fetch Specific Tickers

To fetch and store data for specific tickers:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bearishpy-0.41.0.tar.gz (47.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bearishpy-0.41.0-py3-none-any.whl (68.8 kB view details)

Uploaded Python 3

File details

Details for the file bearishpy-0.41.0.tar.gz.

File metadata

  • Download URL: bearishpy-0.41.0.tar.gz
  • Upload date:
  • Size: 47.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bearishpy-0.41.0.tar.gz
Algorithm Hash digest
SHA256 69dfd974559e412ee08fe608fc8c90efe7896bad7d9d5863b9502b5d60c6269b
MD5 d6e47da058bc0e782c639b77ab956f17
BLAKE2b-256 bcc01c930321f9b8374b731f75208c50694df4501986de8cc56fad6d53c22e28

See more details on using hashes here.

File details

Details for the file bearishpy-0.41.0-py3-none-any.whl.

File metadata

  • Download URL: bearishpy-0.41.0-py3-none-any.whl
  • Upload date:
  • Size: 68.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bearishpy-0.41.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d44d1b3f3093929629a7be5b8354d0641fe68a6e041e48c1f1a753a5fa094ec
MD5 46dfad9f2cd59b48120355dc7fc814c1
BLAKE2b-256 00353d22f9dd75fcdd8b3878b3085f3c22b6ca1f275842c5f6cac98f63a68cae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page