When trading stocks, investors are often concerned with the following risk-related questions: “How much money am I likely to lose if the market moves in a direction that is not as I expected? How long will it take me to get back to my original position if a loss unfortunately occurs?”
To answer these questions, we can use a concept called drawdown. Drawdown is the percentage of capital lost from a peak to the lowest point before a new peak is reached.
For example, suppose an investor buys FPT stock at 100,000 VND. The stock then rises to 115.000 VND (creating a new high) and then falls continuously to 90.000 VND (creating a new low). The stock then recovers and is currently priced at 117.000 VND (new high). The drawdown in this example is:
(115.000 - 90.000) ÷ 115.000 = 21,74%
Maximum Drawdown (MDD) In Algorithmic Trading
In algorithmic trading, investors can continuously open and close many different positions. These positions will contribute to an increase or decrease in the total investment. Suppose an investor has 1 billion VND of initial investment to invest in an algorithmic trading system. The invested capital changes over time as in Figure 18.
During the running time of the trading algorithm, there may be different drawdown time periods with different values. The one with the largest value will be called Maximum Drawdown (MDD). In the example above, MDD will be 17.24%. MDD can be understood as the worst loss situation occurring in the timeframe under consideration.
How to Use MDD
The theoretical MDD from backtesting can be used to estimate the potential risk of the algorithm in real trading. However, if the real MDD exceeds the backtest MDD significantly, it means that the latter is no longer reliable. In that case, investors should pause the algorithm to review its performance.
At ALGOTRADE, we will stop and review an algorithm when its real MDD reaches 150% of the backtest MDD. This is based on the assumption that the historical data used for backtesting may not fully capture the long-term performance.
The table below compares the backtested and real MDDs of our current algorithms, as of Apr 1, 2023.
From these MDDs, we can see that the “Moon” algorithm involves the highest risk, while the “Genesis” algorithm is the safest. When allocating capital to different algorithms, investors can use MDD as a parameter to make decisions based on risk tolerance and return expectations.