Investment Studio > Expressions > Functions > Financial > CURRENCY_CONVERT
float currency_convert(string from_currency, string to_currency, date conversion_date, float from_value = 1)
Returns the equivalent in the destination currency (identified by the currency code to_currency) of the amount from_value in the source currency (identified by the currency code from_currency) on the date conversion_date.
Automatic type conversion allows the use of date strings as arguments instead of explicit date values.
If from_value is omitted, it defaults to 1, causing the conversion rate to be returned.
Conversion is performed using the forex quote for conversion_date. If no quote is available for that date, the first quote preceding conversion_date is used. If no quote is available for the whole date range <= conversion_date, the oldest available quote (i.e. the first quote subsequent to conversion_date) is used.
If the requested conversion can not be performed, e.g. because the necessary forex table is not loaded, the result is an error (#N/A).
Example
Assuming standard US date format settings, the equivalent in Swiss Francs of 10 US Dollars on March 15, 2001 can be obtained with the expression
=currency_convert("CHF", "USD", "3/15/2001", 10)
To get the conversion rate, it's enough to write
=currency_convert("CHF", "USD", "3/15/2001")