Skip to content

Conversation

@joaquinbejar
Copy link
Owner

This PR completes the implementation of the Protective Put strategy as requested in issue #219.

Changes:

  • Refined Strategy Implementation: Implemented and for the trait.
  • Utility Methods: Added , , and leg accessors.
  • Bug Fixes:
    • Fixed option quantity scaling (1:1 unit ratio with spot).
    • Fixed fee consistency and scaling (per-unit conversion).
  • Testing: Added a comprehensive unit test suite in .
  • Verification: All tests passed and code quality verified with clippy.

Closes #219

… position management

Add methods to calculate the effective cost basis and manage positions in the ProtectivePut strategy. Update fee calculations and fix quantity handling for improved accuracy. Add corresponding unit tests for validation.
@joaquinbejar joaquinbejar merged commit 432ce7e into main Jan 12, 2026
11 checks passed
@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/strategies/protective_put.rs 78.26% 5 Missing ⚠️
Files with missing lines Coverage Δ
src/strategies/protective_put.rs 56.91% <78.26%> (+5.15%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Complete implementation of Protective Put strategy

2 participants