https://github.com/siddharthqs/rustyqlib
RustyQlib: A quant library for derivative pricing and quantitative finance
https://github.com/siddharthqs/rustyqlib
commodities derivatives equity options-pricing quant-finance quantitative-trading risk-management rust rust-lang trading
Last synced: 5 months ago
JSON representation
RustyQlib: A quant library for derivative pricing and quantitative finance
- Host: GitHub
- URL: https://github.com/siddharthqs/rustyqlib
- Owner: siddharthqs
- License: mit
- Created: 2022-08-26T02:44:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T09:23:40.000Z (12 months ago)
- Last Synced: 2025-09-02T17:59:05.819Z (5 months ago)
- Topics: commodities, derivatives, equity, options-pricing, quant-finance, quantitative-trading, risk-management, rust, rust-lang, trading
- Language: Rust
- Homepage:
- Size: 6.99 MB
- Stars: 18
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License
Awesome Lists containing this project
README
[](https://github.com/siddharthqs/RustyQLib/actions/workflows/rust.yml)
[](https://opensource.org/licenses/MIT)


[](https://codecov.io/gh/siddharthqs/RustyQLib)
# RUSTYQLib :Pricing Options with Confidence using JSON
RustyQLib is a lightweight yet robust quantitative finance library designed for pricing options.
Built entirely in Rust, it offers a unique combination of safety, performance, and expressiveness that is crucial
for handling financial data and complex calculations. RustyQlib simplifies option pricing without compromising
on safety, speed, or usability. It uses JSON to make distributed computing easier and integration with other systems or your websites.
## License
RustyQlib is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
## Running
After cloning the repository and building you can run the following command:
```bash
rustyqlib file --input --output
````
and for pricing all contracts in a directory
```bash
rustyqlib dir --input --output
```
and for interactive mode
```bash
rustyqlib interactive
```
and for build mode to build vol surface or interest rate curve
```bash
rustyqlib build --input --output
```
Sample input file is provided in the repository (src\input\equity_option.json)
Files are in JSON format and can be easily edited with any text editor.
## Features
### JSON Simplicity:
- Ease of Use: Providing input data in JSON format is straightforward and human-readable.
- Portability: JSON is a platform-independent format, so you can use it on any operating system.
- Flexibility: JSON accommodates various data types and structures, enabling you to define not only the option details but also additional market data, historical information, and risk parameters as needed.
- Integration-Ready: You can seamlessly connect it to data sources, trading platforms, or other financial systems, simplifying your workflow and enhancing automation.
### Stypes:
- [x] European
- [x] American
- [ ] Bermudan
- [ ] Asian
### Instruments:
#### Equity
- [x] Equity Forward
- [x] Equity Future
- [x] Equity Option
- [ ] Equity Forward Start Option
- [ ] Equity Basket
- [ ] Equity Barrier
- [ ] Equity Lookback
- [ ] Equity Asian
- [ ] Equity Rainbow
- [ ] Equity Chooser
#### Interest Rate
- [x] Deposit
- [ ] FRA
- [ ] Interest Rate Swap
#### Commodities
- [x] Commodity Option
- [ ] Commodity Forward Start Option
- [ ] Commodity Barrier
- [ ] Commodity Lookback
### Pricing engines:
- [x] Black Scholes
- [x] Binomial Tree
- [x] Monte Carlo
- [ ] Finite Difference
- [ ] Longstaff-Schwartz
- [ ] Heston
- [ ] Local Volatility
- [ ] Stochastic Volatility
- [ ] Jump Diffusion