Maximum drawdown is measured from the peak
- What was broken
- The maximum drawdown factor divided by the lowest price instead of the peak, so a 50% fall was reported as 100%.
- What I changed
- It now returns the largest drop as a fraction of the peak before it.
- Why it matters
- Strategies that filter or rank stocks by drawdown get the right numbers.