Skip to content

v0.16.0

Choose a tag to compare

@joaquinbejar joaquinbejar released this 19 Apr 20:47
· 18 commits to main since this release
a901eb0

0.16.0

Breaking release. Focus: panic-free core, arithmetic discipline, typed errors, and a crate-wide discipline pass over attributes, docs, and test hygiene.

See CHANGELOG.md for the full Added / Changed / Fixed / Internal breakdown.

Highlights

  • Checked Decimal helpers (d_add/d_sub/d_mul/d_div/d_sum/d_sum_iter) route every monetary-path kernel through overflow-tagged arithmetic.
  • NonFinite { context, value } guards on every f64 → Decimal boundary inside pricing, Greeks, volatility, and simulation.
  • Step / simulation counts promoted to NonZeroUsize (breaking).
  • Crate-level #![deny(missing_docs, rustdoc::broken_intra_doc_links, clippy::indexing_slicing)] with scoped, documented escapes.
  • #[tracing::instrument] on public hot paths; #[cold] #[inline(never)] on every error constructor.
  • Deterministic RNG helper (utils::deterministic_rng) plus put-call parity / CRR convergence / Greek sanity regression tests.

Migration

Most breakage comes from:

  1. Functions returning Result<T, concrete_error> where they previously panicked — wrap call sites with ?.
  2. steps / simulations arguments now take NonZeroUsize — use optionstratlib::nz!(N) or NonZeroUsize::new(N).ok_or(..) at the boundary.
  3. unsafe blocks removed in favour of typed guards.