HaverTicker

class qf_lib.common.tickers.tickers.HaverTicker(ticker: str, database_name: str, security_type: qf_lib.common.enums.security_type.SecurityType = <SecurityType.STOCK: 'STK'>, point_value: int = 1)[source]

Bases: qf_lib.common.tickers.tickers.Ticker

Haver tickers representation. For example E025RE@EUSRVYS -> ticker: E025RE, EUSRVYS: database_name

Parameters
  • ticker (str) – string containing series ID within a specific database

  • database_name (str) – name of the database where the series is located

  • 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

as_string()

returns a string that can be used by the official Haver API to get the series

from_string(ticker_str, Sequence[str]], …)

Example: HaverTicker.from_string(‘RECESSQ2@USECON’)

as_string() → str[source]

returns a string that can be used by the official Haver API to get the series

classmethod from_string(ticker_str: Union[str, Sequence[str]], security_type: qf_lib.common.enums.security_type.SecurityType = <SecurityType.STOCK: 'STK'>, point_value: int = 1) → Union[qf_lib.common.tickers.tickers.HaverTicker, Sequence[qf_lib.common.tickers.tickers.HaverTicker]][source]

Example: HaverTicker.from_string(‘RECESSQ2@USECON’)