Lesson 7 of 15
Drawdown & Maximum Drawdown
Drawdown & Maximum Drawdown
A drawdown measures the decline from a historical peak to a current value. It answers: "how far have we fallen from the highest point seen so far?"
For each price , the drawdown is:
where is the running maximum.
Drawdowns are always : zero when at a new high, negative otherwise.
Maximum Drawdown (MDD) is the worst (most negative) drawdown over the entire period:
MDD is a critical risk metric used to evaluate investment strategies. A strategy with a 50% MDD means an investor could have lost half their capital at the worst point.
Your Task
Implement:
drawdown(prices)— list of drawdowns from running peakmax_drawdown(prices)— minimum drawdown value (most negative)
Python runtime loading...
Loading...
Click "Run" to execute your code.