Skip to content

v0.5.8

Compare
Choose a tag to compare
@joaquinbejar joaquinbejar released this 04 Jul 16:56
· 48 commits to main since this release
37c1bb8

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) and extra_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 all format! invocations to the new {…} shorthand placeholder syntax for improved readability and consistency.
  • Makefile Improvements
    Added a lint-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 in Cargo.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 redundant None initialization in legs.rs to prevent unnecessary allocations and eliminate a minor logic inconsistency.

Breaking Changes

  • New Optional Fields
    The introduction of epic and extra_fields extends several core types. These fields default to None 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 supply epic and extra_fields.
  • Library Docs
    Header and metadata updated to 0.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, or RandomPositionsParams, please update your code to accommodate the two new optional fields.

Release Links