Releases: joaquinbejar/OptionStratLib
v0.14.1
Release Notes - optionstratlib v0.14.1
Bug Fixes
Dependency Compatibility Fix
- Fixed
lzma-rust2/crcdependency conflict: Updatedzipdependency from7.0to7.1to resolve incompatibility betweenlzma-rust2 v0.15.3andcrc v2.x. The newzip v7.1useslzma-rust2 v0.15.6which is compatible withcrc 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
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
Legenum 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/ImpliedVolatilitySurfaceRiskReversalCurveDollarGammaCurve
Volatility Metrics (#136)
VannaCurve/VannaSurfaceVolgaCurve/VolgaSurfaceVommaCurve/VommaSurfaceVetaCurve/VetaSurface
Temporal Metrics (#137)
ThetaCurve/ThetaSurfaceCharmCurve/CharmSurfaceColorCurve/ColorSurface
Price Metrics (#138)
VolatilitySkewCurvePutCallRatioCurveStrikeConcentrationCurve
Composite Metrics (#140)
SmileDynamicsDeltaGammaProfileVannaVolga
Liquidity Metrics (#141)
BidAskSpreadCurveVolumeProfileCurve/VolumeProfileSurfaceOpenInterestCurve
Stress Metrics (#142)
VolatilitySensitivityCurve/VolatilitySensitivitySurfaceTimeDecayCurve/TimeDecaySurfacePriceShockCurve/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
Legenum for unified position types SpotPositionfor underlying asset positionsFuturePositionfor futures contractsPerpetualPositionfor perpetual swaps
Delta-Neutral Adjustments (#155, #187)
AdjustmentOptimizerfor portfolio rebalancingPortfolioGreeksfor aggregate risk metrics- Multiple adjustment strategies support
Async Feature (#223)
- New
asyncfeature flag for asynchronous I/O operations - Async support for
OptionChainand 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
-
Update Positive imports:
// Add to Cargo.toml positive = "0.3" // Update imports use positive::{Positive, pos_or_panic};
-
Handle new Result types:
// Before let price = option.calculate_price(); // After let price = option.calculate_price()?;
-
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
- Joaquín Béjar García (@joaquinbejar)
- Gianmario (@jakeheke75)
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
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
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.0across 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
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
OptionChainfor more accurate validation and structuring. - Updated error handling logic in the
calculate_pricesmethod 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
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
CharmandColormetrics 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:
uuidcrate bumped to1.1.9.- Development dependencies:
criterionupdated to0.8.mockallupdated to0.14.
Acknowledgments
Huge thanks to @jakeheke75 for the implementation of the temporal metrics.
Release Links
v0.11.0
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
Add spread calculation methods for call and put options; bump version…
v0.10.2
Full Changelog: v0.10.1...v0.10.2
v0.10.1
Full Changelog: v0.10.0...v0.10.1