abaquant.marketdata.financials.models¶
Import path: abaquant.marketdata.financials.models
Domain: Provider-neutral market-data facades, normalized records, caching, and analytics.
Purpose¶
Immutable financial-statement snapshot and line-item models.
When to use it¶
Defines structured inputs or model-facing data containers. Use this package to retrieve or inject quotes, price history, option chains, and financial statements while preserving a stable analytical interface.
Public objects¶
class:
FinancialLineItem— Resolved canonical line item with provider provenance.class:
FinancialStatementSnapshot— Immutable metadata wrapper around three normalized statement tables. *FinancialStatementSnapshot.income_statement— Return a defensive copy of the normalized income statement. *FinancialStatementSnapshot.balance_sheet— Return a defensive copy of the normalized balance sheet. *FinancialStatementSnapshot.cash_flow_statement— Return a defensive copy of the normalized cash-flow statement. *FinancialStatementSnapshot.canonical_line_items— Return a read-only canonical item mapping. *FinancialStatementSnapshot.raw_tables— Return defensive copies of income, balance-sheet, and cash-flow tables. *FinancialStatementSnapshot.visualize— Return a figure for the latest numeric column of one statement table.
Detailed reference¶
Immutable financial-statement snapshot and line-item models.
- class abaquant.marketdata.financials.models.FinancialLineItem(canonical_name, value, statement_type, reporting_date, source_label)¶
Bases:
objectResolved canonical line item with provider provenance.
- Parameters:
canonical_name (str)
value (float | None)
statement_type (str)
reporting_date (str | None)
source_label (str | None)
- class abaquant.marketdata.financials.models.FinancialStatementSnapshot(symbol, provider_name, period, retrieved_at_utc, _income_statement, _balance_sheet, _cash_flow_statement, _canonical_line_items, provenance=None)¶
Bases:
objectImmutable metadata wrapper around three normalized statement tables.
Table accessors return defensive deep copies; canonical line items are a read-only mapping. This prevents a caller from mutating cached state.
- Parameters:
symbol (str)
provider_name (str)
period (Literal['annual', 'quarterly'])
retrieved_at_utc (datetime)
_income_statement (DataFrame)
_balance_sheet (DataFrame)
_cash_flow_statement (DataFrame)
_canonical_line_items (Mapping[str, FinancialLineItem])
provenance (DataProvenance | None)
- property income_statement: DataFrame¶
Return a defensive copy of the normalized income statement.
- property balance_sheet: DataFrame¶
Return a defensive copy of the normalized balance sheet.
- property cash_flow_statement: DataFrame¶
Return a defensive copy of the normalized cash-flow statement.
- property canonical_line_items: Mapping[str, FinancialLineItem]¶
Return a read-only canonical item mapping.
- raw_tables()¶
Return defensive copies of income, balance-sheet, and cash-flow tables.
- Return type:
tuple[DataFrame, DataFrame, DataFrame]
- visualize(*, statement='balance_sheet', backend=None, theme=None, save_path=None, filename=None)¶
Return a figure for the latest numeric column of one statement table.
- Parameters:
statement (str)
backend (str | None)