Alexc, I don't have the Financial Toolbox, so I can't help you wih MATLAB's maxdrawdown routine. My Version simply computes the maximum relative drawdown of a given time series.
If you are really interested in the downside risk Steiner's version is the best. Then you have more insight about the tail. This is very important when looking at regimes.
I think this version is more practical and quite better than Steiner's. Also, is faster since it does not computes the whole drawdown vector (which I don't need in particular) and its more understandable. Advantage vs. MATLAB's routine: data can be <= 0, and still computes (i.e. MaxDD = 120%, for instance).
Alexc, I don't have the Financial Toolbox, so I can't help you wih MATLAB's maxdrawdown routine. My Version simply computes the maximum relative drawdown of a given time series.
The input for your function is a vector of cummulative returns, not a period return vector. You should point that out in your description of the arguments.
Personally, I prefer my version because it allos not only computation of maximum drawdown, but computation of the full drawdown vector to for example plot time-under-water charts and calculation of the average of the n-th largest drawdowns (needed in the calc of certain risk-adjusted performance measures).
It is a very useful utility. Is it possible to list the actual parameters passed to each function call (not just the formal parameters used in the function definition)? Note that this may vary across calls to the same function. Thanks.
unlike FARG, M2HTML dose not
- distinguish between subfunctions and nested functions
- extract anonymous functions
- extract f/eval constructs
moreover, it is a standalone function that does not require other files and subfolders nor the web browser to display its result
just a few pedestrian thoughts...
us
Comment only