Skip to content

resolve_profiles


function backtide.data.resolve_profiles(symbols, instrument_type, interval, verbose=True)

Resolve the instrument profiles needed to download a set of symbols.

Resolves all instruments corresponding to the provided symbols. Also resolves the required instruments to convert the given symbols to the base currency, including any triangulation intermediaries. Returns a flat, deduplicated list.

Parameters

symbols : str | Instrument | list[str | Instrument]

Symbols for which to get the instruments. The symbols should be of the canonical form expected by backtide.

instrument_type : str | InstrumentType
For which instrument type to get the instruments.

interval : str | Interval | list[str | Interval]
Interval(s) for which to resolve the download information.

verbose : bool, default=True
Whether to display a progress bar while resolving.

Returns

list[InstrumentProfile]

Instrument profiles (direct instruments and currency legs, deduplicated).


See Also

download_bars

Download OHLCV data for the instruments described in a list of profiles.

fetch_instruments

Get instruments given their symbols.

list_instruments

List available instruments for a given instrument type.


Example

>>> from backtide.data import resolve_profiles

>>> print(resolve_profiles(["AAPL", "MSFT"], "stocks", "1d"))

[InstrumentProfile(instrument=Instrument(symbol="AAPL", name="Apple Inc.", base=None, quote="USD", instrument_type="stocks", exchange="XNAS", provider=Yahoo), earliest_ts={1d: 345479400}, latest_ts={1d: 1779044810}, legs=[]), InstrumentProfile(instrument=Instrument(symbol="MSFT", name="Microsoft Corporation", base=None, quote="USD", instrument_type="stocks", exchange="XNAS", provider=Yahoo), earliest_ts={1d: 511108200}, latest_ts={1d: 1779044809}, legs=[])]