HaverTicker#

class qf_lib.common.tickers.tickers.HaverTicker(ticker: str, database_name: str, security_type: SecurityType = SecurityType.STOCK, point_value: int = 1, currency: str | None = None)[source]#

Bases: 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.

  • currency (str) – ISO code of the currency of the ticker. Example “USD”.

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: str | Sequence[str], security_type: SecurityType = SecurityType.STOCK, point_value: int = 1, currency: str | None = None) HaverTicker | Sequence[HaverTicker][source]#

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