Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix calculate_implied_rate to exclude the backpaid interest from the cost basis #120

Merged
merged 2 commits into from
Jun 2, 2024

Conversation

MazyGio
Copy link
Contributor

@MazyGio MazyGio commented Jun 1, 2024

Resolved Issues

#119 Implied rate (Short ROI) is negative in some cases where fixed > variable

Description

This excludes the short's backpaid interest from implied_rate calc

Review Checklists

Please check each item before approving the pull request. While going
through the checklist, it is recommended to leave comments on items that are
referenced in the checklist to make sure that they are reviewed.

  • Testing
    • Are there new or updated unit or integration tests?
    • Do the tests cover the happy paths?
    • Do the tests cover the unhappy paths?
    • Are there an adequate number of fuzz tests to ensure that we are
      covering the full input space?
    • If matching Solidity behavior, are there differential fuzz tests that
      ensure that Rust matches Solidity?

Copy link
Member

@dpaiton dpaiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lgtm although I think it would be a good idea to put a test together that demonstrates how it works as a follow-up.

@dpaiton dpaiton merged commit ac182d3 into main Jun 2, 2024
8 checks passed
@dpaiton dpaiton deleted the mazygio/fix/calculate_implied_rate_backpaid_interest branch June 2, 2024 19:59
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.

2 participants