Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AI4Finance Foundation FinGPT Earning Calls Transcript Fetcher

From Leeroopedia
Knowledge Sources
Domains Data_Acquisition, Financial_Report_Analysis, NLP
Last Updated 2026-10-18 00:00 GMT

Overview

Concrete tool for fetching earnings call transcripts by ticker, quarter, and year from the discountingcashflows API provided by the FinGPT FinGPT_FinancialReportAnalysis subproject.

Description

The earning_calls module retrieves structured earnings call transcripts. It exposes three functions: `correct_date` (fixes mismatched transcript years), `extract_speakers` (regex-parses speaker names from transcript content), and `get_earnings_transcript` (the main fetcher, wrapped with tenacity retry logic for resilience against transient API failures).

Usage

Import `get_earnings_transcript` when you need to programmatically retrieve earnings call transcripts for financial analysis or as input to a RAG pipeline.

Code Reference

Source Location

Signature

def correct_date(yr, dt):
    """Fix transcript dates where the year doesn't match the expected year.

    Args:
        yr (int): expected year
        dt (str): date string in '%Y-%m-%d %H:%M:%S' format

    Returns:
        str: corrected date string
    """

def extract_speakers(cont: str) -> List[str]:
    """Extract unique speaker names from transcript content via regex.

    Args:
        cont (str): transcript text

    Returns:
        List[str]: unique speaker names
    """

@retry(wait=wait_random_exponential(min=1, max=5), stop=stop_after_attempt(2))
def get_earnings_transcript(quarter: str, ticker: str, year: int):
    """Fetch an earnings call transcript from discountingcashflows API.

    Args:
        quarter (str): e.g., "Q4"
        ticker (str): e.g., "AAPL"
        year (int): e.g., 2023

    Returns:
        dict: transcript record with corrected date and content
    """

Import

from fingpt.FinGPT_FinancialReportAnalysis.utils.earning_calls import (
    get_earnings_transcript, extract_speakers, correct_date,
)

I/O Contract

Inputs

Name Type Required Description
quarter str Yes Earnings quarter (e.g., "Q1", "Q4")
ticker str Yes Stock ticker symbol (e.g., "AAPL")
year int Yes Calendar year of the earnings call

Outputs

Name Type Description
transcript dict Contains content, date, year of the earnings call

Usage Examples

Fetch an AAPL Q4 2023 Transcript

from fingpt.FinGPT_FinancialReportAnalysis.utils.earning_calls import (
    get_earnings_transcript, extract_speakers,
)

# 1. Fetch the transcript
transcript = get_earnings_transcript(quarter="Q4", ticker="AAPL", year=2023)
print(f"Date: {transcript['date']}")
print(f"Content preview: {transcript['content'][:200]}...")

# 2. Extract speakers
speakers = extract_speakers(transcript["content"])
print(f"Speakers: {speakers}")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment