Skip to content

Releases: joaquinbejar/OptionStratLib

v0.14.1

15 Jan 12:55
056c992

Choose a tag to compare

Release Notes - optionstratlib v0.14.1

Bug Fixes

Dependency Compatibility Fix

  • Fixed lzma-rust2/crc dependency conflict: Updated zip dependency from 7.0 to 7.1 to resolve incompatibility between lzma-rust2 v0.15.3 and crc v2.x. The new zip v7.1 uses lzma-rust2 v0.15.6 which is compatible with crc v3.x.

Dependencies Updated

Dependency Previous New
zip 7.0 7.1

Notes

This release resolves build failures that occurred when optionstratlib was used alongside other crates that depend on crc v3.x (such as sqlx). The conflict manifested as compilation errors in lzma-rust2 with messages like:

v0.14.0

13 Jan 16:24
89ac93e

Choose a tag to compare

Release Notes - OptionStratLib v0.14.0

Release Date: January 2026

This is a major release that introduces comprehensive exotic option pricing support, new metrics modules, improved error handling, and significant code quality improvements.


Highlights

  • Complete Exotic Options Support: All 14 exotic option types now have full pricing implementations
  • New Metrics Framework: Comprehensive metrics system with curves and surfaces for risk analysis
  • Improved Error Handling: Systematic replacement of unwrap() calls with proper error handling
  • New Strategies: CoveredCall, Collar, and ProtectivePut strategies fully implemented
  • Multi-Instrument Support: New Leg enum for multi-asset strategy support

New Features

Exotic Option Pricing Models

Complete pricing implementations for all exotic option types:

Issue Option Type Description
#235 American Barone-Adesi-Whaley approximation for early exercise
#236 Bermuda Discrete exercise dates pricing
#237 Asian Arithmetic and geometric average price options
#238 Barrier Up/Down, In/Out barrier options with numerical Greeks
#239 Binary Cash-or-nothing and asset-or-nothing options
#240 Lookback Fixed and floating strike lookback options
#241 Compound Options on options pricing
#242 Chooser Options to choose call or put at future date
#243 Cliquet Forward-starting options with local caps/floors
#244 Rainbow Multi-asset best-of/worst-of options
#245 Spread Kirk's approximation and Margrabe's formula
#246 Quanto Currency-protected options
#247 Exchange Margrabe's formula for asset exchange
#248 Power Non-linear payoff options with adjusted volatility

Metrics Framework

New comprehensive metrics system for option chain analysis:

Risk Metrics (#139)

  • ImpliedVolatilityCurve / ImpliedVolatilitySurface
  • RiskReversalCurve
  • DollarGammaCurve

Volatility Metrics (#136)

  • VannaCurve / VannaSurface
  • VolgaCurve / VolgaSurface
  • VommaCurve / VommaSurface
  • VetaCurve / VetaSurface

Temporal Metrics (#137)

  • ThetaCurve / ThetaSurface
  • CharmCurve / CharmSurface
  • ColorCurve / ColorSurface

Price Metrics (#138)

  • VolatilitySkewCurve
  • PutCallRatioCurve
  • StrikeConcentrationCurve

Composite Metrics (#140)

  • SmileDynamics
  • DeltaGammaProfile
  • VannaVolga

Liquidity Metrics (#141)

  • BidAskSpreadCurve
  • VolumeProfileCurve / VolumeProfileSurface
  • OpenInterestCurve

Stress Metrics (#142)

  • VolatilitySensitivityCurve / VolatilitySensitivitySurface
  • TimeDecayCurve / TimeDecaySurface
  • PriceShockCurve / PriceShockSurface

New Strategies

Issue Strategy Description
#21 CoveredCall Long stock + short call with spot leg support
#20 Collar Protective put + covered call combination
#25 ProtectivePut Long stock + long put protection

Multi-Instrument Support (#198)

  • New Leg enum for unified position types
  • SpotPosition for underlying asset positions
  • FuturePosition for futures contracts
  • PerpetualPosition for perpetual swaps

Delta-Neutral Adjustments (#155, #187)

  • AdjustmentOptimizer for portfolio rebalancing
  • PortfolioGreeks for aggregate risk metrics
  • Multiple adjustment strategies support

Async Feature (#223)

  • New async feature flag for asynchronous I/O operations
  • Async support for OptionChain and OHLCV data loading

Improvements

Error Handling Refactoring

Systematic replacement of unwrap() and expect() calls with proper error handling:

Issue Scope
#213 model/option.rs
#212 greeks/equations.rs
#211 chains/chain.rs
#225 All expect() calls
#226 Positive type safety improvements
#227 Remaining unwrap() in src/model/

Code Quality

Issue Description
#214 Resolved 14 TODO/FIXME items in black_scholes_model.rs
#215 Resolved 4 TODO/FIXME items in model/position.rs
#216 Extracted common strategy logic to shared traits
#217 Reduced unnecessary clone() calls
#220 Added error context using anyhow at API boundaries

Testing

Issue Description
#221 Comprehensive benchmarks for critical code paths
#222 Property-based testing with proptest

Documentation (#224)

  • Comprehensive documentation for all metrics modules
  • Executable examples for each metric type
  • Updated README with temporal metrics documentation

Bug Fixes

Issue Description
#167 Static image export hangs on Apple-Silicon macOS with kaleido
#176 Implied volatility calculation improvements
#184 Unit tests for threshold pricing model errors
#191 build_chain function chain_size parameter handling

Other Fixes

  • Division by zero in premium_weighted_pcr
  • PNG rendering tests gracefully handle CI failures
  • Documentation typos corrected

Dependencies Updated (#257)

Package Version
zip 7.0
plotly 0.14
positive 0.3.0

Breaking Changes

Positive Type Migration

The internal Positive type has been migrated to the external positive crate:

// Before (v0.13.x)
use optionstratlib::Positive;
use optionstratlib::pos!;

// After (v0.14.0)
use positive::{Positive, pos_or_panic};

Error Handling

Many functions that previously returned values directly now return Result<T, Error>:

// Before
fn calculate_price(&self) -> Decimal;

// After
fn calculate_price(&self) -> Result<Decimal, PricingError>;

Migration Guide

From v0.13.x to v0.14.0

  1. Update Positive imports:

    // Add to Cargo.toml
    positive = "0.3"
    
    // Update imports
    use positive::{Positive, pos_or_panic};
  2. Handle new Result types:

    // Before
    let price = option.calculate_price();
    
    // After
    let price = option.calculate_price()?;
  3. Use new exotic option pricing:

    use optionstratlib::pricing::black_scholes;
    
    let option = Options::new(
        OptionType::Asian { averaging_type: AveragingType::Arithmetic },
        // ... other parameters
    );
    let price = black_scholes(&option)?;

Statistics

  • 86 commits since v0.13.1
  • 70+ issues closed
  • 50+ pull requests merged
  • 14 exotic option types now fully supported
  • 7 metrics categories with curves and surfaces

Contributors


Full Changelog

See the GitHub Releases page for the complete list of changes.

Issues Closed: #20, #21, #25, #38, #72, #73, #75, #77, #78, #83, #84, #85, #89, #91, #96, #97, #104, #105, #108, #113, #116, #119, #120, #124, #126, #127, #128, #129, #130, #131, #134, #135, #136, #137, #138, #139, #140, #141, #142, #155, #167, #176, #184, #187, #191, #198, #211, #212, #213, #214, #215, #216, #217, #218, #219, #220, #221, #222, #223, #224, #225, #226, #227, #235, #236, #237, #238, #239, #240, #241, #242, #243, #244, #245, #246, #247, #248, #257

v0.13.1

17 Dec 08:55
328b34f

Choose a tag to compare

Merge pull request #202 from joaquinbejar/feature/Positive_infinity

Bump version to 0.13.1 across README, Cargo.toml, and library documen…

v0.13.0

16 Dec 08:20
1c62f70

Choose a tag to compare

Release Notes: Version 0.13.0 – Advanced Volatility Metrics and Surface Modeling

Summary

Version 0.13.0 introduces second-order volatility Greeks—Vanna, Vomma, and Veta—along with robust modeling tools for volatility and time surfaces. This release also includes comprehensive unit tests and edge case coverage, boosting the reliability of volatility-related calculations.


What's New

  • Second-Order Volatility Greeks:
    • Vanna: Sensitivity of delta with respect to changes in implied volatility.
    • Vomma: Sensitivity of vega with respect to changes in implied volatility.
    • Veta: Sensitivity of option value with respect to the passage of time and volatility changes.
  • Volatility & Time Surface Generators: Integrated support for generating multi-dimensional surfaces for Vanna, Vomma, and Veta to analyze behavior across time and implied volatility dimensions.

Enhancements

  • Added extensive unit tests for second-order Greeks and their behavior under extreme market conditions.
  • Improved support for edge cases involving high-volatility or near-expiry options to ensure stability of outputs.
  • Version bump to 0.13.0 across all core files (README, Cargo.toml, and internal documentation) to reflect major additions.

Bug Fixes

  • None reported for this release.

Breaking Changes

  • None. All newly introduced volatility metrics are additive and non-disruptive.

Documentation Updates

  • Internal documentation and README updated to reflect version 0.13.0.
  • Further examples and usage patterns for second-order Greeks expected in future documentation updates.

Migration Notes

  • No migration needed; this version is fully backward-compatible.
  • Users are encouraged to explore the new volatility surface tools for enhanced modeling precision.

Release Links

v0.12.1

16 Dec 07:30
c39460e

Choose a tag to compare

Release Notes: Version 0.12.1 – Forward Skew and Volatility Enhancements

Summary

This patch release introduces the Forward Skew feature for option price metrics and improves the robustness of volatility modeling within OptionChain. It also includes refined error handling and enhanced consistency across option chain components.


What's New

  • Forward Skew Support: Added implementation of forward skew within option pricing metrics, enabling more realistic and dynamic modeling of implied volatility curves across expirations.

Enhancements

  • Improved consistency rules within OptionChain for more accurate validation and structuring.
  • Updated error handling logic in the calculate_prices method to better manage edge cases and invalid inputs.
  • Added extensive unit tests covering volatility-related traits, OptionChain, and associated methods to ensure long-term stability and correctness.

Bug Fixes

  • No specific bug fixes were documented for this release.

Breaking Changes

  • None.

Documentation Updates

  • No documentation changes were noted in this release. Users are encouraged to review the updated unit tests and implementation for guidance on using the new forward skew feature.

Migration Notes

  • No migration steps are required. All enhancements are backward-compatible with existing code using version 0.12.0.

Acknowledgments

Thanks to @g-t for contributions to this release.


Release Links

v0.12.0

11 Dec 14:49
677fb01

Choose a tag to compare

Release Notes: Version 0.12.0 – Temporal Metrics & Dependency Updates

Summary

This release introduces powerful time-based risk analytics with the implementation of temporal metrics, alongside routine dependency updates to ensure continued compatibility and performance. Users can now analyze "Charm" and "Color" using both curve and surface representations for enhanced strategic insights.


What's New

  • Temporal Metrics Module:
    • Charm: Evaluates the rate of change of Delta over time.
    • Color: Represents the rate of change of Gamma over time.
    • Both metrics now support curve and surface visualizations for dynamic analysis across time horizons.

Enhancements

  • Extended visualization capabilities to include temporal metric surfaces and curves, improving risk modeling and temporal sensitivity understanding.

Bug Fixes

  • No reported or resolved user-facing bugs in this release.

Breaking Changes

  • None. This version is fully backward-compatible with previous 0.x releases.

Documentation Updates

  • Initial documentation for Charm and Color metrics has been added, with examples of how to access and visualize them.
  • More detailed visual guides and integration examples will follow in upcoming updates.

Migration Notes

  • No action is required to upgrade.
  • Ensure your local environment uses the updated dependencies:
    • uuid crate bumped to 1.1.9.
    • Development dependencies:
      • criterion updated to 0.8.
      • mockall updated to 0.14.

Acknowledgments

Huge thanks to @jakeheke75 for the implementation of the temporal metrics.

Release Links

v0.11.0

05 Dec 16:49
21170a8

Choose a tag to compare

Release Notes: Version 0.11.0 - Volatility Metrics Integration

Summary

Version 2.5.0 introduces a powerful new feature set focused on volatility analysis. With the implementation of comprehensive volatility metrics, users can now assess risk and strategy performance with greater precision. This update also ensures improved test coverage for spread calculations.


What's New

  • Volatility Metrics Module: Added support for calculating and analyzing key volatility metrics as part of strategy evaluations.
    • This includes metrics related to implied volatility surfaces, historical volatility, and vol-adjusted risk analytics.
    • Addresses Issue #136.

Enhancements

  • Integrated volatility metrics directly into the strategy evaluation pipeline, enabling more data-driven decision-making.
  • Improved compatibility of new volatility features with existing strategy types.

Documentation Updates

  • Documentation will be updated in the upcoming patch to reflect volatility metric usage and configuration.

Migration Notes

  • It is recommended to explore the new volatility analytics tools and incorporate them into existing strategies for enhanced insights.

Acknowledgments

Thanks to @jakeheke75 for contributing the volatility metrics implementation and resolving integration conflicts.


Release Links

v0.10.3

25 Nov 17:45
a1933e6

Choose a tag to compare

Add spread calculation methods for call and put options; bump version…

v0.10.2

19 Nov 21:42
cc29fbe

Choose a tag to compare

Full Changelog: v0.10.1...v0.10.2

v0.10.1

19 Nov 21:36
e1f61ba

Choose a tag to compare

Full Changelog: v0.10.0...v0.10.1