fmp_py.fmp_statement_analysis
Classes
Module Contents
- class fmp_py.fmp_statement_analysis.FmpStatementAnalysis(api_key: str = os.getenv('FMP_API_KEY'))
Bases:
fmp_py.fmp_base.FmpBase- enterprise_values(symbol: str) pandas.DataFrame
Retrieves the enterprise values data for a given stock symbol.
- Parameters:
symbol (str) – The stock symbol.
- Returns:
A DataFrame containing the enterprise values data.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is found for the given symbol.
- owner_earnings(symbol: str) pandas.DataFrame
Retrieves the owner’s earnings data for a given stock symbol.
- Parameters:
symbol (str) – The stock symbol.
- Returns:
A DataFrame containing the owner’s earnings data.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is found for the given symbol.
- financial_growth(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame
Retrieves the financial growth data for a given stock symbol.
- Parameters:
symbol (str) – The stock symbol.
period (str, optional) – The period of the data (e.g., “annual”, “quarterly”). Defaults to “annual”.
limit (int, optional) – The maximum number of records to retrieve. Defaults to 20.
- Returns:
A DataFrame containing the financial growth data.
- Return type:
pd.DataFrame
- Raises:
ValueError – If the period is not “annual” or “quarterly”.
ValueError – If no data is found for the given symbol.
- balance_sheet_growth(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame
Retrieves the balance sheet growth data for a given symbol.
- Parameters:
symbol (str) – The stock symbol.
period (str, optional) – The period of the data. Can be ‘annual’ or ‘quarterly’. Defaults to ‘annual’.
limit (int, optional) – The maximum number of records to retrieve. Defaults to 20.
- Returns:
A DataFrame containing the balance sheet growth data.
- Return type:
pd.DataFrame
- Raises:
ValueError – If an invalid period is provided.
ValueError – If no data is found for the given symbol.
- income_growth(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame
Retrieves the income statement growth data for a given symbol.
- Parameters:
symbol (str) – The stock symbol.
period (str, optional) – The period of the data (e.g., “annual”, “quarter”). Defaults to “annual”.
limit (int, optional) – The number of data points to retrieve. Defaults to 20.
- Returns:
A DataFrame containing the income statement growth data.
- Return type:
pd.DataFrame
- Raises:
ValueError – If the provided period is invalid.
ValueError – If no data is found for the given symbol.
- cashflow_growth(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame
Retrieves the cash flow growth data for the given stock symbol and period.
- Parameters:
symbol (str) – The stock symbol to retrieve the cash flow growth data for.
period (str, optional) – The period to retrieve the data for, either ‘annual’ or ‘quarter’. Defaults to ‘annual’.
limit (int, optional) – The maximum number of records to retrieve. Defaults to 20.
- Returns:
A DataFrame containing the cash flow growth data for the given stock symbol and period.
- Return type:
pd.DataFrame
- Raises:
ValueError – If the period is not ‘annual’ or ‘quarter’.
ValueError – If no data is found for the given symbol and period.
- financial_score(symbol: str) fmp_py.models.statement_analysis.FinancialScore
Retrieves the financial score for a given symbol.
- Parameters:
symbol (str) – The symbol of the company.
- Returns:
An object containing the financial score data.
- Return type:
- Raises:
ValueError – If the symbol is invalid.
- ratios_ttm(symbol: str) fmp_py.models.statement_analysis.Ratios
Retrieves the trailing twelve months (TTM) financial ratios for a given symbol.
- Parameters:
symbol (str) – The symbol of the company.
- Returns:
An instance of the Ratios class containing the TTM financial ratios.
- Return type:
- Raises:
ValueError – If the symbol is invalid.
- ratios(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame
Retrieve financial ratios for a given symbol.
- Parameters:
symbol (str) – The symbol of the company.
period (str, optional) – The period of the ratios. Defaults to “annual”.
limit (int, optional) – The maximum number of ratios to retrieve. Defaults to 20.
- Returns:
A DataFrame containing the financial ratios.
- Return type:
pd.DataFrame
- Raises:
ValueError – If the period is not ‘annual’ or ‘quarter’.
ValueError – If no data is found for the symbol.
- key_metrics_ttm(symbol: str) fmp_py.models.statement_analysis.KeyMetrics
Retrieves the key metrics for a given symbol over the trailing twelve months (TTM).
- Parameters:
symbol (str) – The stock symbol for which to retrieve the key metrics.
- Returns:
An instance of the KeyMetrics class containing the key metrics data.
- Return type:
- Raises:
ValueError – If no data is found for the given symbol.
- key_metrics(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame
Retrieves key metrics for a given symbol.
- Parameters:
symbol (str) – The stock symbol.
period (str, optional) – The period for which to retrieve the metrics. Defaults to “annual”.
limit (int, optional) – The maximum number of metrics to retrieve. Defaults to 20.
- Returns:
A DataFrame containing the key metrics.
- Return type:
pd.DataFrame
- Raises:
ValueError – If the period is not “annual” or “quarter”.
ValueError – If no data is found for the symbol.