Skip to main content

Crate rustyqlib

Crate rustyqlib 

Source
Expand description

§RustyQLib

A lightweight quantitative finance library for pricing derivatives and performing risk analysis.

The crate is organised into asset-class modules:

  • core — shared building blocks: traits (core::traits::Instrument), quotes, term structures, interpolation and data models
  • equity — equity options, forwards and futures with Black-Scholes, binomial, Monte Carlo and finite-difference engines
  • rates — interest-rate instruments (deposits, FRAs) and curve building
  • risk — VaR / Expected Shortfall, portfolio scenario risk, volatility estimation, performance statistics and VaR backtesting
  • cmdty — commodity options
  • utils — random number generation, stochastic processes and the JSON/CLI plumbing used by the rustyqlib binary

§Example

Pricing contracts from JSON is the primary workflow (see the examples/ directory in the repository); the same types can be constructed directly and priced through the core::traits::Instrument trait.

Re-exports§

pub use crate::core::curves::Compounding;
pub use crate::core::curves::CurveInput;
pub use crate::core::curves::InterpolationMethod;
pub use crate::core::curves::Tenor;
pub use crate::core::curves::YieldCurve;
pub use crate::core::errors::RustyQLibError;
pub use crate::core::results::Greeks;
pub use crate::core::results::PricingResult;
pub use crate::equity::black76::FuturesSettlement;
pub use crate::equity::builder::EquityOptionBuilder;
pub use crate::core::depth::DepthLevel;
pub use crate::core::depth::MarketDepth;
pub use crate::core::market::BumpMode;
pub use crate::core::market::Depth;
pub use crate::core::market::Discount;
pub use crate::core::market::Market;
pub use crate::core::market::MarketKey;
pub use crate::core::market::RiskFactor;
pub use crate::core::market::Shock;
pub use crate::core::market::Spot;
pub use crate::core::market::Vol;
pub use crate::core::quotes::Quote;
pub use crate::core::calendar::BusinessDayConvention;
pub use crate::core::calendar::Calendar;
pub use crate::core::calendar::DateGeneration;
pub use crate::core::calendar::Period;
pub use crate::core::calendar::Schedule;
pub use crate::core::daycount::DayCountConvention;
pub use crate::core::traits::Instrument;
pub use crate::core::vols::VolInput;
pub use crate::core::vols::VolSurface;

Modules§

cmdty
core
equity
rates
risk
Risk analytics: Value-at-Risk, Expected Shortfall and the surrounding toolkit, one concern per file.
utils