QuandlTicker
- class qf_lib.common.tickers.tickers.QuandlTicker(ticker: str, database_name: str, database_type: QuandlDBType = QuandlDBType.Timeseries, security_type: SecurityType = SecurityType.STOCK, point_value: int = 1, currency: Optional[str] = None)[source]
Bases:
TickerRepresentation of Quandl tickers.
- Parameters:
ticker (str) – string containing series ID within a specific database
database_name (str) – name of the database where the series is located
database_type (QuandlDBType) – type of the database
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.
currency (str) – ISO code of the currency of the ticker. Example “USD”.
Methods:
Returns a string representation of a ticker
from_string(ticker_str[, db_type, ...])Example: QuandlTicker.from_string('WIKI/MSFT') Note: this method supports only the Timeseries tickers at the moment.
Attributes:
Returns a name of the ticker.
- classmethod from_string(ticker_str: Union[str, Sequence[str]], db_type: QuandlDBType = QuandlDBType.Timeseries, security_type: SecurityType = SecurityType.STOCK, point_value: int = 1, currency: Optional[str] = None) Union[QuandlTicker, Sequence[QuandlTicker]][source]
Example: QuandlTicker.from_string(‘WIKI/MSFT’) Note: this method supports only the Timeseries tickers at the moment.
- property name: str
Returns a name of the ticker. The property should be adjusted for different Ticker classes to provide a string representation of a Ticker, which in some cases could be more understandable than the output of as_string() function.