|
tzutrader
A composable C++ backtesting library for trading strategies (experimental)
|
#include <indicators.h>
Public Member Functions | |
| double | get () const noexcept |
| double | update (double value) |
| Public Member Functions inherited from tzu::Indicator< MDD, double, double > | |
| double | get () const noexcept |
| double | update (double value) |
Maximum Drawdown (MDD)
Calculates the maximum drawdown, which is the largest percentage drop from a peak to a trough in the value of an investment. Returns 0.0 until at least one value has been added. Once values are added, it updates the peak value and calculates the current drawdown as the proportion drop from the peak. If the current drawdown is greater than the previously recorded maximum drawdown, it updates the maximum drawdown value. The MDD is expressed as a negative value.
|
inlinenoexcept |
|
inline |