Calculating Portfolio Maximum Drawdown from Cumulative Returns
Summary
The document explains the standard portfolio drawdown workflow: convert periodic returns to growth factors, compound them into an equity curve, and measure losses from prior peaks. Maximum drawdown is the greatest decline from a previous high-water mark, so applying a drawdown calculation to cumulative portfolio performance is conceptually appropriate.
The discussion confirms this definition but does not establish details of a particular MATLAB function. It notes that MATLAB's available implementation depends on the release: a finance toolbox function is available in newer releases, while older versions may rely on a user-written function. No worked calculation or comparison of implementations is provided, so users should check their version's function behavior and ensure the input is the compounded portfolio value series rather than raw returns.
Key ideas
- Maximum drawdown measures decline from a previous portfolio peak.
- Compounding periodic returns produces the portfolio value path used to assess drawdown.
- A drawdown function should be applied to cumulative performance rather than the raw return vector.
- MATLAB function availability varies by release, and older alternatives may be user-written.
Tags
Full text
# How to calculate the Maximum Drawdown for a portfolio in MATLAB? # How to calculate the Maximum Drawdown for a portfolio in MATLAB? I would like to verify my approach of calculating the Maximum Drawdown for a portfolio in MATLAB. I've got a vector of returns for the portfolio, to which I add 1 for every return. Afterwards I calculate the cumulative product of this series in order to get a plot of how the portfolio develops over time with the function cumprod(). Is it correct to use the function maximumdrawdown() of this portfolio development to get the Maximum Drawdown of the portfolio? Best regards ## Answer by Chris (score 2, accepted) https://quant.stackexchange.com/a/45361 Max drawdown of a portfolio is the loss relative to a previous high-water mark. It's typically calculated as you describe, calculating cumulative performance and maxDD relative to the previous equity peak. I'm not aware of a built-in Matlab function (speaking as someone that built a backtesting suite in Matlab years back, including max DD by hand), so can't comment if you're speaking about a particular function with your concluding question. ## Answer by alexbougias (score 2) https://quant.stackexchange.com/a/45520 Depending on your version: Matlab 2019 https://www.mathworks.com/help/finance/maxdrawdown.html Matlab 2018 or before https://in.mathworks.com/matlabcentral/fileexchange/10367-maximum-drawdown The latter is a user-defined function and not a built-in by MathWorks. The developer is Andreas Steiner.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.