Skip to main content

Access 10 years of historical earnings dates for S&P 500 and Nasdaq stocks.

Project description

📈 stocks-earnings-dates

A lightweight Python package to query historical earnings release dates for all stocks in the S&P 500 and in the top 100 Nasdaq.
It provides access to the last 10 years of earnings dates (or fewer, if the company is more recently listed).


📦 Installation

Install the package via pip:

pip install stocks-earnings-dates

What’s Inside?

This package uses a built-in SQLite database with over 21,000+ earnings dates collected from public sources, organized by stock ticker.

You can easily:

  • Get all historical earnings dates for a given stock.
  • List all supported tickers.

Usage

from stocks_earnings_dates import get_earnings, list_all_tickers

# Get earnings dates for a specific ticker
dates = get_earnings("AAPL")
print(dates)
# Output: ['2024-08-01', '2024-05-02', ..., '2014-07-22']

# List all tickers available in the database
tickers = list_all_tickers()
print(tickers)

Data Source

The earnings database was compiled from publicly accessible financial websites.
The CSV was cleaned, normalized and converted to a bundled SQLite database for fast and offline access.


Why SQLite?

This package uses SQLite internally to optimize both speed and memory usage when querying earnings dates.

Instead of loading the entire .csv file into memory every time, only the subset of data requested ( such as the earnings dates for a single ticker) is loaded when needed.
This improves the efficiency when accessing multiple tickers.

Limitations

  • This is a static dataset. Updates are not (yet) automated.
  • Only dates are available — no earnings surprises or results.

Future Plans

  • Add earnings expected eps vs actual eps to see the % of surprises that every earnings had
  • Automatically update the database monthly from trusted sources.

Author

Made by Albert Pérez
GitHub: AlbertPerez7


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

stocks_earnings_dates-0.1.2.tar.gz (178.7 kB view details)

Uploaded Source

Built Distribution

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

stocks_earnings_dates-0.1.2-py3-none-any.whl (177.8 kB view details)

Uploaded Python 3

File details

Details for the file stocks_earnings_dates-0.1.2.tar.gz.

File metadata

  • Download URL: stocks_earnings_dates-0.1.2.tar.gz
  • Upload date:
  • Size: 178.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for stocks_earnings_dates-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b3a33fe03207caad6c7a74b2df28a350512d9256c88a88f9382c3d18db93a578
MD5 a7b61cb425b21542cc3934897fea76e1
BLAKE2b-256 ca45baab7bba8bc443f54ecd54ddb860c29924c34f11b4ad15893ec4618b740f

See more details on using hashes here.

File details

Details for the file stocks_earnings_dates-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for stocks_earnings_dates-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e131b6043a7fb0d34a5353bb830cad294cee21a38a4dde3573058e79fce7add
MD5 a3f35f07cf1fae547f84e4c873ddad68
BLAKE2b-256 570adcbf1a650bc0ff54f82d7315cd6396bbb19cdd5f62153a513d538a45378a

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