RustQuant_instruments/
lib.rs

1// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2// RustQuant: A Rust library for quantitative finance tools.
3// Copyright (C) 2023-2024 https://github.com/avhz
4// Dual licensed under Apache 2.0 and MIT.
5// See:
6//      - LICENSE-APACHE.md
7//      - LICENSE-MIT.md
8// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9
10//! Financial instrument types and modules (bonds, options, etc).
11//!
12//! ### Options
13//!
14//! The following options and pricing methods are implemented:
15//!
16//! | Option | Analytic | Monte-Carlo | Finite Difference | Lattice | Greeks |
17//! |--------|:--------:|:-----------:|:-----------------:|:-------:|:------:|
18//! | Asian         |❌|✅|❌|❌|❌|
19//! | Barrier       |❌|✅|❌|❌|❌|
20//! | Basket        |❌|❌|❌|❌|❌|
21//! | Binary        |❌|✅|❌|❌|❌|
22//! | Chooser       |❌|❌|❌|❌|❌|
23//! | Cliquet       |❌|❌|❌|❌|❌|
24//! | Compound      |❌|❌|❌|❌|❌|
25//! | Exchange      |❌|❌|❌|❌|❌|
26//! | Forward Start |❌|❌|❌|❌|❌|
27//! | Log           |❌|✅|❌|❌|❌|
28//! | Lookback      |❌|✅|❌|❌|❌|
29//! | Power         |❌|✅|❌|❌|❌|
30//! | Quanto        |❌|❌|❌|❌|❌|
31//! | Spread        |❌|❌|❌|❌|❌|
32//! | Supershare    |❌|✅|❌|❌|❌|
33//! | Vanilla       |✅|✅|✅|✅|✅|
34//!
35//! - Closed-form price solutions:
36//!   - [x] Generalised Black-Scholes-Merton
37//!   - [x] Bachelier and Modified Bachelier
38//!   - [x] Heston Model
39//!
40//! - Lattice models:
41//!   - [x] Binomial Tree (Cox-Ross-Rubinstein)
42//!
43//! ### Bonds
44//!
45//! ### FX
46//!
47//! ### Equities
48//!
49//! ### Commodities
50
51/// Base trait for all instruments.
52pub mod instrument;
53pub use instrument::*;
54
55/// Bond pricing models.
56pub mod bonds;
57// pub use bonds::*;
58
59/// Option pricers and sensitivity functions.
60pub mod options;
61pub use options::*;
62
63/// FX instruments.
64pub mod fx;
65pub use fx::*;
66
67/// Equity instruments.
68pub mod equities;
69pub use equities::*;
70
71/// Ticker symbol.
72pub mod ticker;
73pub use ticker::*;
74
75/// Generic derivative payoff trait.
76pub mod payoff;
77pub use payoff::*;
78
79/// Analytic option pricer.
80pub mod analytic_option_pricer;
81pub use analytic_option_pricer::*;
82
83/// Monte-Carlo pricer.
84pub mod monte_carlo_pricer;
85pub use monte_carlo_pricer::*;