optionrs
A high-performance, production-grade option pricing library for Rust, supporting classic pricing models (Black-Scholes, Binomial Tree, Monte Carlo, PDE numerical calculation) and exotic options (barrier, Asian, forward-start,etc).
Features
- Core Pricing Models:
- Black-Scholes (European calls/puts, Greeks, implied volatility)
- Binomial Tree (European/American options, Delta/Gamma)
- Monte Carlo Simulation (European/exotic options, path-dependent pricing)
- Exotic Options: Barrier, Asian (discrete geometric average), forward-start options
- Numerical Stability: Robust boundary condition handling (T=0, sigma=0)
- Type Safety: Clear, documented APIs with financial semantics
- Test Coverage: Full unit/integration/doc tests, validated against classic financial benchmarks
Installation
Add this to your Cargo.toml:
[]
= "1.1.0"
= "0.1.5"
= "0.9.2"
= "0.5.1"
= "1.11.0"
= "0.18.0"
Module Catalog
optionpricing/ # crate 根目录
├── Cargo.toml # 依赖/配置文件
├── README.md # 核心说明文档(必须放这里)
├── src/ # 源码目录
│ ├── lib.rs
│ │ ├──
│ ├── black_scholes/mod.rs
│ └── ...
└── tests/ # 集成测试目录
└── pricing_consistency.rs