Skip to main content

A Python package to fetch, scrape, and analyze earnings call transcripts.

Project description

Earnings Call Sentiment Analyzer

This Python package provides a tool to fetch company profile data, scrape the latest earnings call transcript from The Motley Fool, perform sentiment analysis, and correlate sentiment with stock performance.

Features

  • Flexible Transcript Scraping: Automatically finds and scrapes earnings call transcripts for a given stock ticker from fool.com, with options to specify a particular quarter and year or default to the latest.
  • Company Data: Fetches company profile information (sector, industry) from the Financial Modeling Prep API.
  • AI-Powered Sentiment Analysis: Uses the Google Gemini API to analyze the transcript and provide a sentiment score, confidence level, and key discussion themes.
  • Data Persistence: Stores company profiles, earnings call details, sentiment analysis results, and stock performance data in a local SQLite database (earnings_analyzer.db).
  • Structured Output: Returns a clean dictionary object containing all the fetched and analyzed data, including the earnings call date and quarter.
  • Robust Error Handling: Includes comprehensive error handling and logging for API calls, data processing, and database operations.

Installation

This package is not yet available on PyPI. You can install it directly from the GitHub repository:

pip install git+https://github.com/jeremiahbohr/earnings-analyzer.git

Prerequisites

Before using the package, you must set up the required API keys. Create a file named .env in the directory where you will run the script (or set them as environment variables) and add the following keys:

GEMINI_API_KEY=your_gemini_api_key_here
FMP_API_KEY=your_financial_modeling_prep_api_key_here

Usage

The package provides an EarningsAnalyzer class that encapsulates the entire workflow. You can use it in your own Python script or via the command-line interface.

Data Usage Disclaimer

This tool is for educational and research purposes. Users are responsible for:

  • Obtaining proper API keys and respecting rate limits
  • Complying with data provider terms of service
  • Not using for illegal market manipulation

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

earnings_analyzer-1.0.1.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

earnings_analyzer-1.0.1-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file earnings_analyzer-1.0.1.tar.gz.

File metadata

  • Download URL: earnings_analyzer-1.0.1.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for earnings_analyzer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f5ea4686a9c694261fe5d1bb7ad998b9d930b4e8cd2ca037c25e241e9088632a
MD5 764fae733b3ea5d867a85518cac830b1
BLAKE2b-256 27a3cd1c5a28ddd991ca47828fc55a1bf95cb873cb2f583d247d1a8d0964c711

See more details on using hashes here.

File details

Details for the file earnings_analyzer-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for earnings_analyzer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d3fcf3baf3c3a9df6cb66f287e8193beefe13a5348fc8e57f7bbb8c7c4b7e3e
MD5 b7075a6936de7184fa4357654609f807
BLAKE2b-256 8025a816b708616af25fab6c6af887f81d0f93991272b768eca7322525dfd237

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