v0.5.8
Release Notes: Version 0.5.8 – Format Refactors, Extended Position Metadata, and Zero-DTE Support
Summary
This beta release focuses on improving code readability through widespread refactoring, enriching the core data model with new metadata fields, and bolstering test coverage for zero-days-to-expiration (DTE) options. Key highlights include shorthand format!
syntax, a new Makefile target for scoped lint fixes, and the introduction of epic
and extra_fields
on various structs to support richer risk and strategy metadata.
What’s New
- Extended Position Metadata
Added two optional fields—epic
(an instrument identifier) andextra_fields
(a catch-all metadata map)—to the following types:Position
(including constructors, serialization, and tests)OptionData
SPANMargin
RandomPositionsParams
- Zero-DTE Option Tests
Introduced new test cases that exercise implied volatility and Greeks calculations for options with zero days to expiration, ensuring correct handling of edge-case pricing scenarios.
Enhancements
- Shorthand
format!
Syntax
Refactored allformat!
invocations to the new{…}
shorthand placeholder syntax for improved readability and consistency. - Makefile Improvements
Added alint-fix-plotly
target that applies Clippy fixes scoped to the vendor/plotly code, streamlining maintenance of the embedded Plotly Rust library. - Documentation & Build Tweaks
- Removed unused offline JavaScript inclusion methods from examples.
- Updated
.gitignore
to exclude/coverage/tarpaulin-report.html
. - Bumped version to
0.5.8
inCargo.toml
and updated the library documentation header accordingly.
- Merge Conflict Resolutions
Synchronised and resolved conflicts in Plotly vendor files (plot.rs
,field_setter.rs
) to stay aligned with upstream changes.
Bug Fixes
- Redundant Initialization
Fixed a redundantNone
initialization inlegs.rs
to prevent unnecessary allocations and eliminate a minor logic inconsistency.
Breaking Changes
- New Optional Fields
The introduction ofepic
andextra_fields
extends several core types. These fields default toNone
or empty values, but downstream code performing strict struct pattern matching or manual deserialization should be updated to handle the extended types gracefully.
Documentation Updates
- README.md
Updated to reflect the version bump and to include basic examples demonstrating how to supplyepic
andextra_fields
. - Library Docs
Header and metadata updated to0.5.8
throughout the crate’s documentation.
Migration Notes
- No manual migration steps are required for most users—new fields are optional and use sensible defaults.
- If you perform custom (de)serialization or pattern matching on
Position
,OptionData
,SPANMargin
, orRandomPositionsParams
, please update your code to accommodate the two new optional fields.
Release Links