quantrs 0.1.1

A tiny Rust library for quantitative finance
Documentation

quantrs

tests MIT licensed Crate docs.rs codecov-quantrs Crates.io MSRV

Quantrs is a tiny quantitative finance library for Rust. It is designed to be simple and easy to use, with a focus on performance and correctness. It is still in the early stages of development, so expect bugs and breaking changes.

Please check out the documentation here.

Features

Core Features

  • Options pricing
    • Black-Scholes
    • Binomial tree
    • Monte Carlo simulation
    • Greeks

Planned Features

  • Data retrieval
    • Yahoo Finance
    • Alpha Vantage
    • Quandl
    • IEX Cloud
  • Fixed income & IR
    • Bond pricing
    • Duration
    • Convexity
    • Yield curve
    • Term structure
    • Forward rates
    • Interest rate models
  • Time series analysis
    • Moving averages
    • Volatility
    • Correlation
    • Cointegration
    • ARIMA
    • GARCH
    • Kalman filter
  • Portfolio optimization
    • Mean-variance optimization
    • Black-Litterman model
    • Risk parity
    • Minimum variance
    • Maximum diversification

Usage

Add this to your Cargo.toml:

[dependencies]
quantrs = "0.1"

Now you can use the library in your code:

use quantrs::options::*;

fn main() {
    let option = BlackScholesOption {
        spot: 100.0,
        strike: 100.0,
        time_to_maturity: 1.0,
        risk_free_rate: 0.05,
        volatility: 0.2,
    };
    println!("Option price: {}", option.price(OptionType::Call));
}

See the documentation and the examples for more information.

Minimum supported Rust version (MSRV)

This crate requires a Rust version of 1.65.0 or higher. Increases in MSRV will be considered a semver non-breaking API change and require a version increase (PATCH until 1.0.0, MINOR after 1.0.0).

Contributing

If you find any bugs or have suggestions for improvement, please open a new issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE.md file for details.


© Carlo Bortolan

Carlo Bortolan  ·  GitHub carlobortolan  ·  contact via carlobortolan@gmail.com