Function quantmath::facade::currency_from_json[][src]

pub fn currency_from_json(source: &mut Read) -> Result<RcCurrency, Error>

A currency in QuantMath normally represents a literal currency such as USD. For simplicity we recommend that only major currencies are used. Thus a penny is represented as 0.01 GBP rather than 1 gbp. Currencies may also be used to represent some precious metal commodities such a XAU.

A currency is also an instrument, though normally currencies and instruments are treated separately. An exception would be where a currency is contained in a basket, meaning cash that is not discounted. The source is any source of UTF-8 bytes, such as a file or string.