Releases: joaquinbejar/OptionStratLib
Releases · joaquinbejar/OptionStratLib
v0.16.5
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
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
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
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
Fix chain test fixtures and doc link warning
v0.16.0
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
Decimalhelpers (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 everyf64 → Decimalboundary 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:
- Functions returning
Result<T, concrete_error>where they previously panicked — wrap call sites with?. steps/simulationsarguments now takeNonZeroUsize— useoptionstratlib::nz!(N)orNonZeroUsize::new(N).ok_or(..)at the boundary.unsafeblocks removed in favour of typed guards.
v0.15.3
What's Changed
Dependency bump to support the new major release of the upstream positive, expiration_date, financial_types, and option_type crates.
Dependencies
positive0.4 → 0.5 (breaking: private inner field,Negremoved, checked arithmetic)expiration_date0.1 → 0.2 (day-count conventions, derivedDebug)financial_types0.1 → 0.2 (#[non_exhaustive]onUnderlyingAssetType/Action)option_type0.1 → 0.1.2 (aligns transitive versions)
Migration
Positive(x)→Positive::new_decimal(x)/pos_or_panic!/unsafe { Positive::new_unchecked(dec!(...)) }inconstpositive.0→positive.to_dec()- Stochastic kernels (Brownian, GBM, Jump Diffusion, GARCH, Heston, OU, Telegraph, Monte-Carlo) reworked to stay in
Decimalthrough signed normal samples — the newPositive * Decimaloperator panics on negative results instead of silently producing an invalidPositive Position::net_premium_receivednow returnsOk(Positive::ZERO)when fees exceed premium (previously produced an invalid negativePositive)
Tests
- Updated Debug/Display expectations for
ExpirationDateandPositive - Relaxed overly-tight numeric tolerances (
1e-6→1e-5for binomial, vomma, charm/color) where the upstream precision improvements legitimately changed trailing digits - Integration expected values for short straddle / strangle
get_best_arearefreshed for the new optimum
Full Changelog: v0.15.2...v0.15.3
v0.15.2
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
- LongCall/ShortCall: Unbounded profit/loss now returns
Full Changelog: v0.15.1...v0.15.2
v0.15.1
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
chore: bump version to 0.15.0