| exchange_rate | R Documentation |
Currency symbols (like any symbol) may be any combination of alphanumeric characters, but the FX market has a convention that says that the first currency in a currency pair is the 'target' and the second currency in the symbol pair is the currency the rate ticks in. So 'EURUSD' can be read as 'USD per 1 EUR'.
exchange_rate(
primary_id = NULL,
currency = NULL,
counter_currency = NULL,
tick_size = 0.01,
identifiers = NULL,
assign_i = TRUE,
overwrite = TRUE,
...
)
primary_id |
string identifier, usually expressed as a currency pair 'USDYEN' or 'EURGBP' |
currency |
string identifying the currency the exchange rate ticks in |
counter_currency |
string identifying the currency which the rate uses as the base 'per 1' multiplier |
tick_size |
minimum price change |
identifiers |
named list of any other identifiers that should also be stored for this instrument |
assign_i |
TRUE/FALSE. Should the instrument be assigned in the
|
overwrite |
|
... |
any other passthru parameters |
In FinancialInstrument the currency of the instrument should
be the currency that the spot rate ticks in, so it will typically be the
second currency listed in the symbol.
Thanks to Garrett See for helping sort out the inconsistencies in different naming and calculating conventions.
When 'assign_i = TRUE', a character vector containing the 'primary_id' values of the exchange-rate instruments assigned to the registry. When 'assign_i = FALSE', an exchange-rate instrument object is returned for scalar input, or a list of such objects for vectorized input.
https://www.investopedia.com/terms/b/basecurrency.asp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.