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

Add realized maximum drawdown metric #504

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

Conversation

nick-dolan
Copy link
Contributor

@nick-dolan nick-dolan commented Mar 3, 2025

Realized Max Drawdown

Trend-following strategies often filter out price spikes to avoid losing the trend early, and it often happens that you get the same maximum drawdown plus or minus at the same point, regardless of the hyper-parameters. To solve this problem, I suggest using RMD to get MAX Drawdown on closed trades.

Realized Maximum Drawdown (or Maximum Closed-Trade Balance Drop Percentage) refers to the largest percentage decline in the balance of a trading account based solely on closed trades, measured from the highest balance achieved to the lowest balance before a recovery or new peak occurs. This metric is crucial for assessing the downside risk of a trading strategy, as it excludes unrealized losses from open trades and focuses on actual, realized losses.

Formula for Realized Max Drawdown

$$ \text{Realized Max Drawdown %)} = \max \left( \frac{\text{Peak Balance} - \text{Lowest Subsequent Balance}}{\text{Peak Balance}} \times 100 \right) $$

where:

  • Peak Balance refers to the highest cumulative realized profit balance.
  • Lowest Subsequent Balance is the lowest point the balance drops to after reaching a peak, before potentially reaching a new peak.

@nick-dolan
Copy link
Contributor Author

Here is an example of optimisations to illustrate the use case, Max Drawdown is always around 30%, while Realised Max Drawdown is different everywhere and I need to throw out all variants with RMD greater than 10%. I can't do it without RMD

Screenshot 2025-03-04 at 13 32 47

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