tzutrader
A composable C++ backtesting library for trading strategies (experimental)
Loading...
Searching...
No Matches
tzu::MDD Class Reference

#include <indicators.h>

Inheritance diagram for tzu::MDD:
tzu::Indicator< MDD, double, double >

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)

Detailed Description

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.

Member Function Documentation

◆ get()

double tzu::MDD::get ( ) const
inlinenoexcept

◆ update()

double tzu::MDD::update ( double value)
inline

The documentation for this class was generated from the following file: