Abstract
We improve the traditional simple moving average strategy by incorporating an investor-specific risk tolerance into the method. We then propose a multiasset generalized moving average crossover (MGMA) strategy. The MGMA strategies allocate wealth between risky assets and risk-free assets in an adaptive manner, with the risk tolerance specified by an investor. We derive the expected log-utility of wealth, which allows us to estimate the optimal allocation parameters. The algorithm using our MGMA strategy is also presented. As the multiple risky assets can have different variability levels and could have various degrees of correlations, this trading strategy is evaluated on both simulated data and global high-frequency exchange-traded fund (ETF) data. It is shown that the MGMA strategies could significantly increase both the investor’s expected utility of wealth and the investor’s expected wealth.
Keywords:
algorithm; high-frequency; exchange-traded fund; moving average; technical analysis; strategy MSC:
62P05; 91G10
1. Introduction
This paper provides an optimal and adaptive portfolio allocation strategy based on the technical analysis of a diversified investment portfolio. The investment portfolio often contains more than one risky asset to avert possible significant loss. Portfolio allocation is an important strategy for investors and traders, and they are interested in an optimal allocation when they have enough capital to invest in more than two assets. They might want to allocate the wealth not only between one risk-free asset and another risky asset but also among different risky assets. The common approach is to assign equal weights when allocating the wealth among the risky assets, which, however, is not always optimal. We believe that an allocation amount should be a function of the investor’s specified risk tolerance, and this consideration could lead to a more favorable investment outcome. We focus on finding optimal trading strategies based on technical analysis, such as moving averages for building a multiple-asset portfolio. We propose a multiasset generalized moving average crossover (MGMA) strategy. This strategy can allocate wealth not only between one risky asset and another risk-free asset but also among different risky assets, with the risk tolerance specified by the investor. It can also increase both the investor’s expected utility of wealth and the investor’s expected wealth.
Technical analysis is widely adopted by investors in practice. The empirical evidence, including the predicted performance of a stock return, demonstrates the usefulness of technical analysis (see [1,2,3,4]). Among all the technical analysis methods, the moving average strategy is the simplest and most popular trading rule. Ref. [1] appeared to be the first article to provide strong evidence of profitability by using a moving average technique in analyzing daily Dow Jones Industrial Average (DJIA) data. The moving average strategy in technical analysis follows an all-or-nothing investment strategy: when a buy signal is triggered by the moving average crossover (MA) strategy, the investor should allocate all of his/her wealth to the stocks of interest; when a sell signal is triggered by MA, the investor should allocate none of the wealth into the stocks by selling all the current holdings. Thus, this simple moving average strategy suffers from a well-known drawback, since its allocation is always either 100% or 0%. Ref. [2] provided further evidence based on different time series data obtained from financial markets. These studies have generated further research interest on moving average strategies. However, most of the studies have been focused on validating the strategy using different data sets. The conclusions are mixed and inconclusive (see [5,6,7,8,9]). An increasing number of studies are focused on the predictive power of a moving average technique (see [10,11,12,13,14,15]). Ref. [16] provided the first theoretical analysis for this simple moving average crossover strategy. Their study focuses on how technical analysis such as this moving average strategy can add value to commonly used allocation rules that invest fixed proportions of wealth in stocks. Ref. [17] provided a general equilibrium model for the MA strategy and argued MA signals in their model are helpful for investors in pricing the asset. In addition, more studies focus on the applications of MA strategy. Ref. [18] combined MA signals to create a factor to explain various term momentum. Ref. [19] combined MA signals to estimate equity returns. Ref. [20] suggested that the effectiveness of technical analysis depends on the level of PIN (probability of informed trading).
Most asset allocation studies focus on finding an optimal portfolio choice under different modeling processes (see [21,22,23,24,25]). Refs. [26,27] incorporated technical indicators into the portfolio construction problem. However, they do not study the optimal allocation in the context of using technical analysis strategies for a multiasset portfolio. In addition, few studies reconciled the technical indicators with a portfolio selection policy that guides investment decisions in a multiasset setting. Ref. [28] bridged the gap by devising a portfolio strategy in which optimal weights are directly parameterized as a function of multiple trend-following signals. However, there is no extension to a multiple-asset setting with an optimal allocation as the objective. Recently, an increasing number of studies are focused on using machine learning for portfolio allocation strategies. Ref. [29] used machine learning to find the optimal portfolio weights between the market index and the risk-free asset and found that a portfolio allocation strategy employing machine learning to reward–risk time in the market gave significant improvements in investor utility and ratios. They use random forest and update the weights on only a monthly basis or over a relatively long period of time, while our methods are instantaneous and much less computationally intensive, since they do not require building a forest or any tree pruning. Ref. [30] developed optimization algorithms with machine learning techniques and assessed the risk characteristics of a large commodity portfolio. Their objective is the prediction of risk measures instead of expected returns. Ref. [31] proposed a novel two-stage method for well-diversified portfolio construction based on stock return prediction using machine learning. They use the mean-variance model for portfolio construction. The challenge of the mean-variance model is its well-known sensitivity to the change in mean return.
We derive the expected log-utilitity of wealth, which provides the mechanism for the optimal allocation estimates. This provides the theoretical foundations of our strategy. The algorithm using our MGMA strategy is also developed for the application of our methods. Furthermore, motivated by recent years’ studies on higher-frequency information on financial market forecasting (see [32,33]), we tested the proposed MGMA strategy using the daily second-level exchange-traded fund in the North American market. In general, the Sharpe index is appropriate for evaluating a trading strategy. We did not feel that this is the best measure for our method, since the expected return of our strategy is clearly not normally distributed, with the median much closer to the minimum than that from the maximum, as suggested in our simulation study. This suggested that there is a long tail on the right-hand side associated with the case of high profitability. The large variation above the median level suggested a desirable significant chance of making a great profit. If we use the standard deviation as the denominator, it will dilute the advantage of our method, since it is unduly penalized by the possibility of extreme profitability.
The rest of the paper is organized as follows. We introduce the general model with the MGMA strategy in Section 2. We present the main theoretical results in Section 3. We provide an investment algorithm for the multiasset portfolio in Section 4. We carry out simulation studies in Section 5. We present the results of real data analysis in Section 6. We conclude the article in Section 7.
2. The Model and the MGMA Strategy
Suppose that there are assets in a financial market. For convenience, we assume that the first one is risk-free, e.g., a cash or money market account with a constant interest rate of r. The other n assets are risky ones, which, for example, can be stocks or indices representing the aggregate equity market. A multiasset portfolio contains n risky assets. The wealth can be allocated not only between the risk-free asset and one risky asset but also among risky assets.
We follow [34] to define a general model for a multiasset portfolio with multiple predictive variables. Suppose that the price of the risk-free asset at any time t satisfies that
Moreover, suppose that there are q predictive variables that can be accurately observed at continuous times. Then, the vector of n risky asset prices at any time t satisfies that
and the dynamics of the vector of q predictive variables satisfies that
where
and
The vectors and and matrices U, , , and are all unknown. The vectors and are a multidimensional standard Brownian motion, such that
where denotes an identity matrix. Each predictive variable is assumed to be a stationary process for , . In order to ensure is a mean-reverting process, is assumed to be symmetric negative definite, i.e., and for any .
We first recall the original MA strategy. We define some notations for the kth stock () in the market. Let be the real stock price at time t and be its log-transformed stock price, i.e.,
Denote a lag or lookback period by . In view of [16], a continuous time version of the moving average of this log-transformed stock price at any time t is defined as
i.e., the average log-transformed stock price over time period . Let be the difference between and , where is a short-term lookback period and l is a long-term lookback period , i.e.,
Define as
Denote the MA strategy for an n-asset portfolio by . Then, for a single-asset portfolio, i.e., , is defined as
and the MA strategy for a two-asset portfolio, i.e., , is defined in Table 1. We follow the common approach to assign equal weights when there is more than one investment signal.
Table 1.
MA strategy for a two-asset portfolio.
We now define the MGMA strategy. The key is to introduce an investor’s specific risk tolerance into the moving average strategy. Define as
Let be the vector of n stock prices, be the vector of n log-transformed stock prices, and be the vector of n differences between the moving averages, i.e.,
Let and , . Define as
Let be the MGMA strategy for the kth risky asset in a multiasset portfolio. Let be the asset allocation parameter for the kth risky asset in the multiasset portfolio. Suppose that is the vector based on the MGMA strategy and is the vector of the n asset allocation parameters, i.e.,
Then, for , we define the MGMA strategy as
where is an indicator function such that
To ensure is well-defined, for , we define as a constant vector , i.e., , where is a constant for and .
The MGMA strategy is a market-timing strategy that allocates wealth not only between one risk-free asset and one risky asset but also among risky assets, with the risk tolerance specified by the investor. Note that the MA strategy is a special case of the MGMA strategy. Theoretically speaking, the asset allocation parameter can be any number which is interpreted as a long portion of stocks if and a short portion of stocks if . Therefore, there are parameters for the MGMA strategy on a multiasset portfolio which contains n risky assets.
We give some examples of the MGMA strategy. The MGMA strategy for a signal-asset portfolio is defined as
where and . The MGMA strategy for a two-asset portfolio consists of 32 parameters, which is defined in Table 2.
Table 2.
MGMA strategy for a two-asset portfolio.
It is obvious that the MGMA strategy is very complex, even for a two-asset portfolio. In light of [6], we consider no-borrowing and no-short-sale constrains, i.e., and . We use these constrains to reduce parameters to five, i.e., , as in Table 3, for implementation.
Table 3.
Simplified MGMA strategy for a two-asset portfolio.
The MGMA strategy from an asset allocation perspective now becomes finding the optimal that maximizes the investor’s expected log-utility of wealth
subject to a budget constraint
given an initial wealth for a multiasset portfolio, a constant rate of interest r, and an investment horizon T, where .
3. The Analytic Results
To focus on the framework and the MGMA strategy, we only present the main analytic results in this section. The lemmas used to derive the formulas are presented in Appendix A.
In order to find an optimal , we need to derive the investor’s expected log-utility of wealth . To derive it, we need to find the joint distribution of . Let be the expectation of , be the expectation of , be the variance–covariance matrix of , be the variance–covariance of , and be the covariance matrix between and . Based on Lemmas A2, A4, A9 and A12 in Appendix A, it is derived that has a multivariate normal distribution, i.e.,
and
where
and
Note that the distribution of does not depend on t. From the multivariate normal distribution of , we have
Denote , and as
Thus, we have
where and is the correlation matrix for the vector , i.e.,
Denote the probability density function of by . Let be any hyper-rectangle. For a simple presentation, let , . We define
and
Similar to Equation (9), we define as
We also define
where , .
Given an initial wealth , a constant rate of interest r, and an investment horizon T, let be the investor-specified risk tolerance, be the vector of n asset allocation parameters, and be the vector-based multiasset generalized moving average crossover (MGMA) strategy. For the MGMA strategy, we have the following propositions.
Proposition 1.
The expectation of is independent of time t and given by
Proposition 2.
The expectation of is independent of time t and given by
Proposition 3.
The expectation of is independent of time t and given by
Proof.
Proposition 4.
Let be a constant vector for MGMA strategy when , i.e., , where is a constant for and . Let be the investor-specified risk tolerance, then the investor’s expected log-utility of wealth at the end of investment period T is
where and is a constant depending on l, i.e.,
By Propositions 1–3, Equation (24) can be rewritten as
Proof.
Since and , where and is the identity matrix,
which implies that
By Equation (11) with ,
which implies that
By Propositions 1–3, we note that , and are all independent of time t. Since and by Lemma A2 in Appendix A, we derive
where , and is a constant depending on l, i.e.,
then Equation (24) is proved. □
Now, we can calculate optimal estimates of the asset allocation parameters for the MGMA strategy by maximizing with respect to asset allocation parameters . Suppose that the investor-specific risk tolerance , then for kth stock, we solve following equation for optimal estimates , i.e.,
We also restrict , which means there are no-borrowing and no-short-sale constrains; then, the optimal estimates of are
Note that the optimal estimates are functions of the investor-specified risk tolerance . The results illustrate that the MGMA is a better investment strategy compared with the MA strategy for the multiasset portfolio, because it has a higher expected utility of wealth for the investor.
4. An Investment Algorithm for Multiasset Portfolio
We propose an investment algorithm using the MGMA strategy for a multiasset portfolio. The algorithm is tested on simulation data and real data to evaluate the performance of the MGMA strategy. The algorithm contains the following steps:
- Step 1.
- Set investment parameters , r and T, , , s and l.
- Step 2.
- Compute model parameters , , , , , and .
- Step 3.
- Compute and .
- Step 4.
- Calculate , , and .
- Step 5.
- Allocate the wealth among n risky assets and one risk-free asset according to .
- Step 6.
- The holding risky assets are sold at the end of the investment horizon T.
5. Simulation Studies
We present several numerical examples based on a simulated two-asset portfolio and a simulated three-asset portfolio. Motivated by recent research on higher-frequency information on financial market forecasting, we simulated a daily second-level two-asset portfolio and a daily second-level three-asset portfolio. The investment algorithm is tested and compared with the MA strategy as the benchmark.
5.1. Simulation Results for Two-Asset Portfolio
The simulated two-asset portfolio data are generated using the parameters below.
and
and
The simulation runs 1000 times. Each time series contains 97,500 observed points.
The simulation studies are performed under two scenarios ( vs. ). We set initial wealth and interest rate . Under each scenario, we test the MGMA strategy based on and and compare it with the MA strategy. The MGMA strategy performance results are provided in Table 4 and Table 5. We first report the theoretical expected log-utility of wealth based on Equation (25) with the percentage increase in the expected log-utility of wealth compared with the MA strategy. We then report numerical summaries to calculate from the simulation results, including the expected log-utility of wealth , the expected wealth , the expected return on asset ratio , etc.
Table 4.
MGMA strategy performance summary for scenario 1 on the simulated two-asset portfolio (1000 run; ; ).
Table 5.
MGMA strategy performance summary for scenario 2 on simulated two-asset portfolio (1000 run; ; ).
In the rest of this paper, , , , , and respectively stand for the estimates of , , , , and , and denotes the expected number of transactions.
Note that the MGMA strategy for a two-asset portfolio can increase the investor’s expected log-utility of wealth and also increase the investor’s expected wealth and the expected return on asset ratio from the simulation results. Under scenario 1, the expected log-utility of wealth increases in the range of to . The expected return ratio increases from benchmark return to , and , respectively. Under scenario 2, the expected log-utility of wealth increases in the range to . The expected return ratio increases from benchmark return to , and , respectively.
5.2. Simulation Results for Three-Asset Portfolio
The simulated three-asset portfolio time series data are generated using the parameters below.
and
and
The simulation runs 1000 times. Each time series contains 97,500 observed points.
The simulation studies are performed under two scenarios ( and vs. and ). We set initial wealth and interest rate . Under each scenario, we test the MGMA strategy based on and and compare it with the MA strategy. The MGMA strategy performance results are provided in Table 6 and Table 7. We first report the theoretical expected log-utility of wealth based on Equation (25) and the percentage increase in the expected log-utility of wealth compared with the MA strategy. We then report numerical summaries to calculate from the simulation results, including the expected log-utility of wealth , the expected wealth , the expected return on asset ratio , the standard deviation of wealth , the maximum of wealth , the minimum of wealth , the median of wealth and the expected number of transactions . By using no-borrowing and no-short-sale constraints, we can reduce the parameters of MGMA strategy for a three-asset portfolio from 192 to 37 for implementation. For easy illustration, we do not report the optimal asset allocation parameters in the simulation summary tables.
Table 6.
MGMA strategy performance summary for scenario 1 on the simulated three-asset portfolio (1000 run; ; ).
Table 7.
MGMA strategy performance summary for scenario 2 on simulated three-asset portfolio (1000 run; ; ).
Note that the MGMA strategy for a three-asset portfolio can increase the investor’s expected log-utility of wealth and also increase the investor’s expected wealth and the expected return on asset ratio from the simulation results. Under scenario 1, the expected log-utility of wealth increases in the range to . The expected return ratio increases from a benchmark return of to and , respectively. Under scenario 2, the expected log-utility of wealth increases in the range of to . The expected return ratio increases from a benchmark return of to and , respectively.
6. Real Data Applications
We present several real data analyses based on high-frequency exchange-traded fund (ETF) data. The investment algorithm is tested and compared with the benchmark. The simplified MGMA strategy for a two-asset portfolio in Table 3 is used. The MA strategy for a two-asset portfolio in Table 1 is used as the benchmark strategy.
6.1. An Algorithm to Estimate Model Parameters
In order to use the investment algorithm for a multiasset portfolio on real data, we need to estimate model parameters , , U, , , , and . There is no such algorithm in the literature due to complex model settings. We propose an algorithm to fill the gap. Without loss generality, we describe the algorithm by using a general model for a two-asset portfolio. Based on Equation (2),
and Equation (3),
where
and
Let ; then, it is easy to check the log-likelihood function for is
and let , then the log-likelihood function for is
Let ; it is also easy to verify that
Then, the algorithm contains the following steps:
- Step 1.
- Given a , calculate , , and (for ) based on the historical time series.
- Step 2.
- Use least square estimation method to estimate parameters , , , , , and by minimizing
- Step 3.
- Let , and use least square estimation method to estimate parameters , , , and by minimizing
- Step 4.
- Calculate and from , , and , , , , , , , , , , , , and .
- Step 5.
- Use maximum likelihood estimation method and setto estimate from . Since , we can estimate parameters , , , and .
- Step 6.
- Use maximum likelihood estimation method and setto estimate , , , and from .
- Step 7.
- Calculate and from , , , and .
- Step 8.
- Calculate from and . Then, the estimated parameter is .
6.2. Case 1: MGMA Strategy on High-Frequency Exchange-Traded Fund in North American Market
We use PowerShares QQQ Trust Series 1 (QQQ) and SPDR S&P 500 ETF Trust (SPY). These are exchange-traded funds incorporated in the USA. QQQ ETF tracks the performance of the Nasdaq 100 Index. It holds large-cap U.S. stocks and tends to focus on the technology and consumer sector. The holdings are weighted by market capitalization. As of 6 October 2017, there were 107 holding companies. The top three holding companies are Apple Inc., Austin, TX, USA (AAPL, 11.57%), Microsoft Corp., Redmond, WA, USA (MSFT, 8.44%), and Amazon.com, Inc., Seattle, WA, USA (AMZN, 6.86%). SPY ETF tracks the S&P 500 Index. The trust consists of a portfolio representing all 500 stocks in the S&P 500 Index. It holds predominantly large-cap U.S. stocks. It is structured as a unit investment trust and pays dividends on a quarterly basis. The holdings are weighted by market capitalization. As of 6 October 2017, the top three holding companies were Apple Inc., Austin, TX, USA (AAPL, 3.67%), Microsoft Corp., Redmond, WA, USA (MSFT, 2.68%), and Facebook Inc., Menlo Park, CA, USA) Class A (FB, 1.87%).
We collected daily second-level QQQ ETF, SPY ETF, MSFT, and AAPL price time series for this study. The QQQ ETF price time series and SPY ETF price time series are used as the vector-based ETF price . The MSFT and AAPL stock price time series are used as the vector-based predictive variable . The collection period is the daily trading time from 9:30 a.m. to 4:00 p.m. (Eastern Time) to ensure a high liquid market. We divided QQQ ETF and SPY ETF time series into two data sets: vector-based ETF price training data (9:30 a.m. to 3:00 p.m., which contains 19,800 s) and vector-based ETF price test data (3:00 p.m. to 4:00 p.m., which contains 3601 s). We use the MSFT and AAPL price time series as the vector-based predictive variables’ training data (9:30 a.m. to 3:00 p.m., which contains 19,800 s). We set initial wealth and interest rate . Suppose that the investor’s risk tolerance is . We restrict , , , , and in , s in , and l in and 240. We use training data to choose model parameters with the highest return. We first report the MGMA strategy performance summary for QQQ ETF and SPY ETF on training data; then, we report the MGMA strategy evaluation summary for QQQ ETF and SPY ETF on test data. Our study spans five days from 10 February 2017 to 10 June 2017. We plot second-level QQQ ETF and SPY ETF price time series on day 1 (10 February 2017) in Figure 1 as an example.
Figure 1.
Case 1—Second-level QQQ ETF and SPY ETF prices time series on day 1 (10 February 2017).
The MGMA strategy performance summary for QQQ ETF and SPY ETF on day 1 (10 February 2017) to day 5 (10 June 2017); training data are provided in Table 8. The MGMA strategy evaluation summary for QQQ ETF and SPY ETF on day 1 (10 February 2017) to day 5 (10 June 2017) test data is provided in Table 9.
Table 8.
Case 1—MGMA strategy performance summary for QQQ ETF and SPY ETF on day 1 (10 February 2017) to day 5 (10 June 2017) training data.
Table 9.
Case 1—MGMA strategy evaluation summary for QQQ ETF and SPY ETF on day 1 (10 February 2017) to day 5 (10 June 2017) test data.
Note that the MGMA strategy in general can outperform the MA strategy for both backward investments in training data and forward investments in test data. For example, for day 1 (10 February 2017), the MGMA strategy can increase the daily return ratio from to on training data, which equals an increase in annual return ratio of ; the MGMA strategy can increase the daily return ratio from to on test data, which equals an increase in annual return ratio of .
The MGMA strategy performance summary for QQQ ETF and SPY ETF on day 1 (10 February 2017) to day 5 (10 June 2017); training data are provided in Figure 2. The MGMA strategy evaluation summary for QQQ ETF and SPY ETF on day 1 (10 February 2017) to day 5 (10 June 2017) test data is provided in Figure 3.
Figure 2.
Case 1—MGMA strategy performance summary plot for QQQ ETF and SPY ETF on day 1 (10 February 2017) to day 5 (10 June 2017) training data.
Figure 3.
Case 1—MGMA strategy evaluation summary plot for QQQ ETF and SPY ETF on day 1 (10 February 2017) to day 5 (10 June 2017) test data.
6.3. Case 2: MGMA Strategy on High-Frequency Exchange-Traded Fund in Asian Market
We use the China 50 ETF (HuaXia) and Huatai-Pinebridge CSI 300 ETF (HuaTai). These are exchange-traded funds incorporated in China. The China 50 ETF (HuaXia) tracks the performance of the Shanghai Stock Exchange 50 Index (the SSE 50 Index). The holdings are weighted by market capitalization. As of 22 March 2018, the top five holding companies are PingAn Insurance Group, Shenzhen, China (PingAn, 12.30%), China Merchants Bank Co Ltd., Shenzhen, China (CMB, 5.65%), Kweichow Moutai Co Ltd., Zunyi China (600519, 5.41%), Industrial Bank Co Ltd., Fuzhou, China(IndBank, 4.81%), and China Minsheng Banking Corp Ltd., Beijing, China (CMAKY, 4.45%). The Huatai-Pinebridge CSI 300 ETF (HuaTai) is a capitalization-weighted stock market index designed to replicate the performance of the top 300 stocks traded in the Shanghai and Shenzhen stock exchange. As of 22 March 2018, the top three holding companies are PingAn Insurance Group, Shenzhen, China (PingAn, 4.17%), China Merchants Bank Co Ltd., Shenzhen, China (CMB, 2.34%), and Industrial Bank Co Ltd., Fuzhou, China (IndBank, 2.34%).
We collected daily second-level HuaXia ETF, HuaTai ETF, PingAn and IndBank price time series for this study. The HuaXia ETF price time series and HuaTai ETF price time series are used as the vector-based ETF price . The PingAn and IndBank stock price time series are used as the vector-based predictive variable . The collection period is the daily trading time from 8:30 p.m. to 2:00 a.m. (Eastern Time) to ensure a highly liquid market. Note that there is a break time from 10:30 p.m. to 0:00 a.m. (Eastern Time) for the Asian Market. We divide the HuaXia ETF and HuaTai ETF time series into two data sets: vector-based ETF price training data (8:30 p.m. to 10:30 p.m. and 0:00 a.m. to 1:00 a.m., which contains 10,800 s) and vector-based ETF price test data (1:00 a.m. to 2:00 a.m., which contains 3601 s). We use the PingAn and IndBank price time series as vector-based predictive variable training data (8:30 p.m. to 10:30 p.m. and 0:00 a.m. to 1:00 a.m., which contains 10,800 s). We set initial wealth and interest rate . Suppose that the investor’s risk tolerance is . We restrict , , , , and in , s in , and l in and 240. We use training data to choose model parameters with the highest return. We first report the MGMA strategy performance summary for HuaXia ETF and HuaTai ETF on training data; then, we report the MGMA strategy evaluation summary for HuaXia ETF and HuaTai ETF on test data. Our study spans five days from 18 March 2018 to 22 March 2018. We plot the second-level HuaTai ETF and HuaXia ETF price time series on day 1 (18 March 2018) in Figure 4 as an example.
Figure 4.
Case 2—Second-level HuaXia ETF and HuaTai ETF prices time series on day 1 (18 March 2018).
The MGMA strategy performance summary for HuaXia ETF and HuaTai ETF on day 1 (18 March 2018) to day 5 (22 March 2018) training data is provided in Table 10. The MGMA strategy evaluation summary for HuaXia ETF and Huatai ETF on day 1 (18 March 2018) to day 5 (22 March 2018) test data is provided in Table 11.
Table 10.
Case 2—MGMA strategy performance summary for HuaXia ETF and HuaTai ETF on day 1 (18 March 2018) to day 5 (22 March 2018) training data.
Table 11.
Case 2—MGMA strategy evaluation summary for HuaXia ETF and HuaTai ETF on day 1 (18 March 2018) to day 5 (22 March 2018) test data.
Note that the MGMA strategy in general can outperform the MA strategy for both backward investments on training data and forward investment on test data. Note that the optimal short-lag s, long-lag l, and allocation parameters to are all the same for 5 days, which might suggest that it is possible to use fixed parameters for MGMA strategy in reality.
The MGMA strategy performance summary for HuaXia ETF and HuaTai ETF on day 1 (18 March 2018) to day 5 (22 March 2018) training data is provided in Figure 5. The MGMA strategy evaluation summary for HuaXia ETF and HuaTai ETF on day 1 (18 March 2018) to day 5 (22 March 2018) test data is provided in Figure 6.
Figure 5.
Case 2—MGMA strategy performance summary plot for HuaXia ETF and HuaTai ETF on day 1 (18 March 2018) to day 5 (22 March 2018) training data.
Figure 6.
Case 2—MGMA strategy evaluation summary plot for HuaXia ETF and HuaTai ETF on day 1 (18 March 2018) to day 5 (22 March 2018) test data.
7. Conclusions
In this paper, we propose a multiasset generalized moving average crossover (MGMA) strategy. Our study demonstrates that the MGMA strategy can provide more investment options with the investor’s risk tolerance. The MGMA strategy can solve the well-known problem for the MA strategy for a multiasset portfolio. Simulation studies demonstrate that the MGMA strategy can increase both the investor’s expected utility of wealth and the investor’s expected wealth. Two high-frequency ETF real-time examples from the North American market and Asian market demonstrate that the MGMA strategy can outperform the MA strategy for both backward investment on training data and forward investment on test data. The MGMA strategy has built the foundation for reconciling the moving average technique with the portfolio allocation strategy for multiple assets. In the future, we would like to extend the algorithm for adaptive or online prediction in order to go beyond the current reactionary nature. While this approach is proposed for optimizing asset allocation, it can also be used to create a general framework for analyzing the relative importance or impact of a particular repeated measured index in a multiple time series setting. It could have broad applications in climate change or healthcare.
Author Contributions
Conceptualization, Y.L., X.W. and Y.W.; methodology, Y.L., X.W. and Y.W.; software, Y.L.; validation, Y.L., X.W. and Y.W.; formal analysis, Y.L.; investigation, Y.L.; data curation, Y.L.; writing–original draft, Y.L.; writing–review and editing, X.W. and Y.W.; supervision, X.W. and Y.W. All authors have read and agreed to the published version of the manuscript.
Funding
This work is partially supported by the Natural Science and Engineering Research Council of Canada (RGPIN-2017-05720, RGPIN-2018-05981).
Data Availability Statement
Not applicable.
Conflicts of Interest
The authors declare no conflict of interest.
Appendix A
We provide the preliminary lemmas, which are used to derive the analytical results.
Lemma A1.
Let Θ be symmetric negative definite. If Θ and are exchangeable, i.e., , then Θ and , and , and are also exchangeable.
Proof.
Since is symmetric negative definite, by the definition of matrix exponential, it follows that
By the assumptions that and is symmetric negative definite, we obtain that , which implies that
Therefore, we have
□
Lemma A2.
Let be the vector of the predictive variables in the market satisfying (3), be the vector of expectation of , and be the variance–covariance matrix of . Then, is multivariate normal distributed and has the following expression
and
Proof.
Let be an identity matrix and . We have
which, jointly with Lemma A1, yields that
Therefore, we have
and
Since is a multidimensional standard Brownian motion, we obtain that is multivariate normal distributed. By the fact that , it follows that
As is a stationary process, we have , and hence obtain that . In view that , and are exchangeable, and is symmetric, by Lemma A1, the variance–covariance matrix is
where
which implies that
Since is a stationary process, it follows that , which, jointly with (A2), yields that . Moreover,
Note that
Since if , we have
Lemma A3.
Let be the vector of the log-transformed stock prices and be its expectation. Then, follows a multivariate normal distribution and has the following expression
whose mean vector is given by
Proof.
Note that is multidimensional standard Brownian motion. Thus, we obtain that
and hence
which, jointly with Lemma A2, yields that follows a multivariate normal distribution with the mean vector
□
Lemma A4.
Let be the vector of the moving average based on lookback period h and be the vector of the difference between the moving averages based on lookback period s and l. Then, follows a multivariate normal distribution with mean , and follows a multivariate normal distribution with mean , where
and
Proof.
Lemma A5.
Let and be a multidimensional standard Brownian motion. If , then
and
Proof.
Given that and are two-dimensional standard Brownian motions with correlation coefficient , we can express by , where and are independent. It follows that
which implies that
We also have
□
Lemma A6.
Let be the vector of predictive variables in the market and be multidimensional standard Brownian motion. Then, we have
Proof.
If , by Lemmas A2 and A5, we have
where is a multidimensional standard Brownian motion satisfying that . If , by Lemmas A2 and A5, it follows that
□
Lemma A7.
Let be the vector of predictive variables in the market and be the vector of log-transformed stock prices. Then, for , we have
Proof.
If , by Lemmas A2, A3 and A6, we have
□
Lemma A8.
Let be the vector of predictive variables in the market and be the vector of moving averages based on lookback period h. Then, we have
where
Proof.
By the definition of and Lemma A7, we have
where
□
Lemma A9.
Let be the vector of the predictive variables in the market and be the vector of the moving average difference based on lookback periods s and l . Then, we have
where
Proof.
By the definition of and Lemma A8, we have
where
□
By Lemma A9, is independent of time t.
Lemma A10.
Let be the vector of the log-transformed stock prices. Then, we have
where
Proof.
By Lemmas A2, A3 and A6, for , we have
Since
and
for , we obtain that
Let
Then, and are symmetric, , and and are all independent of time t. Therefore, for ,
Similarly, for , we can derive that
□
Lemma A11.
Let and be the vectors of the moving averages based on lookback periods s and l . Then, we have
where
and
Proof.
By the definitions of and , and Lemma A10, we have
Since
- (1).
- ,
- (2).
- ,
- (3).
- ,
- (4).
- ,
- (5).
- ,
- (6).
- ,
we have
which implies that
and
and
Therefore,
where
and
and
□
It is noted that is symmetric, , and are independent of , and t, is independent of t but is dependent on s and l, and J is dependent on , and t.
Lemma A12.
Let be the vector of the moving average difference based on lookback periods s and l . Then, is independent of time t, i.e.,
where
and
Proof.
By the definition of and Lemma A11, we have
in view of the fact that
□
Lemma A13.
Let be an n-dimensional standard Brownian motion and be a q-dimensional standard Brownian motion. Assume that and are independent. If there is a symmetric matrix Γ such that then are multidimensional standard Brownian motions and .
Proof.
Since and are independent standard Brownian motions with dimensions n and q, respectively, we have . Let . Then, we have
which implies that
and hence . In addition, we have
which implies that
and hence both and are standard Brownian motions. □
References
- Brock, W.; Lakonishok, J.; LeBaron, B. Simple technical trading rules and the stochastic properties of stock returns. J. Financ. 1992, 47, 1731–1764. [Google Scholar] [CrossRef]
- Lo, A.; MacKinlay, C. A Non-Random Walk Down Wall Street; Princeton University Press: Princeton, NJ, USA, 1999. [Google Scholar]
- Ang, A.; Bekaert, G. Stock return predictability: Is it there? Rev. Financ. Stud. 2006, 203, 651–707. [Google Scholar]
- Campbell, J.Y.; Thompson, S.B. Predicting the equity premium out of sample: Can anything beat the historic alaverage? Rev. Financ. Stud. 2008, 214, 1509–1531. [Google Scholar] [CrossRef]
- Ito, A. Profits on technical trading rules and time-varying expected returns: Evidence from pacific-basin equity markets. Pac.-Basin Financ. J. 1999, 73-4, 282–330. [Google Scholar] [CrossRef]
- Gunasekarage, A.; Power, D.M. The profitability of moving average trading rules in south asian stock markets. Emerg. Mark. Rev. 2001, 21, 17–33. [Google Scholar] [CrossRef]
- Chang, E.J.; Lima, E.J.A.; Tabak, B.M. Testing for predictability in emerging equity markets. Emerg. Mark. Rev. 2004, 53, 295–316. [Google Scholar] [CrossRef]
- Tabak, B.M.; Lima, E.J.A. Market efficiency of brazilian exchange rate: Evidence from variance ratio statistics and technical trading rules. Eur. J. Oper. Res. 2009, 1943, 814–820. [Google Scholar] [CrossRef]
- Mohr, E.; Schmidt, G.; Jansen, S. A comparative study of heuristic conversion algorithms, genetic programming and return predictability on the german market. EVOLVE-Bridge Probab. 2013, 447, 393–414. [Google Scholar]
- Cespa, G.; Vives, X. Dynamic trading and asset prices: Keynes vs. Hayek. Rev. Econ. Stud. 2012, 79, 539–580. [Google Scholar] [CrossRef]
- Neely, A.; Gregory, M.; Platts, K. Performance measurement system design. Int. J. Oper. Prod. Manag. 2014, 2512, 1228–1263. [Google Scholar] [CrossRef]
- Lin, Q. Technical analysis and stock return predictability: An aligned approach. J. Financ. 2018, 38, 103–123. [Google Scholar] [CrossRef]
- Ma, C.; Wen, D.; Wang, G.-J.; Jiang, Y. Further mining the predictability of moving averages: Evidence from the US stock market. Int. Rev. Financ. 2019, 19, 413–433. [Google Scholar] [CrossRef]
- Wang, Y.; Liu, L.; Wu, C. Forecasting commodity prices out-of-sample: Can technical indicators help? Int. J. Forecast. 2020, 36, 666–683. [Google Scholar] [CrossRef]
- Wen, D.; Liu, L.; Wang, Y.D.; Zhang, Y.J. Forecasting crude oil market returns: Enhanced moving average technical indicators. Resour. Policy 2022, 76, 102570. [Google Scholar] [CrossRef]
- Zhu, Y.Z.; Zhou, G.F. Technical analysis: An asset allocation perspective on the use of moving averages. J. Financ. Econ. 2009, 92, 519–544. [Google Scholar] [CrossRef]
- Detzel, A.; Liu, H.; Strauss, J.; Zhou, G.; Zhu, Y. Learning and predictability via technical analysis: Evidence from bitcoin and stocks with hard-to-value fundamentals. Financ. Manag. 2021, 50, 107–137. [Google Scholar] [CrossRef]
- Han, Y.; Zhou, G.; Zhu, Y. A trend factor: Any economic gains from using information over investment horizons? J. Financ. Econ. 2016, 122, 352–375. [Google Scholar] [CrossRef]
- Avramov, D.; Kaplanski, G.; Subrahmanyam, A. Moving average distance as a predictor of equity returns. Rev. Financ. Econ. 2021, 39, 127–145. [Google Scholar] [CrossRef]
- Hung, C.Y.; Hung, N.L. Information asymmetry and the profitability of technical analysis. J. Bank. Financ. 2022, 134, 106347. [Google Scholar] [CrossRef]
- Buraschi, A.; Porchia, P.; Trojani, F. Correlation risk and optimal portfolio choice. J. Financ. 2010, 65, 393–420. [Google Scholar] [CrossRef]
- Chiu, M.C.; Wong, H.Y. Mean-variance portfolio selection with correlation risk. J. Comput. Appl. Math. 2014, 263, 432–444. [Google Scholar] [CrossRef]
- Lioui, A.; Poncet, P. Understanding dynamic mean variance asset allocaiton. Eur. J. Oper. Res. 2016, 254, 320–337. [Google Scholar] [CrossRef]
- Legendre, F.; Togola, D. Explicit solutions to dynamic portfolio choice problems: A continuous-time detour. Econ. Model. 2016, 58, 627–641. [Google Scholar] [CrossRef]
- Wu, H.; Ma, C.Q.; Yue, S.J. Momentum in strategic asset allocation. Int. Rev. Econ. Financ. 2017, 47, 115–127. [Google Scholar] [CrossRef]
- Silva, A.; Neves, R.; Horta, N. A hybrid approach to portfolio composition based on fundamental and technical indicators. Expert Syst. Appl. 2015, 42, 2036–2048. [Google Scholar] [CrossRef]
- Macedo, L.L.; Godinho, P.; Alves, M.J. Mean-semivariance portfolio optimization with multiobjective evolutionary algorithms and technical analysis rules. Expert Syst. Appl. 2017, 79, 33–43. [Google Scholar] [CrossRef]
- Santos, A.; Hudson, S.T. Markowitz meets technical analysis: Building optimal portfolios by exploiting information in trend-following signals. Financ. Res. Lett. 2022, 49, 103063. [Google Scholar] [CrossRef]
- Pinelis, M.; Ruppert, D. Machine learning portfolio allocation. J. Financ. Data Sci. 2022, 8, 35–54. [Google Scholar] [CrossRef]
- Al Janabi, M.A.M. Optimization algorithms and investment portfolio analytics with machine learning techniques under time-varying liquidity constraints. J. Model. Manag. 2021, 17, 864–895. [Google Scholar]
- Chen, W.; Zhang, H.Y.; Jia, L.F. A novel two-stage method for well-diversified portfolio construction based on stock return prediction using machine learning. Morth Am. J. Econ. Financ. 2022, 63, 101818. [Google Scholar] [CrossRef]
- Zhu, X.; Zhang, H.; Zhong, M. Volatility forecasting using high-frequency data: The role of after-hours information and leverage effects. Resour. Policy 2017, 54, 58–70. [Google Scholar] [CrossRef]
- Zhang, Y.; Wang, J.-L. Do high-frequency stock market data help forecast crude oil prices? Evidence from the MIDAS models. Energy Econ. 2019, 78, 192–201. [Google Scholar] [CrossRef]
- Huang, L.; Liu, H. Rational in attention and portfolio selection. J. Financ. 2007, 62, 1999–2040. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).