if TRUE, maximum drawdown is chosen according to percentage
losses; else in units of v
summary
if TRUE, provide maximum drawdown and time when it occured;
else return drawdown vector
Value
If summary is FALSE, a vector of the same length as
v. If summary is TRUE, a list
maximum
maximum drawdown
high
the max of v
high.position
position of high
low
the min of v
low.position
position of low
Details
The drawdown at position t of a time series v is the
difference between the highest peak that was reached before t
and the current value. If the current value represents a new high,
the drawdown is zero.