Skip to content

Replace f64 with Decimal in volatility/utils #108

@joaquinbejar

Description

@joaquinbejar

Description

Refactor the volatility/utils file to replace all occurrences of the f64 type with the Decimal type. This change aims to improve precision in numerical calculations and aligns with the project's standard for handling financial data.


Tasks

Code Changes:

  • Identify all instances of f64 in the volatility/utils file.
  • Replace each instance of f64 with the Decimal type.
  • Update any functions or methods where f64 is used to ensure compatibility with Decimal.

Testing:

  • Verify that all affected functions continue to work correctly after the change.
  • Update or add unit tests to validate calculations using Decimal instead of f64.

Documentation:

  • Update any comments or documentation within the code that mention f64.
  • Ensure the project's documentation reflects the use of Decimal in volatility/utils.

Additional Notes

  • Ensure the Decimal type is properly imported and used consistently throughout the file.
  • Be mindful of potential performance impacts due to the change from f64 to Decimal.
  • If external libraries or functions depend on f64, update or wrap those calls to handle Decimal as needed.

Labels

refactor, enhancement, precision, testing, documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions