This is a trading object shared by a member. You can use this object as well as hundreds of others with QuantShare - Trading Software.
Click on the Like button or on one of the share buttons to share this object and spread the word about QuantShare.
QuantShare is an advanced trading software for stock, forex, futures, ETF and options markets. It is the best and the most complete EOD trading software software and it is FREE (beta version).
The maximum drawdown is a popular measure of the maximum amount an investor can expect to lose. It is used as a measure of riskiness of a trading strategy.
Another measure of a trading strategy's riskiness is the Time under Water.
The Time under water is derived from the calculation of the drawdown. It is the maximum distance in time, from a previous peak to a new peak. In other words, it calculates how long it takes an investor to recover its money at the start of the maximum drawdown period.
Example:
1 January 2008, the equity value is: 100 - Current Time under water = 0 days
2 January 2008, the equity value is: 110 - Current Time under water = 0 days
3 January 2008, the equity value is: 90 - Current Time under water = 1 days
4 January 2008, the equity value is: 100 - Current Time under water = 2 days
5 January 2008, the equity value is: 115 - Current Time under water = 0 days
In the above example, the maximum 'time under water' value is 2 days.
The 'time under water' value is calculated for each symbol, and then the results are averaged. The average value is the final value returned by this metric.
The algorithm is rather simple, it calculates the drawdown for each new output and keeps track of the start and end date of each drawdown period. The difference in days is then calculated and the 'time under water' value is updated if the difference in days is higher than the 'time under water' value.