Documentation

FerroRisk

A pure-Rust options-analytics crate for pricing, implied volatility, full first- and second-order Greeks, volatility-surface calibration, live chain analytics, and scenario attribution — built so every consumer gets the same numerical answer on one shared evaluation path.

What it is

FerroRisk turns typed market inputs into pricing, Greeks, calibrated surfaces, and portfolio risk. Models are dispatched explicitly by name, unit conventions are stated at the API boundary, and analytics are composed over ordered, deterministic containers — never hidden mutable state.

Three pillars

  • Pricing & Greeks — seven models from European to American, lognormal to normal, deterministic to stochastic vol, with jumps. Full 10-Greek coverage on every model via greeks_all, plus fused contract_analytics for solved IV + forward + Greeks in one call.
  • Surfaces — SVI / SSVI / SABR calibration with a four-tier fit-quality contract, pluggable loss and priors, model-free forward recovery, and the canonical smile-panel readout.
  • Chain & scenarios — live chain exposure (DEX / GEX / VEX, walls, flip levels) and exact portfolio scenario attribution.

Start here

  • Getting started — add the crate and price your first contract.
  • Conventions — the unit contracts you need before reading any other page.
  • Pricing models — the seven models and when to reach for each.
  • The use-case guides — each one takes a workflow from typed input to typed output in a short, copy-pasteable snippet.
  • The API reference — the complete rustdoc for every public type, function, and trait.