Module RustQuant::instruments

source ·
Expand description

Financial instrument types and modules (bonds, options, etc).

§Bonds

  • Prices:
    • The Vasicek Model
    • The Cox, Ingersoll, and Ross Model
    • The Hull–White (One-Factor) Model
    • The Rendleman and Bartter Model
    • The Ho–Lee Model
    • The Black–Derman–Toy Model
    • The Black–Karasinski Model
  • Duration
  • Convexity

§Options

  • Closed-form price solutions:

    • Heston Model
    • Barrier
    • European
    • Greeks/Sensitivities
    • Lookback
    • Asian: Continuous Geometric Average
    • Forward Start
    • Bachelier and Modified Bachelier
    • Generalised Black-Scholes-Merton
    • Basket
    • Rainbow
    • American
  • Lattice models:

    • Binomial Tree (Cox-Ross-Rubinstein)

The stochastic process generators can be used to price path-dependent options via Monte-Carlo.

  • Monte Carlo pricing:
    • Lookback
    • Asian
    • Chooser
    • Barrier
use RustQuant::instruments::*;
use time::{Duration, OffsetDateTime};

let VanillaOption = EuropeanOption {
    initial_price: 100.,
    strike_price: 110.,
    risk_free_rate: 0.05,
    volatility: 0.3,
    dividend_rate: 0.02,
    evaluation_date: None,
    expiration_date: OffsetDateTime::now_utc() + Duration::days(365),
};

let prices = VanillaOption.price();

println!("Call price = {}", prices.0);
println!("Put price = {}", prices.1);

Re-exports§

Modules§