Exchange rates

Daily exchange rates are available between most major currencies.

Retrieve exchange rate

fx(base, quote, source)

Retrieve the daily exchange rate between the two currencies. The value is the number of units of the quote currency required to buy one unit of the base currency. The currencies are specified using their three-letter ISO codes (ISO 4217).

Parameters
  • base (str) – the base currency

  • quote (str) – the quote currency

  • source (str) – source of the currency rates, ‘factset’ (default) or ‘quandl’

The ‘quandl’ source provides exchange rates from the ECB that may be exported. The ‘factset’ source has better currency coverage, but is not exportable.

To get the exchange rate from pound sterling to US dollars:

fx('GBP', 'USD')

Currency conversion

signal.convert_currency(base, quote)

Convert a signal from one currency to another. For signals that are evaluated for a company, a company-relative identifier may be specified. The supported company-relative identifiers are:

  • factset_estimate: Represents the currency of factset estimates and actuals for the company.

  • factset_fundamental: Represents the currency of factset fundamental data for the company.

  • factset_price: Represents the currency of factset price data for the company.

Parameters
  • base – The base currency. Must be specified either as a three-letter ISO code (ISO 4217) or as one of the company-relative currency identifiers.

  • quote – The quote currency. Must be specified either as a three-letter ISO code (ISO 4217) or as one of the company-relative currency identifiers.

To convert close price to NOK:

close_price.convert_currency("factset_price", "NOK")

The convert sales actual to EUR:

actual("sales").convert_currency("factset_estimate", "EUR")