BloombergTicker
- class qf_lib.common.tickers.tickers.BloombergTicker(ticker: str, security_type: SecurityType = SecurityType.STOCK, point_value: int = 1)[source]
Bases:
Ticker
Representation of Bloomberg tickers.
- Parameters:
ticker (str) – identifier of the security, e.g. ‘CTZ9 Comdty’ or ‘MSFT US Equity’
security_type (SecurityType) – denotes the type of the security, that the ticker is representing e.g. SecurityType.STOCK for a stock, SecurityType.FUTURE for a futures contract etc. By default equals SecurityType.STOCK.
point_value (int) – size of the contract as given by the ticker’s Data Provider. Used mostly by tickers of security_type FUTURE and by default equals 1.
Methods:
from_string
(ticker_str[, security_type, ...])Example: BloombergTicker.from_string('SPX Index')
- classmethod from_string(ticker_str: Union[str, Sequence[str]], security_type: SecurityType = SecurityType.STOCK, point_value: int = 1) Union[BloombergTicker, Sequence[BloombergTicker]] [source]
Example: BloombergTicker.from_string(‘SPX Index’)