abaquant.marketdata.universe¶
Import path: abaquant.marketdata.universe
Domain: Provider-neutral market-data facades, normalized records, caching, and analytics.
Purpose¶
Lazy multi-ticker market-data universe.
When to use it¶
Use this package to retrieve or inject quotes, price history, option chains, and financial statements while preserving a stable analytical interface.
Public objects¶
function:
get_tickers— Create a lazy applied universe for normalized ticker symbols.class:
MarketUniverse— Lazy multi-ticker facade with immutable symbols and a separate session. *MarketUniverse.visualize— Return a normalized multi-ticker price-history figure.function:
normalize_symbols— Normalize, validate, and de-duplicate ticker symbols.function:
resolve_provider— Resolve a provider name or provider instance to the market-data protocol.
Detailed reference¶
Lazy multi-ticker market-data universe.
Purpose¶
The module creates MarketUniverse instances that coordinate shared price histories, return statistics, and static portfolio workflows for normalized ticker collections.
Conventions¶
Symbols are uppercase and de-duplicated in first-seen order. Construction does not make provider calls.
References
[ 1 ] Markowitz, H. (1952), “Portfolio Selection”.
- abaquant.marketdata.universe.get_tickers(symbols, provider='yahoo')¶
Create a lazy applied universe for normalized ticker symbols.
- Parameters:
symbols (Sequence[str]) – Ticker symbols to normalize and include in the applied universe.
provider (str | MarketDataProvider, default='yahoo') – Provider name or object satisfying the market-data provider protocol.
- Returns:
Lazy multi-ticker universe. Constructing it does not fetch remote data.
- Return type:
Notes
The applied layer normalizes provider data but cannot guarantee provider completeness, timeliness, or accuracy.
- class abaquant.marketdata.universe.MarketUniverse(symbols, provider, session=None)¶
Bases:
objectLazy multi-ticker facade with immutable symbols and a separate session.
Create a universe facade without loading any price history.
- Parameters:
symbols (tuple[str, ...])
provider (MarketDataProvider)
session (UniverseSession | None)
- visualize(*, period='1y', interval='1d', auto_adjust=True, alignment='inner', backend=None, theme=None, save_path=None, filename=None)¶
Return a normalized multi-ticker price-history figure.
The underlying price panel is retrieved lazily and rendered without an implicit interactive display call.
- Parameters:
period (str | None)
interval (str)
auto_adjust (bool)
alignment (str)
backend (str | None)
- abaquant.marketdata.universe.normalize_symbols(symbols)¶
Normalize, validate, and de-duplicate ticker symbols.
- Parameters:
symbols (Sequence[str]) – Ticker symbols to normalize and include in the applied universe.
- Returns:
Positional outputs produced by the normalize symbols calculation.
- Return type:
tuple[str, …]
Notes
The applied layer normalizes provider data but cannot guarantee provider completeness, timeliness, or accuracy.
- abaquant.marketdata.universe.resolve_provider(provider)¶
Resolve a provider name or provider instance to the market-data protocol.
- Parameters:
provider (str | MarketDataProvider) – Provider name or object satisfying the market-data provider protocol.
- Returns:
Result of the resolve provider calculation.
- Return type:
Notes
The applied layer normalizes provider data but cannot guarantee provider completeness, timeliness, or accuracy.