Abstract

Mean reversion is an important property when constructing efficient contrarian strategies. Researchers observe that mean reversion has multiperiodical and asymmetric nature simultaneously in real market. To better utilize mean reversion and improve the existing online portfolio selection strategies, we propose a new online strategy named multiperiodical asymmetric mean reversion (MAMR). The MAMR strategy incorporates a multipiecewise loss function with the moving average method and then imitates the passive-aggressive algorithm. We further provide a solution via convex optimization. This strategy runs in linear time and thus is suitable for large-scale trading applications. Our empirical results testing six real market datasets show that this strategy can achieve better results in bearing higher transaction cost.

1. Introduction

Portfolio selection is a practical financial problem. It is mainly concerned with determining a strategy for allocating the wealth among a set of financial assets under an uncertain environment with certain objectives to achieve in the long run. Markowitz [1] proposed the mean-variance theory and pioneered the quantitative research methodology in portfolio selection. According to the mean-variance theory, there is a trade-off between the expected return (mean) and risk (variance) for a portfolio. In general, this approach is suitable for single-period portfolio selection, e.g., Zhang et al. [2] and Li and Jin [3]. On the other hand, Kelly [4] studied the optimal gambling strategy which aims to maximize the expected log return of an investment. The Kelly investment strategy is a natural candidate for multiperiodical portfolio selection. Due to the sequential nature of portfolio selection in the real world, we would prefer to follow the Kelly investment model and investigate the sequential portfolio selection strategies, also named online portfolio selection strategies, in this article. An online portfolio selection strategy refers to the strategy which determines portfolios based on publicly available information sequentially.

Following the Kelly investment model [4], several state-of-the-art online portfolio selection strategies with different intuitions [58] adopt the same trend-following approach. In other words, they assume that the current well-performing securities would not perform poor in the following trading days. However, empirical evidences [9, 10] indicate that such assumptions with respect to the trends may often be violated. Thus, we focus on those strategies based on another famous principle in finance, namely, the mean reversion principle [11]. Based on mean reversion, several strategies have been proposed [1215] and achieved encouraging results when applied to many datasets. However, some strategies perform poorly when testing certain datasets, such as the DJIA dataset [13, 15]. The reason is that mean reversion usually happens in the long term and has a multiperiodical nature [9], while those mean reversion strategies do not fully consider this feature. Thus, considering the multiperiodical mean reversion based on moving average forecast, the OLMAR (online moving average reversion) achieves better performance when applied to the DJIA dataset [14]. Although being studied extensively, these strategies are still limited in some aspects. Empirical evidences [1619] indicate that the speed and magnitude of mean reversion in various yield positions are quite different. In particular, a negative return reverts faster with a greater magnitude to a positive return than a positive return reverting to a negative one with a smaller magnitude. Combing the previous discussions, mean reversion is not only multiperiodical but also asymmetric.

In order to deal with the above drawbacks, we propose a new approach for online portfolio selection, named “multiperiodical asymmetric mean reversion” (MAMR). The basic idea of MAMR is to jointly model the multiperiodical mean reversion property based on moving average and the asymmetric property with an applicable multipiecewise loss function. Thus, we are able to determine the portfolio selection via online learning techniques [20]. The MAMR runs with linear time complexity. Therefore, it is suitable for large-scale trading applications. The experimental results show that MAMR can achieve better performance than several existing algorithms in terms of their long-term compound returns. Finally, it is robust to different parameter settings and it can bear higher transaction costs.

The rest of the paper is organized as follows. Section 2 formulates the online portfolio problem. Section 3 reviews the related work and discusses the motivation of this article. The details of our proposed MAMR approach are presented in Section 4. Section 5 validates its effectiveness using real market datasets. Finally, in Section 6, we summarize with conclusions.

2. Problem Setting

We follow the model setup introduced by Cover and Thomas [21], which contains a financial market with m stocks for n trading days. On the tth trading day, the prices of the m stocks are represented by a closing price vector , where represents the closing price of the ith stock. The change of these m stocks is represented by a price relative vector , where represents the ratio of the closing price of the ith stock on the tth trading day to its previous day’s closing price, i.e., . Thus, the performance or the factor increased of an investment in the ith stock on the tth trading day is . Let denote the sequence of price relative vectors for n days.

The portfolio vector , where represents the proportion of wealth invested in the ith stock, is the allocation of wealth in the m stocks at the beginning of the tth trading day. Typically, we assume that the portfolio is self-financed and no margin buying or short selling is allowed. Therefore, . The investment procedure is represented by a portfolio strategy, that is, a sequence of mappings and , where is the portfolio on the tth trading day given the past price relative vectors . We denote as the portfolio strategy for the n trading days.

In the initial trading day, as shown above, , which means that the initial allocation is uniform. In the tth trading day, portfolio achieves a portfolio daily return , that is, the wealth increases by a factor of . Obviously, is non-negative and indicates that investment losses in the tth trading day. After n trading days, since we use price relative, the investment cumulative wealth achieved by the investment according to the portfolio strategy could be calculated by a increment factor , that is,where denotes the initial wealth, which is set to 1, i.e., , for convenience.

So far, we formally formulate the online portfolio selection problem as a sequential decision task. In this task, a portfolio manager plays a role of decision maker who is required to design a portfolio strategy to maximize the portfolio cumulative wealth . On each trading day t, the manager learns from the historical information to select a new portfolio vector for the next price relative vector , where the decision criterion varies among different managers. The procedure is repeated until the end of the trading period. Algorithm 1 shows the online portfolio selection algorithmic framework.

(1)Input: Historical market price relative sequence
(2)Output: Final cumulative wealth
(3)Initialization: ,
(4)for to do
(5) Portfolio manager learns the portfolio based on historical information
(6) Market reveals the actual price relative
(7) Portfolio incurs daily return and updates cumulative return
(8)end for

Generally, we have three common assumptions in the above model:(1)No transaction costs, including commission fees or taxes, exist in the portfolio selection model(2)Perfect market liquidity, which means that one can buy or sell any desired amount, even fractional, at the last closing price of any given trading day(3)No market impact exists, that is, any portfolio selection strategy shall not influence the market behavior

These assumptions are commonly applied in most literatures. However, they are quite restrictive in practice. In Section 5, we would analyze and discuss the effects of transaction costs.

3.1. Related Work

Following the principle of the Kelly investment model [4], the online portfolio selection problem has been extensively investigated. The most common and well-known benchmark is the Buy-And-Hold (BAH) strategy, that is, one invests his/her wealth in the market with an initial portfolio and holds it until the end of his/her investment periods. The uniform BAH strategy refers to BAH with a uniform initial portfolio , which is usually adopted as the Market strategy to produce market index. Another commonly used benchmark is the Best Stock (Best) strategy, a special BAH strategy that invests all wealth on the best stock in hindsight.

Contrary to the static nature of BAH and Best, a classical active strategy is the Constant Rebalanced Portfolios (CRP) strategy [22], which rebalances a fixed portfolio during the entire trading period. The Best CRP (BCRP) is the best CRP strategy over the entire trading period. It is an optimal strategy if the market is i.i.d. [21]. Note that, same as BAH and Best, BCRP is only a hindsight strategy.

Several portfolio strategies assume that past well-performing securities would still perform well in the future. These strategies, such as the Universal Portfolios (UP) or the Exponential Gradient (EG), are called “Follow-the-Winner” or momentum strategies. Strategies in this category approximate the expected logarithmic cumulative return of BCRP. To be specific, Cover and Thomas [21] proposed the UP strategy, where the portfolio is the historical performance weighted average of all possible CRP experts. Helmbold et al. [6] proposed the EG strategy, which is based on multiplicative updates.

Although the trend-following principle is convenient for online portfolio selection, empirical evidences [9, 10] indicate that opposite trends may often happen, that is, a common and famous principle in finance, namely, mean reversion. Based on the idea of mean reversion, Borodin et al. [12] proposed the Anticorrelation (Anticor) strategy. To exploit the nature of mean reversion, Anticor calculates a cross-correlation matrix between two specific market windows and transfers the wealth from winning assets to losing assets, and the corresponding amounts are adjusted by the cross-correlation matrix. Li et al. [15] proposed the Passive Aggressive Mean Reversion (PAMR) strategy, which only considers the single-periodical mean reversion property with the passive aggressive (PA) online learning algorithm [20]. Gao et al. [13] proposed the Passive Aggressive Combined Strategy (PACS), which combines price reversion and momentum via a multipiecewise loss function. By exploiting mean reversion’s multiperiod nature via moving average prediction, Li et al. [14] proposed the Online Moving Average Reversion (OLMAR) strategy, which improves the poor performance of PAMR and PACS when applied to the DJIA dataset. These strategies, including Anticor, PAMR, OLMAR, and PACS, buy poor performing securities and sell well-performing ones. In a word, mean reversion is crucial for constructing efficient online portfolio selection strategies.

3.2. Motivation

The existing mean reversion strategies, i.e., PAMR and OLMAR, only exploit mean reversion’s single-periodical nature or multiperiodical nature. Although the existing mean reversion strategies perform well, they cannot fully exploit the potential price fluctuations in real markets because mean reversion also has an asymmetric nature according to extensive empirical research studies [1619]. It is particularly critical for online portfolio strategies to exploit not only the multiperiodical property but also the asymmetric nature of mean reversion.

In this study, we focus on combining these two natures of mean reversion. First, for the multiperiodical property of mean reversion, we will estimate the future price relative via the moving average method with fixed window size , such as

Second, the state-of-the-art mean reversion strategy studies, such as OLMAR, formulate their optimal problem with the following loss function:which essentially exploits the symmetric nature of mean reversion. In order to exploit the asymmetric mean reversion, we will construct a piecewise loss function based on the price relative estimation and use the loss function to build an optimization problem in Section 4.

Finally, by solving the optimization problem, we will present an online portfolio selection strategy, which exploits not only the multiperiodical property but also the asymmetric nature of mean reversion, and name it as the “multiperiodical asymmetric mean reversion” (MAMR) strategy. With experiments in Section 5, we will show the proposed MAMR’s advantages over the other state-of-the-art strategies.

4. Online Strategy with Multiperiodical Asymmetric Mean Reversion

In this section, we present the MAMR strategy based on the multiperiodical and asymmetric nature of mean reversion.

To address the multiperiodical nature, we follow the study of Li et al. [14] and use the simple but effective moving average to predict the next price relatives. Specially, we estimate the next closing price by moving average at the end of the tth day, that is,where is the window size. Then, the expected price relative vector with moving average iswhere denotes the dot product. In Section 5, the experimental results would show that the ordinary moving average is more suitable than the weighted moving average for our contrarian online strategy. Then, based on the obtained price relative , we can determine the next portfolio via the passive aggressive (PA) online learning technique [1315, 20]. We can formulate the following optimization problem.

4.1. Optimization Problem: MAMR

where is the sensitivity parameter which controls the mean reversion threshold and is the -insensitive loss. The above formulation attempts to find an optimal portfolio by minimizing the deviation from last portfolio under the condition of .

In this article, we formulate the -insensitive loss as a multipiecewise function named in order to distinguish from the loss function in OLMARwhere .

If all stocks rise synchronously or certain stocks rise significantly, the market is called “bull.” A bull market is associated with investors’ increasing confidence. In this situation, we would stop actively rebalancing the portfolio to avoid missing the “bull” stocks, while in financial crisis, we would adopt the passive strategy, the same as in the bull market, to avoid certain “mine” stocks. These two situations are formulated in the first category in equation (7), i.e., if , then the -insensitive loss is zero. According to equation (6), MAMR passively maintains the last portfolio if the loss is zero; otherwise, it aggressively adjusts the portfolio forcing the loss to be zero, which is discussed below.

Besides the “bull” and the financial crisis, we will actively rebalance the portfolio to ensure that the expected portfolio daily return falls in the interval of with the exception that the stock prices will revert in the next trading days. According to the asymmetric nature of mean reversion [1619], the stock prices will revert in different magnitudes if the expected portfolio daily return falls in different intervals.

We now obtain the final portfolio selection formula by solving the optimization problem (6) and obtain the following proposition.

Proposition. The solution of the optimization problem without considering the non-negativity constraint iswhere denotes the average predicted price relative and is the Lagrangian multiplier calculated as follows:where is predefined as in equation (7).

Proof. Since the constraint in equation (6) is convex, we solve the optimization problem (6) via the Lagrange multiplier method directly.
First, if , then satisfies the constraint in the optimization problem (6) and is clearly the optimal solution.
Now, let us consider the case where . We define the Lagrangian of the optimization problem (6) to bewhere and are the Lagrangian multipliers. Taking the gradient with respect to and setting it to zero, we getMultiplying both sides by , with the simplex constraint, i.e., and , we getwhere denotes the average predicted price relative (market). Plugging equation (12) into equation (11), we get the update of as follows:To solve the Lagrangian multiplier , we plug equation (13) into equation (10):Taking derivative with respect to and setting it to zero, we getIn case of , we just set .
To this end, we can design the proposed algorithms based on the above proposition. The proposed MAMR updating procedure is illustrated in Algorithm 2. Furthermore, Algorithm 3 presents the online portfolio selection procedure with MAMR.
Now, let us briefly analyze the time complexity of the proposed MAMR algorithm. Algorithm 2 takes per period. Then, the whole time complexity of MAMR for n periods is , which is linear with respect to the number of assets m and the total number of trading periods. Table 1 compares the time complexity of MAMR with those of the existing strategies. Clearly, the proposed MAMR algorithm takes no more time than any others.

(1)Input: Reversion threshold ; Predicted next price relative vector ; Current portfolio ; Loss function parameters
(2)Output: Next portfolio
(3)Calculate the Lagrangian multiplier:
(4)Update the portfolio:
(5)Normalize the portfolio:
(1)Input: Reversion threshold ; Window size ; Historical market sequence
(2)Output: Final cumulative wealth
(3)Initialization: , ,
(4)for to do
(5)
(6)end for
(7)for to do
(8) Receive stock price relatives:
(9) Update cumulative return:
(10) Predict next price relative vector:
  
(11) Update the portfolio:
  
(12)end for

5. Experiments

5.1. Datasets and Comparison Strategies

In this section, we will examine the empirical efficacy of the proposed MAMR strategy by conducting extensive numerical experiments on a variety of real datasets. For better comparison with other state-of-the-art strategies, we adopt six real datasets, which are summarized in Table 2.

The first dataset is NYSE(O), which is a standard dataset pioneered by Cover [5]. Several research studies [6, 12, 14, 15] also utilize NYSE(O) in their experiments. This dataset contains 5651 trading days’ price relatives of 36 stocks in the New York Stock Exchange.

The second dataset is NYSE(N), which is extended from the above NYSE(O) and collected by Li et al. [15]. This dataset contains 6431 trading days’ price relatives of 23 stocks. The third dataset, SP500, is collected by Borodin et al. [12], which consists of 25 stocks ranging from January 2, 1998, to January 31, 2003, containing 1276 trading days.

The fourth dataset is DJIA, which is collected by Borodin et al. [12] and consists of 30 Dow Jones composite stocks and contains 507 trading days. The fifth dataset, TSE, is collected by Borodin et al. [12] and consists of 88 stocks from Toronto Stock Exchange containing price relatives of 1259 trading days.

The final dataset is MSCI, which is a collection of global equity indices that constitute the MSCI World Index. It contains 24 indices which represent the equity markets of 24 countries around the world and consists of a total of 1043 trading days.

The above six datasets cover much diversified markets and much long trading periods including different events and crises, such as dot-com bubble from 1995 to 2000 and subprime mortgage crisis from 2007 to 2009. This enables us to examine the behaviors of the proposed strategies under different environments.

Besides the above six real market data, in the experiments, we also ran each dataset in their reverses [12]. For each dataset, we created a reversed dataset, which reverses the original order and inverts the price relatives. We denote these reverse datasets using a “−1” superscript on the original dataset names. In nature, these reverse datasets are quite different from the original datasets, and we are interested in the behaviors of the proposed algorithm on these artificial datasets.

In our experiments, we implement the proposed MAMR and simply set the parameters empirically without tuning for each dataset separately as follows: , , , and . These settings are convenient for comparison between MAMR and other state-of-the-art strategies. Roughly speaking, the best values for these parameters are often dataset dependent. It is worth noting that these parameter choices are not always optimal for MAMR, and we will also evaluate the parameter sensitivity in later section.

In the following sections, we will compare the proposed MAMR with a number of benchmarks and representative state-of-the-art online strategies. It is worth mentioning that all of the comparing strategies exhibit particular empirical efficiency in their respective studies and all parameter settings follow their original studies. The compared algorithms and the corresponding parameter settings are summarized below:(1)Market: Market strategy or the uniform Buy-And-Hold (BAH) strategy(2)Best-Stock: best stock in the market, which is a strategy in hindsight(3)BCRP: best constant rebalanced portfolio strategy in hindsight(4)UP: Cover’s universal portfolios implemented according to Kalai and Vempala [23], where the parameter setting equals , , , and (5)EG: exponential gradient algorithms with learning rate [6](6)Anticor: BAH30(Anticor(Anticor)), a variant of Anticor to smooth the performance, which achieves the best performance among the three solutions proposed by Borodin et al. [12](7)PAMR: passive aggressive mean reversion with parameter [15](8)PACS: passive aggressive combined strategy with parameter [13](9)OLMAR: online moving average reversion with parameters and [14](10)WMAAMR: weighted moving average asymmetric mean reversion with parameters and [24]

5.2. Experimental Results—Cumulative Wealth

Table 3 reports the cumulative wealth achieved by various strategies without transaction costs when applied to the six datasets. The experimental results clearly show that MAMR outperforms almost all the other benchmarks and state-of-the-art strategies for the six datasets considered here.

Table 4 shows some statistics [25] of MAMR. From the results, we can conclude that the small p values are an indication that MAMR’s excellent performance is not due to luck but owed to the strategy principle.

5.3. Experimental Results: Risk-Adjusted Returns

We also evaluate the volatility risk and drawdown risk, and the risk-adjusted returns, that is, the annualized Sharpe Ratio (SR) and Calmar Ratio. Figure 1 shows the evaluation results with respect to the six datasets. In order to compare with the existing algorithms, we also plot two benchmarks (Market and BCRP) and four state-of-the-art algorithms (EG, PAMR, PACS, and OLMAR).

In Table 3, we find that the proposed MAMR achieves the highest cumulative wealth on most datasets. As we all know, however, high return is almost simultaneous with high risk. The volatility risk in Figure 1(a) shows that our proposed method has the highest volatility risk on most datasets. In addition, the drawdown risk in Figure 1(b) also shows that the proposed method has the high drawdown risk on most datasets.

In order to further evaluate the returns and risks of the proposed MAMR, we examine the annualized Sharpe Ratio and the Calmar Ratio. Both two indexes are typical measure for evaluating portfolio strategies’ risk-adjusted returns. Though with the high risk, MAMR has a highly competitive risk-adjusted return. The results in Figures 1(c) and 1(d) clearly show that MAMR always has the top value in most cases. The results show that the proposed method can reach a reasonable trade-off between risk and return.

5.4. Parameter Sensitivity

Now, we evaluate the effect of parameter sensitivity on the cumulative wealth. Figure 2 shows MAMR’s sensitivity of with fixed , , and , and Figure 3 shows its sensitivity of with fixed , , and . In Figure 4, we illustrate the cumulative wealth achieved by MAMR with varying but fixed , , and . Conversely, we illustrate the cumulative wealth achieved by MAMR with varying but fixed , , and in Figure 5.

First, we examine the effect of the sensitivity parameter on the cumulative wealth achieved by MAMR. From Figure 2, we observe that the cumulative wealth achieved by MAMR sharply grows when increases and approaches to 1 and then tends to stabilize when crosses certain dataset dependent thresholds. As stated before, we choose in the experiments, with which the cumulative wealth becomes stabilized in most cases.

Second, we evaluate the effect of the other sensitivity parameter . From Figures 3(a), 3(b), 3(e), and 3(f), we can see that as increases, the cumulative wealth decreases. Furthermore, the performance appears to have bigger fluctuations in Figures 3(c) and 3(d). To smooth the volatility of MAMR’s performance, Figure 3 also shows the BAH version of MAMR [12] by setting its maximum window size and combing the 28 MAMR experts with to 30. As we can see, performs much smoother than their underlying experts.

Third, Figure 4 shows the effects on the cumulative wealth with varying sensitivity parameters from 1 to 90. From Figures 4(a), 4(b), 4(e), and 4(f), we can see that the cumulative return achieved by MAMR increases and reaches its peak as increases and approaches 10, while in Figures 4(c) and 4(d), we can see that the performance has bigger fluctuations. Nevertheless, as long as is not too small or too big, MAMR will perform better than the Market and BCRP benchmarks.

Finally, Figure 5 shows the effects on the cumulative wealth with varying sensitivity parameters from 4 to 100. We observe that the cumulative wealth achieved by MAMR flattens no matter how varies. The result exhibits that the proposed MAMR strategy is robust with respect to . In a word, we can claim that the proposed MAMR algorithm is robust with respect to its parameters.

5.5. Practical Performance with Transaction Costs and Margin Buying

Now, we discuss and evaluate two practical issues in online portfolio selection, i.e., the transaction costs and margin buying. As shown in Section 2, there are three basic assumptions, i.e., no transaction cost, perfect market liquidity, and no market impact, in our model. We shall now relax some constraints to address these two issues.

First, we adopt the proportional transaction cost model proposed by Blum and Kalai [26]. Specifically, rebalancing the portfolio incurs a transaction cost for every buying and selling, based on a transaction cost rate . At the beginning of the tth trading day, the portfolio manager rebalances the portfolio from the previous closing price adjusted portfolio to a new portfolio , incurring a transaction cost of , where the initial portfolio is set to . Thus, at the end of n trading days, the final cumulative wealth involving transaction costs can be expressed as

Figure 6 illustrates the final cumulative wealth achieved by different algorithms with increasing transaction cost rate. We can clearly observe that the proposed MAMR significantly outperforms the others in the six datasets. In addition, the results clearly show that MAMR can withstand reasonable transaction costs as it has higher break-even rates with respect to the Market. In a word, MAMR performs excellent when the Market is not frictionless and is suitable for practical applications.

6. Conclusions

This paper proposes a novel online portfolio selection strategy named the “multiperiodical asymmetric mean reversion” (MAMR), which exploits the mean reversion’s multiperiodical and asymmetric nature via moving average and online learning algorithms. Our empirical results show that the approach can solve the problems of implausible assumption with respect to mean reversion, of the existing state-of-the-art strategies caused by the single-period symmetric mean reversion assumption. Our proposed strategy achieves satisfying results when applied to real market data. It also runs extremely fast and is suitable for large-scale real market applications.

In our future research, we shall study the following issues. Firstly, MAMR’s universality is still an open question. It would be significant to test and compare these different strategies on unbiased datasets. Secondly, more accurate methods for estimating mean reversion need to be studied. Finally, though MAMR handles the issue of transaction costs well, it is not formally addressed in our problem formulation. It would be interesting to incorporate the transaction cost issue when formulating the problem, especially, in the case of high transaction costs and high frequency trading.

Data Availability

Previously reported financial data are used to support this study and are available at http://www.cais.ntu.edu.sg/∼libin/portfolios. These prior studies and datasets are cited at relevant places within the text as references [5, 12, 15].

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This paper was supported by the National Natural Science Foundation of China (nos. 71771091 and 71720107002), Natural Science Foundation of Guangdong Province (no. 2017A030312001), and Youth Program of Humanities and Social Sciences Foundation of the Ministry of Education of China (no. 17YJC630026).