abaquant.marketdata.financials.repository¶
Import path: abaquant.marketdata.financials.repository
Domain: Provider-neutral market-data facades, normalized records, caching, and analytics.
Purpose¶
Retrieval repository coordinating provider access and snapshot persistence.
When to use it¶
This module participates in the financial-statement pipeline: provider response, normalization, cache/repository coordination, canonical line-item resolution, and analytical input construction.
Public objects¶
class:
FinancialStatementRepository— Retrieve bundled statements and manage memory/disk snapshot lifecycles. *FinancialStatementRepository.get— Return a cached or freshly retrieved bundled snapshot. *FinancialStatementRepository.is_stale— Return whether retrieval age exceeds the configured threshold. *FinancialStatementRepository.status— Describe local snapshot availability without provider access. *FinancialStatementRepository.clear— Remove selected memory and disk snapshots.
Detailed reference¶
Retrieval repository coordinating provider access and snapshot persistence.
- class abaquant.marketdata.financials.repository.FinancialStatementRepository(symbol, provider, cache_mode='memory', cache_directory=None, session=None, default_max_age_days=7.0)¶
Bases:
objectRetrieve bundled statements and manage memory/disk snapshot lifecycles.
Bind one symbol, provider capability, session, and cache policy.
- Parameters:
cache_mode (CacheMode)
default_max_age_days (float)
- get(period='annual', refresh_policy='if_stale', max_age_days=None)¶
Return a cached or freshly retrieved bundled snapshot.
- Parameters:
period (Literal['annual', 'quarterly'])
refresh_policy (Literal['cache_only', 'if_missing', 'if_stale', 'refresh'])
max_age_days (float | None)
- Return type:
- static is_stale(snapshot, max_age_days)¶
Return whether retrieval age exceeds the configured threshold.
- status(period)¶
Describe local snapshot availability without provider access.
- clear(period=None)¶
Remove selected memory and disk snapshots.