On Data-Driven Drawdown Control
with Restart Mechanism in Trading
Abstract
This paper extends the existing drawdown modulation control policy to include a novel restart mechanism for trading. It is known that the drawdown modulation policy guarantees the maximum percentage drawdown no larger than a prespecified drawdown limit for all time with probability one. However, when the prespecified limit is approaching in practice, such a modulation policy becomes a stop-loss order, which may miss the profitable follow-up opportunities, if any. Motivated by this, we add a data-driven restart mechanism into the drawdown modulation trading system to auto-tune the performance. We find that with the restart mechanism, our policy may achieve a superior trading performance to that without the restart, even with a nonzero transaction costs setting. To support our findings, some empirical studies using equity ETF and cryptocurrency with historical price data are provided.
keywords:
Control applications, stochastic systems, algorithmic trading, financial engineering, drawdown control.1 Introduction
Starting from the pioneering work by Markowitz (1952, 1959), the portfolio optimization problem is often solved by the mean-variance approach. That is, the trader seeks an optimal trade-off between payoff and risk measured by the portfolio returns’ mean and variance. While the variance is widely used as a standard risk metric in finance, it is more to the dispersion risk, which treats both positive and negative deviation from the mean as equally risky; see Fabozzi et al. (2007) for a good introduction to this topic.
1.1 Downside Risks
To remedy the equal riskiness on the dispersion risks, many surrogate risk measures are proposed to pay attention to the downside risks. This includes Value at Risk (VaR); see Jorion (2000), Conditional Value at Risk (CVaR); see Rockafellar and Uryasev (2000), absolute drawdown; see Magdon-Ismail and Atiya (2004); Hayes (2006), conditional expected drawdown (CED), the tail mean of maximum drawdown distributions, see Goldberg and Mahmoud (2017), and the more general coherent risk that axiomatize the risk measures; see Luenberger (2013); Shapiro et al. (2021). See also Korn et al. (2022) for an empirical study of comparing various drawdown-based risk metrics. In this paper, we focus on a more practical drawdown measure, the maximum percentage drawdown, the maximum percentage drops in wealth over time, as the risk measure.
1.2 Control of Drawdown
Different types of drawdown and methodologies are studied extensively in the existing literature. For example, optimal drawdown control problem in a continuous-time setting are studied in Grossman and Zhou (1993); Cvitanic and Karatzas (1994); Chekhlov et al. (2005); Malekpour and Barmish (2012, 2013). See also Boyd et al. (2017) for a study on multiperiod portfolio optimization problems involving drawdown as a constraint in a discrete-time setting. A recent study that uses deep reinforcement learning to address practical drawdown issues can be found in Wu et al. (2022).
Among all the existing papers, the prior works in Hsieh and Barmish (2017a, b) are the most closely related papers, where the key result, the so-called drawdown modulation lemma, is proved. Roughly speaking, it shows a necessary and sufficient conditions for a broad class of control policies that guarantees an almost sure maximum percentage drawdown protection for all time. However, Hsieh and Barmish (2017a) indicate that, in practice, when the prespecified drawdown limit is approaching, the trading policy may behave like a stop-loss order, and the trading may be stopped; see also Hsieh (2022a) for a study on a class of affine policies with a stop-loss order. To this end, we extend the drawdown modulation policy with a novel restart mechanism to remedy the stop-loss phenomenon.
1.3 Contributions of the Paper
This paper extends the existing drawdown modulation policy with a novel restart mechanism. The preliminaries are provided in Section 2. We formulate an optimal drawdown control problem for a two-asset portfolio with one risky and one riskless asset. Then we extend the existing drawdown modulation theory so that the riskless asset is explicitly involved; see Lemma 3.1. The necessary and sufficient conditions for a broad class of control policy which we call the drawdown modulation policy are provided. Then, the modulation policy with a restart mechanism is discussed in Section 3. The idea of the restart is simple: When the percentage drawdown up-to-date is close to the prespecified drawdown limit, we restart the trades with an updated policy. We also provide numerical examples involving ETF and cryptocurrency historical price data to support our findings; see Section 4.
2 Preliminaries
We now provide some useful preliminaries for the sections to follow.
2.1 Asset Trading Formulation
Fix an integer For stage , we let denote the prices of the underlying financial asset at stage . The associated per-period returns are given by and the returns are assumed to be bounded, i.e., with and being points in the support, denoted by , and satisfying For the money market asset, e.g., bond or bank account, we use to denote the interest rate at stage .
Remark 2.1
Note that the returns considered here are not necessarily independent and can have an arbitrary but bounded distribution with the bounds and .
2.2 Account Value Dynamics
Beginning at some initial account value , consider a portfolio consisting of two assets, with one being risky and the other being a riskless asset with interest rate for all almost surely. For stage , we let denote the account value at stage . Then the evolution of the account value dynamics is described by the stochastic recursion
Given a prespecified drawdown limit , we focus on conditions on selecting a policy under which satisfaction of the constraint is assured for all with probability one where is the percentage drawdown up to date , which is defined below.
Definition 2.1 (Maximum Percentage Drawdown)
For , the percentage drawdown up to date , denoted by , is defined as
where The maximum percentage drawdown, call it , is then defined as
Remark 2.2
It is readily seen that the percentage drawdown satisfies for all with probability one.
3 Drawdown Modulation with Restart
According to Hsieh and Barmish (2017a), it states a necessary and sufficient condition on any trading policy that guarantees the percentage drawdown up to date is no greater than a given level for all with probability one. Below, we extend the result to include a riskless asset.
Lemma 3.1 (Drawdown Modulation)
Let be given. An trading policy guarantees prespecified drawdown limit satisfying for all with probability one if and only if for all , the condition
is satisfied along all sample paths where
Proof. The idea of the proof is similar to that of Hsieh and Barmish (2017a). However, for the sake of completeness, we provide full proof here. To prove necessity, assuming that for all and all sequences of returns, we must show the condition on holds along all sequences of returns. Fix . Since both and for all sequences of returns, we claim this forces the required inequalities on . Without loss of generality, we prove the right-hand inequality for the case and note that an almost identical proof also works for . To establish the condition on for all sequences of returns, it suffices to consider the path with the worst loss . In this case, we have . Hence,
We now substitute into the inequality above and obtain
where . This implies that
Or equivalently,
To prove sufficiency, assuming that the stated bounds on hold along all sequences of returns, we must show for all and all sequences of returns. Proceeding by induction, for , we trivially have . To complete the inductive argument, we assume that for all sequences of returns, and must show for all sequences of returns. Without loss of generality, we again provide a proof for the case and note that a nearly identical proof is used for . Indeed, by noting that
and for all sequences of returns, we split the argument into two cases: If , then and we have On the other hand, if , with the aid of the dynamics of account value, we have
Using the upper bound on ; i.e.,
and we obtain
Using the definition of , it follows that and the proof is complete. ∎
3.1 Drawdown Modulation Policy
Consistent with Hsieh and Barmish (2017a), fix the prespecified drawdown limit . With the aid of Lemma 3.1, one can readily obtain a class of policy functions expressed as a linear time-varying feedback controller parameterized by a gain , leading to the satisfaction of the drawdown specification. Specifically, we express in the feedback form
(1) |
with and
Equation (1) is called the drawdown modulation policy, which is parameterized by the two parameters .
Remark 3.1
It is readily verified that the drawdown modulation policy (1) satisfies Lemma 3.1. To link back to finance concepts, the special case of buy-and-hold is obtained when . Note that stands for short selling.111Short selling a stock means that a trader borrows the stocks from someone who owns it and selling it with the hope that the prices of the stock will drop in the near future; see Luenberger (2013). Instead of using a fixed feasible set , it is also possible to allow a time-varying feasible set, say , to reflect the time dependency of the returns.
Corollary 3.1 (Maximum Drawdown Protection)
With the drawdown modulation policy (1), the maximum percentage drawdown satisfies .
Proof. Since the drawdown modulation policy satisfies Lemma 3.1, it assures for all with probability one. Therefore, it follows that
3.2 Optimal Drawdown Control Problem
Having obtained the drawdown modulation policy (1), a natural question arises of how to select an “optimal” To this end, we define the total return up to terminal stage as a ratio
where the subscript of is used to emphasize the dependence on the gain . Define . Then, we consider a multiperiod drawdown-based stochastic optimization problem
subject to
It is readily verified that
Therefore, we rewrite the problem as the following equivalent form
(2) |
In the sequel, we shall use to denote a maximizer of the optimization problem above. In practice, if one view that the optimum obtained may be too aggressive, a practical but arguably suboptimal way is to introduce an additional fraction, call it , that is used to shrink the investment size; see Maclean et al. (2010) for a similar idea. That is, instead of working with , one may work with where .
Remark 3.2 (Non-Convexity)
It is important to note that solving Problem (3.2) is challenging since the modulation function depends on and the history of , which in general yields a nonconvex problem; e.g., see Figure 4 in Section 4 for an illustration of non-convexity nature. Therefore, Monte-Carlo simulations are often needed to obtain the optimum.
3.3 Modulation with Restart
As mentioned in Section 1, while the derived drawdown modulation policy provides almost sure drawdown protection, it may incur a stop-loss behavior. To remedy this, we now introduce a restart mechanism into the modulation policy. Specifically, let be a prespecified threshold parameter. Then we set the threshold for restarting the trade by
(3) |
If, at some stage , Inequality (3) is satisfied, the trading is restarted by re-initializing and reset the time-varying gain function of the modulation policy at that stage as
(4) |
where represents a forgetting factor with fraction mentioned previously. Then we continue the trade until the next restart stage or to the terminal stage .
Remark 3.3
The forgetting factor in Equation (4) reflects the idea that the trading size should be shrunk after the restart. Said another way, if the trades are approaching the prespecified drawdown limit , the follow-up trades should be more conservative after the restart. Note that after the restart, the control policy satisfies since for all with probability one. While it does not consider in this paper, we should note that the optimal in Equation (4) can also be re-calculated at each restart time by using the previous stages information for some integer ; see also Wang and Hsieh (2022) for a similar idea for obtaining a data-driven log-optimal portfolio via a sliding-window approach.
4 Illustrative Examples
In this section, two trading examples are proposed to support our theory. The first example is trading with ETF and riskless asset. The second example is trading with Bitcoin and a riskless asset. For the sake of simplicity, we take a constant daily interest rate for all , which corresponds to a annual rate. While our theory allows leveraging, in the sequel, we impose an additional cash-financing condition by imposing that for all , which corresponds to
4.1 Trading with ETF and Riskless Asset
Consider the Vanguard Total World Stock Index Fund ETF (Ticker: VT)222VT invests in both foreign and U.S. stocks; hence it can be viewed as a good representative of the global stock market to be the risky asset covering a one-year in-sample period for optimization from January 02, 2019 to January 02, 2020, and the out-of-sample period from January 02, 2020 to September 20, 2022, which contains a total of trading days; see Figure 2 where the cyan colored trajectory is used for in-sample optimization and the blue colored trajectory is used for the out-of-sample trading test. It should be noted that due to the COVID-19 pandemic, the considered prices covering the 2020 stock market crash from February 20, 2020 to April 7, 2020, and a recovery period after the crash. Thus, we view this dataset as an excellent back-testing case for our proposed drawdown modulation policy with the restart.

Without loss of generality, consider the initial account value to be . To implement the drawdown modulation policy with restart, we set and restart threshold . With the data collected in the in-sample period, the corresponding feasible set is . Then we numerically solve the optimization problem (3.2) via Monte-Carlo simulations. It follows that any share an almost identical optimal value when the cash-financing condition is imposed. For the sake of risk-averseness, we pick the infimum of the candidates, i.e., . Using this , we obtain the drawdown modulation policy
The corresponding trading performance is shown in Figure 2, where the green dots indicate that the trade is restarted. In the same figure, we also compare it with the standard buy-and-hold strategy333Here, we mean buy and hold on the risky asset VT with . and the modulation policy without restart. We see clearly that the modulation policy with restart leads to superior performance. Some key performance metrics, including maximum drawdown and cumulative rate returns, and -period Sharpe ratio444The per-period Sharpe ratio is where is the per-period sample mean return, is the per-period sample standard deviation, and is the per-period riskless return. are reported in Table 1.

Trading Performance with and | |||
---|---|---|---|
Trading Policy | Buy and Hold | Modulation without Restart | Modulation with Restart |
Maximum percentage drawdown | |||
Cumulative rate of return | |||
-period Sharpe ratio | 1.0462 |
4.2 Trading with Cryptocurrency and Riskless Asset
As a second example, we consider a portfolio consisting of cryptocurrency BTC-USD and a riskless asset. The BTC-USD asset covers the same in-sample and out-of-sample periods described in Example 4.1. From January 02, 2020 to September 20, 2022, it has a total of trading days555It is worth noting that the cryptocurrency is typically traded at 24 hours a day, seven days a week. Therefore, it has longer tradings days than that trades with VT in Section 4.1.; see Figure 3. The corresponding feasible set for is .

Take and restart threshold . By solving the optimal drawdown control problem (3.2), we obtain ; see Figure 4 for versus . Note that the is clearly not concave for . To consider the volatile nature of cryptocurrency and unforeseen estimation error, we consider using a fractional by with . That is, with . The trading performances using drawdown modulation policy with and without restart, and buy-and-hold strategy are shown in Figure 5, where the green dots indicate that the trades were restarted. Some performance metrics are summarized in Table 2 where we see that the modulation with restart provides the highest Sharpe ratio among all the other strategies.


Trading Performance with and | |||
---|---|---|---|
Trading Policy | Buy and Hold | Modulation without Restart | Modulation with Restart |
Maximum percentage drawdown | |||
Cumulative rate of return | |||
-period Sharpe ratio | 2.1363 |
4.2.1 Transaction Costs Considerations.
Traditionally, with cryptocurrency as the underlying asset, most exchanges typically charge transaction fees from to , depending on the trading volumes. While we are not developing the drawdown modulation theory involving the transaction costs, in this example, we perform backtests to see the effects with percentage costs of per trade.666 This cost level is typical in common cryptocurrency exchanges such as Binance; see Hsieh (2022b). Take , and , the trading performances are shown in Figure 6. From the figure, we see that, even with transaction costs, the proposed modulation policy with a restart mechanism is still superior to that without a restart. The corresponding Sharpe ratio is about compared with that without restart, where the Sharpe ratio is down to .

5 Concluding Remarks
This paper extended the existing drawdown modulation policy with a novel data-driven restart mechanism. We first derived a drawdown modulation policy by proving a lemma for a two-asset portfolio involving one risky and riskless asset. Then we modified the derived modulation policy by adding the restart mechanism. Subsequently, we showed an auto-tuned trading performance using historical price data for an ETF and cryptocurrency within a duration where the prices are volatile. Overall, our modulation policy with restart dynamically controls the drawdown and maintains the profits level.
Some possible future research directions might include the multi-asset problem, which will be considered in the subsequent journal version of this paper. The other possibility is to consider the consumption-investment problem; i.e.,
where and are two utility functions with being the amount consumed at time . See Cvitanic and Zapatero (2004). Lastly, one might consider a more general portfolio optimization problem that seeks maximizing where is a strictly increasing and concave utility function. One example is to consider a general hyperbolic absolute risk aversion (HARA) class of utilities; i.e.,
for and . The HARA utility functions include the quadratic, exponential, and the isoelastic utility function as special cases.
Acknowledgment
The author thanks Chia-Yin Lee for coding and running some preliminary numerical examples on the early draft of this paper.
References
- Boyd et al. (2017) Boyd, S., Busseti, E., Diamond, S., Kahn, R.N., Koh, K., Nystrup, P., Speth, J., et al. (2017). Multi-Period Trading via Convex Optimization. Foundations and Trends® in Optimization, 3(1), 1–76.
- Chekhlov et al. (2005) Chekhlov, A., Uryasev, S., and Zabarankin, M. (2005). Drawdown Measure in Portfolio Optimization. International Journal of Theoretical and Applied Finance, 8(1), 13–58.
- Cvitanic and Karatzas (1994) Cvitanic, J. and Karatzas, I. (1994). On Portfolio Optimization Under “Drawdown” Constraints. IMA Volumes in Mathematics and its Applications, 65, 35–46.
- Cvitanic and Zapatero (2004) Cvitanic, J. and Zapatero, F. (2004). Introduction to the Economics and Mathematics of Financial Markets. MIT press.
- Fabozzi et al. (2007) Fabozzi, F.J., Focardi, S.M., Kolm, P.N., and Pachamanova, D.A. (2007). Robust Portfolio Optimization and Management. John Wiley & Sons.
- Goldberg and Mahmoud (2017) Goldberg, L.R. and Mahmoud, O. (2017). Drawdown: From Practice to Theory and Back Again. Mathematics and Financial Economics, 11(3), 275–297.
- Grossman and Zhou (1993) Grossman, S.J. and Zhou, Z. (1993). Optimal Investment Strategies for Controlling Drawdowns. Mathematical Finance, 3(3), 241–276.
- Hayes (2006) Hayes, B.T. (2006). Maximum Drawdowns of Hedge Funds with Serial Correlation. The Journal of Alternative Investments, 8(4), 26–38.
- Hsieh (2022a) Hsieh, C.H. (2022a). Generalization of Affine Feedback Stock Trading Results to Include Stop-Loss Orders. Automatica, 136, 110051.
- Hsieh (2022b) Hsieh, C.H. (2022b). On Robustness of Double Linear Trading with Transaction Costs. To appear in the IEEE Control Systems Letters.
- Hsieh and Barmish (2017a) Hsieh, C.H. and Barmish, B.R. (2017a). On Drawdown-Modulated Feedback Control in Stock Trading. IFAC-PapersOnLine, 50(1), 952–958.
- Hsieh and Barmish (2017b) Hsieh, C.H. and Barmish, B.R. (2017b). On Inefficiency of Markowitz-Style Investment Strategies when Drawdown is Important. In Proceedings of the IEEE Conference on Decision and Control (CDC), 3075–3080.
- Jorion (2000) Jorion, P. (2000). Value at Risk.
- Korn et al. (2022) Korn, O., Möller, P.M., and Schwehm, C. (2022). Drawdown Measures: Are They All the Same? The Journal of Portfolio Management, 48(5), 104–120.
- Luenberger (2013) Luenberger, D.G. (2013). Investment Science. Oxford University Press.
- Maclean et al. (2010) Maclean, L.C., Thorp, E.O., and Ziemba, W.T. (2010). Long-Term Capital Growth: the Good and Bad Properties of the Kelly and Fractional Kelly Capital Growth Criteria. Quantitative Finance, 10(7), 681–687.
- Magdon-Ismail and Atiya (2004) Magdon-Ismail, M. and Atiya, A.F. (2004). Maximum Drawdown. Risk Magazine, 17(10), 99–102.
- Malekpour and Barmish (2012) Malekpour, S. and Barmish, B.R. (2012). How Useful Are Mean-Variance Considerations in Stock Trading via Feedback Control? In Proceedings of the IEEE Conference on Decision and Control (CDC), 2110–2115.
- Malekpour and Barmish (2013) Malekpour, S. and Barmish, B.R. (2013). A Drawdown Formula for Stock Trading via Linear Feedback in a Market Governed by Brownian Motion. In Proceedings of the European Control Conference (ECC), 87–92.
- Markowitz (1952) Markowitz, H.M. (1952). Portfolio Selection. The Journal of Finance, 7, 77–91.
- Markowitz (1959) Markowitz, H.M. (1959). Portfolio Selection: Efficient Diversification of Investments, volume 16. John Wiley New York.
- Rockafellar and Uryasev (2000) Rockafellar, R.T. and Uryasev, S. (2000). Optimization of Conditional Value-at-Risk. Journal of Risk, 2, 21–42.
- Shapiro et al. (2021) Shapiro, A., Dentcheva, D., and Ruszczynski, A. (2021). Lectures on Stochastic Programming: Modeling and Theory. SIAM.
- Wang and Hsieh (2022) Wang, P.T. and Hsieh, C.H. (2022). On Data-Driven Log-Optimal Portfolio: A Sliding Window Approach. To appear in the IFAC-PapersOnline.
- Wu et al. (2022) Wu, J.M.T., Lin, S.H., Syu, J.H., and Wu, M.E. (2022). Embedded Draw-Down Constraint Reward Function for Deep Reinforcement Learning. Applied Soft Computing, 125, 109150.