Crate RustQuant

source ·
Expand description

RustQuant: A Rust library for quantitative finance tools.

Copyright (C) 2022-2024 https://github.com/avhz

Dual licensed under Apache 2.0 and MIT.

See:

Contact me at: RustQuantContact@gmail.com

Any contributions are greatly appreciated. Make a PR or open an issue !

I’m particularly interested in hearing from people with strong experience in implementing quantitative software in a professional setting.

§Installation

In your Rust project’s root directory, simply run:

cargo add RustQuant

This will add the latest version to your project.

If you require a specific version, add the following to your Cargo.toml file:

[dependencies]
RustQuant = "*"

replacing "*" with the version number you require, such as "0.0.17".

Modules§

  • Reverse mode automatic differentation. Currently only gradients can be computed. Suggestions on how to extend the functionality to Hessian matrices are definitely welcome.
  • Module containing all money related items. This includes currencies, cashflows, exchange rates, and money types, among other things.
  • Data management module.
  • RustQuant error handling module. A custom error type RustQuantError is defined, along with a macro to create an error, that propagates a RustQuantError with the text to include in the output.
  • Financial instrument types and modules (bonds, options, etc).
  • ISO codes module.
  • Macros for RustQuant.
  • Mathematics related items.
  • Machine learning algorithms. This module relies on the nalgebra crate.
  • Module containing all models (e.g. Black-Scholes, Heston, etc). Also a Model trait is defined here for all models to implement.
  • A portfolio is a collection of Positions, which are simply a combination of an Instrument, a quantity, a purchase price, and a current price. You may also specify the Currency of the instrument.
  • Monte Carlo engines to simulate stochastic processes.
  • Time and date functionality.
  • Trading related items.

Macros§

  • Helper macro for tests to test floating point approximate equality.
  • Create a RustQuantError with the text to include in the output. You would use it as follows:
  • Plot a vector of values.

Constants§