Skip to content

Releases: joaquinbejar/OptionStratLib

v0.16.5

20 Apr 07:04
c7cfd85

Choose a tag to compare

0.16.5 — documentation refresh

Documentation-only release. Refreshes the crate-level rustdoc and the README so both describe the 0.16 quality discipline.

Changed

  • New sections in `src/lib.rs` / `README.md`:
    • Quality & Discipline (0.16.x): checked `Decimal` helpers, `NonFinite` guards, `NonZeroUsize` step counts, `deny(clippy::indexing_slicing)` / `deny(missing_docs)`, `#[tracing::instrument]` hot paths, `utils::deterministic_rng`, pricing-identity regression tests.
    • Arithmetic-Error Cascade mermaid.
    • Observability mermaid (five instrumented public hot paths).
  • Testing section updated to current counts (3760 lib + 205 doctests) with explicit mentions of the seeded-RNG helper and identity tests.
  • Examples section rewritten for the shipped sub-crate layout with the correct `--manifest-path=` invocation.
  • Prerequisites updated (Rust 1.85 / 2024 edition), feature list documents `plotly`/`static_export`/`async`.

v0.16.4

20 Apr 06:36
123981c

Choose a tag to compare

0.16.4

Changed

  • Bump workspace dependencies: `rust_decimal` 1.40 → 1.41, `rayon` 1.11 → 1.12, `uuid` 1.19 → 1.23, `tokio` 1.43 → 1.52.

Fixed

  • Repair three doctests broken by the `NonZeroUsize` migration in 0.16.0:
    • `src/pricing/mod.rs` — `telegraph(..)` / `monte_carlo_option_pricing(..)` examples now wrap literal step / simulation counts with `nz!(..)`.
    • `src/utils/others.rs` — `deterministic_rng` doctest imports `rand::RngExt` for `.random::()`.

205 doctests / 3760 lib tests pass on the bumped deps.

v0.16.3

20 Apr 06:05
3ba1dcb

Choose a tag to compare

0.16.3 — example-runtime fixes

See CHANGELOG.md.

Fixed

  • #385 / #386 — Simulation-heavy demo binaries (`long_call_strategy_simulation`, `short_put_strategy_simulation`, `position_simulator`, `strategy_simulator`, `random_walk_chain`) now use an hourly grid over the week instead of a minute-level grid (10 080 × 100 steps, 43 200 for the chain walker). They finish in a few seconds in debug mode instead of timing out.
  • #386 — `examples_volatility::test` brute-force scan cut from 1 000 000 to 10 000 iterations — demo, not local benchmark.

v0.16.2

19 Apr 22:00
28d14d2

Choose a tag to compare

0.16.2 — example-run hot-fixes

See CHANGELOG.md.

Fixed

  • #387 — Strategy P&L / break-even arithmetic panicked mid-optimizer-scan with `Positive invariant broken` in `CallButterfly`, `LongButterflySpread`, and `BullPutSpread::get_max_loss`. All four sites now lower to `Decimal` and rewrap via `Positive::new_decimal(..)`; invalid candidates are dropped cleanly or surfaced as typed `StrategyError` instead of panicking. Unblocks the `strategy_best{area,ratio}` / `_delta` examples.
  • #388 — `examples_chain::async_chain_ops` now writes to a tempdir it creates; `examples_chain::creator` now points at the Germany-40 JSON that actually ships in `examples/Chains/`.

v0.16.1

19 Apr 21:32
594164b

Choose a tag to compare

Fix chain test fixtures and doc link warning

v0.16.0

19 Apr 20:47
a901eb0

Choose a tag to compare

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.

v0.15.3

15 Apr 17:19
0af60a6

Choose a tag to compare

What's Changed

Dependency bump to support the new major release of the upstream positive, expiration_date, financial_types, and option_type crates.

Dependencies

  • positive 0.4 → 0.5 (breaking: private inner field, Neg removed, checked arithmetic)
  • expiration_date 0.1 → 0.2 (day-count conventions, derived Debug)
  • financial_types 0.1 → 0.2 (#[non_exhaustive] on UnderlyingAssetType / Action)
  • option_type 0.1 → 0.1.2 (aligns transitive versions)

Migration

  • Positive(x)Positive::new_decimal(x) / pos_or_panic! / unsafe { Positive::new_unchecked(dec!(...)) } in const
  • positive.0positive.to_dec()
  • Stochastic kernels (Brownian, GBM, Jump Diffusion, GARCH, Heston, OU, Telegraph, Monte-Carlo) reworked to stay in Decimal through signed normal samples — the new Positive * Decimal operator panics on negative results instead of silently producing an invalid Positive
  • Position::net_premium_received now returns Ok(Positive::ZERO) when fees exceed premium (previously produced an invalid negative Positive)

Tests

  • Updated Debug/Display expectations for ExpirationDate and Positive
  • Relaxed overly-tight numeric tolerances (1e-61e-5 for binomial, vomma, charm/color) where the upstream precision improvements legitimately changed trailing digits
  • Integration expected values for short straddle / strangle get_best_area refreshed for the new optimum

Full Changelog: v0.15.2...v0.15.3

v0.15.2

16 Mar 08:01
f420b94

Choose a tag to compare

What's Changed

  • Fix get_max_profit/get_max_loss for single-leg strategies (#284)
    • LongCall/ShortCall: Unbounded profit/loss now returns Positive::INFINITY
    • LongPut/ShortPut: Correct evaluation at price=0 where appropriate

Full Changelog: v0.15.1...v0.15.2

v0.15.1

20 Feb 08:31
3bebfcf

Choose a tag to compare

chore: bump version to 0.15.1

- Remove outdated release notes for v0.14.0 to streamline the documentation.
- Update version references across Cargo.toml, README, and library documentation.

v0.15.0

19 Feb 16:07
e3e0b9b

Choose a tag to compare

chore: bump version to 0.15.0