drawdown: Calculate the drawdown for a vector of returns

Description Usage Arguments Details

View source: R/drawdown.R

Description

drawdown() calculates a vector of drawdowns. drawdown_max() calculates the single largest negative drawdown over the period of returns specified.

Usage

1
2
3
drawdown(.r, type = "arithmetic")

drawdown_max(.r, type = "arithmetic")

Arguments

.r

A vector of returns.

type

Either "arithmetic" or "log" returns.

Details

Drawdown is a measure of how long it takes to recoup losses after a fall from a previous high. The more negative the drawdown, the larger the loss. The longer it takes to get back to 0 drawdown, the longer you are "underwater."


DavisVaughan/tidyfinance documentation built on May 24, 2019, 8:46 p.m.