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

Feature issue#4581 Maximum Drawdown Recovery Time. #8280

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

swisstackle
Copy link

@swisstackle swisstackle commented Aug 24, 2024

Description

This PR introduces a new statistic to measure the Maximum Drawdown Recovery Time.

Key changes:

  • Implemented MaxDrawdownRecoveryTime function to calculate the longest recovery time from maximum drawdowns. In the case where there are multiple maximum drawdowns, the longest recovery time is returned.
  • Added DrawdownPercentDrawdownDatesHighValue function to consolidate the DrawdownPercent function and MaxDrawdownRecoveryTime function, to avoid duplicate code.
  • Added new DTO DrawdownDrawdownDatesHighValueDTO to avoid using tuples in DrawdownPercentDrawdownDatesHighValue.
  • Integrated the new statistic into the existing performance metrics suite.
  • Added unit tests.

Questions

  • Do we need to implement a ReportElement? I was thinking no because there is already a report element for DrawdownPercent and the user could easily see where the maximum drawdown occured.
  • In the case when there is no drawdown, do we want a special value returned?

Related Issue

Motivation and Context

Requires Documentation Change

Potentially

How Has This Been Tested?

Unit tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

…um drawdowns occur, the longest of all recoveries is reported.
@swisstackle swisstackle marked this pull request as ready for review August 24, 2024 17:02
@swisstackle swisstackle changed the title Feature issue#4581 maximum recovery time Feature issue#4581 Maximum Drawdown Recovery Time. Aug 24, 2024
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.

1 participant