maxDrawdown: caclulate the maximum drawdown from peak equity
Description
To find the maximum drawdown in a return series, we need to first calculate the cumulative returns and the maximum cumulative return to that point. Any time the cumulative returns dips below the maximum cumulative returns, it's a drawdown. Drawdowns are measured as a percentage of that maximum cumulative return, in effect, measured from peak equity.
Usage
maxDrawdown(R)
Arguments
R
a vector, matrix, data frame, timeSeries or zoo object of asset returns