Skip to content

Fundamental data tools

fundamental_data_tools

Functions:

Name Description
get_fundamentals

Retrieve comprehensive fundamental data for a given ticker symbol.

get_balance_sheet

Retrieve balance sheet data for a given ticker symbol.

get_cashflow

Retrieve cash flow statement data for a given ticker symbol.

get_income_statement

Retrieve income statement data for a given ticker symbol.

get_fundamentals

get_fundamentals(ticker: str, curr_date: str) -> str

Retrieve comprehensive fundamental data for a given ticker symbol.

Parameters:

Name Type Description Default

ticker

str

Ticker symbol of the company.

required

curr_date

str

Current trading date in YYYY-MM-DD format.

required

Returns:

Name Type Description
str str

A formatted report containing comprehensive fundamental data.

Source code in src/tradingagents/agents/utils/fundamental_data_tools.py
@tool
def get_fundamentals(
    ticker: Annotated[str, "ticker symbol"],
    curr_date: Annotated[str, "current date you are trading at, yyyy-mm-dd"],
) -> str:
    """Retrieve comprehensive fundamental data for a given ticker symbol.

    Args:
        ticker (str): Ticker symbol of the company.
        curr_date (str): Current trading date in YYYY-MM-DD format.

    Returns:
        str: A formatted report containing comprehensive fundamental data.
    """
    return _get_fundamentals(ticker, curr_date)

get_balance_sheet

get_balance_sheet(ticker: str, freq: str = 'quarterly', curr_date: str | None = None) -> str

Retrieve balance sheet data for a given ticker symbol.

Parameters:

Name Type Description Default

ticker

str

Ticker symbol of the company.

required

freq

str

Reporting frequency, either annual or quarterly. Defaults to "quarterly".

'quarterly'

curr_date

str | None

Current trading date in YYYY-MM-DD format. Defaults to None.

None

Returns:

Name Type Description
str str

A formatted report containing balance sheet data.

Source code in src/tradingagents/agents/utils/fundamental_data_tools.py
@tool
def get_balance_sheet(
    ticker: Annotated[str, "ticker symbol"],
    freq: Annotated[str, "reporting frequency: annual/quarterly"] = "quarterly",
    curr_date: Annotated[str | None, "current date you are trading at, yyyy-mm-dd"] = None,
) -> str:
    """Retrieve balance sheet data for a given ticker symbol.

    Args:
        ticker (str): Ticker symbol of the company.
        freq (str, optional): Reporting frequency, either annual or quarterly.
            Defaults to "quarterly".
        curr_date (str | None, optional): Current trading date in YYYY-MM-DD
            format. Defaults to None.

    Returns:
        str: A formatted report containing balance sheet data.
    """
    return _get_balance_sheet(ticker, freq, curr_date)

get_cashflow

get_cashflow(ticker: str, freq: str = 'quarterly', curr_date: str | None = None) -> str

Retrieve cash flow statement data for a given ticker symbol.

Parameters:

Name Type Description Default

ticker

str

Ticker symbol of the company.

required

freq

str

Reporting frequency, either annual or quarterly. Defaults to "quarterly".

'quarterly'

curr_date

str | None

Current trading date in YYYY-MM-DD format. Defaults to None.

None

Returns:

Name Type Description
str str

A formatted report containing cash flow statement data.

Source code in src/tradingagents/agents/utils/fundamental_data_tools.py
@tool
def get_cashflow(
    ticker: Annotated[str, "ticker symbol"],
    freq: Annotated[str, "reporting frequency: annual/quarterly"] = "quarterly",
    curr_date: Annotated[str | None, "current date you are trading at, yyyy-mm-dd"] = None,
) -> str:
    """Retrieve cash flow statement data for a given ticker symbol.

    Args:
        ticker (str): Ticker symbol of the company.
        freq (str, optional): Reporting frequency, either annual or quarterly.
            Defaults to "quarterly".
        curr_date (str | None, optional): Current trading date in YYYY-MM-DD
            format. Defaults to None.

    Returns:
        str: A formatted report containing cash flow statement data.
    """
    return _get_cashflow(ticker, freq, curr_date)

get_income_statement

get_income_statement(ticker: str, freq: str = 'quarterly', curr_date: str | None = None) -> str

Retrieve income statement data for a given ticker symbol.

Parameters:

Name Type Description Default

ticker

str

Ticker symbol of the company.

required

freq

str

Reporting frequency, either annual or quarterly. Defaults to "quarterly".

'quarterly'

curr_date

str | None

Current trading date in YYYY-MM-DD format. Defaults to None.

None

Returns:

Name Type Description
str str

A formatted report containing income statement data.

Source code in src/tradingagents/agents/utils/fundamental_data_tools.py
@tool
def get_income_statement(
    ticker: Annotated[str, "ticker symbol"],
    freq: Annotated[str, "reporting frequency: annual/quarterly"] = "quarterly",
    curr_date: Annotated[str | None, "current date you are trading at, yyyy-mm-dd"] = None,
) -> str:
    """Retrieve income statement data for a given ticker symbol.

    Args:
        ticker (str): Ticker symbol of the company.
        freq (str, optional): Reporting frequency, either annual or quarterly.
            Defaults to "quarterly".
        curr_date (str | None, optional): Current trading date in YYYY-MM-DD
            format. Defaults to None.

    Returns:
        str: A formatted report containing income statement data.
    """
    return _get_income_statement(ticker, freq, curr_date)