quantsupport 0.1.5

Rust library for derivative pricing and risk analytics.
Documentation
/// [`AssetClass`] represents the different asset classes that an instrument can be part of.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum AssetClass {
    /// Fixed income products (bonds, deposits and other cash-associated products).
    FixedIncome,
    /// Interest rate derivatives (caps, floors, swaps, among others).
    InterestRate,
    /// Equity products (options, forwards, etc.).
    Equity,
    /// Fx products (fx swaps, forwards, etc.).
    Fx,
    /// Credit derivatives (CDS, baskets, etc.).
    Credit,
    /// Other instruments not contained in the previous categories.
    Other,
}

/// Catalogs any financial product.
///
/// Financial products have more characteristics (i.e. start date, initial spread, strike, etc.) that
/// structs that implement [`Instrument`] could provide.
pub trait Instrument: Send + Sync {
    /// Market-associated name of the instrument. For example, it could be the name of the stock, CUSIP of a bond, among others.
    fn identifier(&self) -> String;
}