Portfolio construction based on MACD and Beta coefficient

. Stock portfolio refers to a method that investors choose and match stocks according to certain laws and principles according to the risk degree and profitability of various stocks, so as to reduce investment risk, which is usually considered as the effective way in the stock market. This paper assesses portfolio construction based on moving average convergence divergence (MACD) and beta coefficient. We classify stock groups by beta coefficient and then use the MACD method to simulate the average return to find whether there is any variation in average return between groups. Moreover, we discuss the hedged circumstance by S&P 500 index. Then we compare the average return and Sharpe ratio among the selected groups in both hedged and unhedged conditions. The results show that the stocks with a lower beta coefficient boost a relatively higher average return. The empirical results in this paper will provide a method of balancing risk and average returns with the considerations of beta coefficient, and it will benefit related investors in financial markets.


Introduction
How to construct a portfolio is a permanent topic in the financial market. The appearance of the Markowitz model in 1952 represents the foundation of modern portfolio theory as it shows how riskaverse investors should create portfolio constructions. Generally speaking, stock investment management is an important part of asset management. The goal of stock portfolio management is to maximize utility, even if the risk and return characteristics of stock portfolio can bring maximum satisfaction to investors. Therefore, there are two reasons for constructing stock portfolio: one is to reduce the risk of securities investment; The second is to maximize the return on securities investment. The portfolio management is an investment management concept different from individual asset management. Portfolio management theory was first systematically put forward in 1952. At present, about one-third of investment managers in western countries use quantitative methods for portfolio management. Building a portfolio and analyzing its characteristics is the basic activity of professional portfolio managers. In the process of building portfolio, it is necessary to minimize the adverse impact caused by a small number of securities through the diversification of securities.
Stock portfolio has become a popular topic for many scholars and people in the financial fields. Pojarliev and Polasek [1] processed the portfolio construction with quantitative strategies, which depends crucially on the ability of time series models to forecast variances and covariances. David, Colin, and Stephen [2] considered the volatility clusters and asymmetric dependence in model construction. Portfolio construction is a classic but vital financial issue. A portfolio can be constructed by the asset pool and can be influenced by different weights of assets. Even a small change may lead to a huge variation of portfolio returns. Thus, the process of constructing a portfolio should be strictly operated. Different investors may have different motives for constructing a specific portfolio, while a rational investor may pursue a portfolio with a higher return and lower risk. Thus, numerous portfolio construction methods are proposed. Additionally, many experts gave the different ways to construct a portfolio. Shefrin, Hersh, and Statman [3] developed a portfolio theory indicating several implications for portfolio construction and security design. Cullen [4] suggested a comprehensive theory for modern portfolio construction grounded in several concepts and construct foundations for understanding the portfolio. Lambert, Fays, Hübner [5] stated the importance of (in) dependence, the symmetry of the stock sorting procedure, and the sorting breakpoints in portfolio diversification. Mishra and Padhy [6] found out a construction method of using stock price predicted by support vector regression. Nowadays, the financial market situation seems to be more complicated than ever before since more uncertainties that have not been considered in the past would appear in the modern financial market. With the development of financial technologies, moving average convergence divergence (MACD) and Beta appear methods in financial portfolio construction. For example, Anghel [7] used MACD to prove the stock market efficiency of 75 countries worldwide with 1336 companies selected and concluded that MACD is an optimal trading strategy to a certain degree. Ayala, Garcí a-Torres et al. [8] processed a machine prediction in stock price based on MACD. However, combining the MACD and Beta lacks related empirical investigations, which raises our great interests. To the best of our knowledge, this paper makes the following contributions to the literature.
First, we combine the MACD and beta analysis. Specifically, we construct three portfolio groups by the risk level, which is defined by the value from the BETA analysis. Then, MACD analysis and signal lines are drawn separately for each group, aiming to find the moment for buy or sell.
Second, we construct hedged groups and check whether the difference exists between these groups. The results show no obvious difference for the high-risk group in average return rate between the hedged and the unhedged. The Middle-risk group has a similar result as the high-risk group as well. However, the low-risk unhedged group obtains a significantly higher average return than the hedged one.
This paper is organized as follows. Section 2 shows the data used in this paper. Section 3 describes the methods. Section 4 shows the related empirical results, and Section 5 concludes the paper.

Data
In this paper, we collect the required S&P 500 data from Wikipedia and yahoo. The screening period ranged from 1st January 2000 to 31st December 2016.
Coefficient β is a risk index used to measure the price fluctuation of individual stocks or stock funds relative to the whole stock market, which measures the non-dispersible risk associated with an investment. As for the financial market, β is a effective tool to evaluate the systematic risk of securities. It is often used to measure the volatility of a securities or an investment portfolio relative to the overall market. For a stock, it indicates how sensitive the earnings of a stock will be to changes in the earnings of all current stocks. The beta value of a stock indicates how sensitive the portfolio is to systemic risk. For example, the Beta value of 1 indicates that the stock price changes by the same percentage when the index changes. Therefore, stocks are equally divided into three groups based on their beta value, which are respectively high beta, medium beta, and low beta groups, corresponding to low, medium, and high-risk groups. According to the high beta group, there are five stocks:  Such grouping can better obtain the relationship between average return and beta coefficient discussed in this paper. After grouping, this relationship can be converted into the relationship between stock portfolios in groups with different beta values and corresponding returns, which simplifies the issues discussed. It only needs to calculate the slow moving average, fast moving average, MACD, and trading signals of different groups. In addition, it will use the above indicators to obtain the yield.

Method
It is generally believed that MACD index is the most classic technical index among all technical indexes. By correctly using this index, many investors can basically achieve better trading results by combining methodology, individual stock trend, volume, market trend, bad and good news, etc. Also, MACD model could be used to calculate the profit and loss (PnL) and predict future trends. Kwon and Moon [9] claimed that MACD could be thought of as an efficient method to trade futures contracts, including stocks. Dunis Laws and Sermpinis [10] predicted the foreign exchange index by the MACD method and affirmed the efficiency of MACD in stock derivatives. Hence, we consider MACD a suitable method in this analysis as well. Moving average convergence divergence (MACD) is a trend-following momentum indicator that shows the relationship between two moving averages of a security's price. In this paper, MACD is of interest. The related process for MACD can be summarized in two steps. The first step is to get the EMA, while the second step is to achieve the MACD.
Step 1. Assume a fixed amount of capital to buy the portfolios (groups classified as above) at the beginning as day x, where x equals 0. Then calculate the EMA and MACD.
where EMA x is the result for the exponential moving average on day x. x refers to the current closing price per share on day x. σ is the coefficient determined by the number of observations.
Step 2. In this paper, 12 and 26 are used as the number of observations to match EMA.

MACD x = Fast Averages (EMA) − Slow Averages (EMA)
Then to calculate the trading signal line.
Where x is the signal line on the day x and x is the current closing price per share on the day x.
Step 3. To verify the trading signal, we use the difference between the current signal line and the current MACD status, where D x is the difference on the day x, S x is the signal line on the day x. It is called a trading chance with the premise of D x = 0, then buy the selected stocks and sell the index on the day x if D x−1 < 0;or sell the selected stocks and buy the selected on the day x if D x−1 > 0. With the trades above, we would gain the profit or loss (PnL) during the periods if we already held the stocks.
PnL x is the profit and loss on the day x where PC x is closing price on the day x, PO x is opening price on the day x. Avg.return is the average return of portfolio and Vi is the initial value. To further compare different classification, we calculate the sharpe ratio, Sharpe Ratio = Avg. return − Rf σp (8) where Avg. return is Average return of portfolio, Rf is the Risk-free rate, while σp refers to the Standard deviation of the portfolio return.
Then we can have the results of each group.

Empirical Results
Standard deviation (Stdv) is to evaluate the fluctuation of the share price, the smaller standard deviation the stock has, the less fluctuation it obtains, but it is not an integral or a necessary aspect in this analysis. Stdv here is for the calculation in sharpe ratio only. After processing all the selected groups, we have the results in the following Table 2. These are our three-group results with an unhedged portfolio including PnL, average rate of return, standard deviation, and Sharpe ratio. As shown in Table 2, the result is very interesting. It is not that high risk corresponds to high return in the traditional cognition, but that the return of risk is the smallest. Low risk is the best in terms of income and sharp ratio. In addition, it can find that the lowrisk group generates the highest average return 4.52% and the sharpe ratio 62.97%, while middle-risk group obtain the lowest average return 0.92% and the sharpe ratio 32.14%. The average return of low-risk group boost more than almost 5 times as the figure of middle-risk group. It is reasonable because when we short the index, the middle risk group will have lower volatility. High-risk group has a 2.66% average return and a 44.59% sharpe ratio, which are both between the other two groups.
To neutralize market risk, we also construct hedged portfolios. As the assumption above, we allocate the same capital amount as the unhedged to construct the hedged portfolio. So, for each group, our hedged portfolio is equal to the unhedged portfolio minus S&P500 index. Next, we apply the same methodology as an unhedged portfolio to construct MACD and use it as trading signals to calculate profits and losses. We show particular interests in whether PnL and return are affected by the hedge position? And to what extent does it affect? we use the sharpe ratio to evaluate the average return in excess of the risk-free rate. We calculate related characteristics for the hedged portfolio, and the related results are shown in the following Table 3. These are our three-group results with a hedged portfolio including P&L, average rate of return, standard deviation, and Sharpe ratio. Compared with Table 2, it is found that in the results of Table3, the return of low-risk portfolio is reduced, and the sharp ratio is consistent with that of high-risk portfolio. It is worth noting that this is closely related to the choice of stocks. For average return, it is surprising to see that the high-risk group with larger beta generates higher average return 2.51% when it is hedged. The middle-risk group 69.25% obtain the greatest sharpe ratio in when hedged. Both charts give us the same result that the middle risk group, which beta is much closer to 1, obtain a lower profit 0.92% and 1.06% respectively. For sharpe ratio, it can be easily found that the high-risk 60.46% and the middle-risk 69.25% groups are considerably greater than the corresponding unhedged groups 44.59% and 32.14% respectively while the low-risk 60.39% is unnoticeable smaller than the corresponding unhedged group 62.97%. Overall, the low-risk unhedged group gains the highest average return rate and the middle-risk hedged group gains the highest sharpe ratio.

Conclusion
As mentioned above, MACD can be used as the basis for studying and judging the medium-term trend of stock price. It is a trend index with more research value than the moving average. In addition, MACD can study and judge the turning point and formation of the trend through the change of the fast and slow line and the relationship with the past body. MACD can be used as an independent operation index in the technical analysis tool. Therefore, this paper shows a way to discuss the relation between average return and beta coefficient by MACD trading strategy. First, we classify stocks by beta coefficient into three groups, which are low-risk group, five stocks with lowest figures in beta coefficient; middle-risk group, five stocks with median beta coefficient and high-risk group with the five greatest beta coefficients. Second, we calculate the slow EMA, fast EMA, MACD and trading signal. Then we can find the average return by using above elements. Third, we calculate sharpe ratio and compare all the aspects among three groups. Finally, we also consider the hedged condition to compare with the unhedged condition. Eventually we have all the comparisons among the groups in average return and sharpe ratio. According to our result, we conclude that the stocks whose beta are closer to 1 might have lower average return than others when using MACD trading strategy. Moreover, those stocks whose beta coefficient are closer to 1 obtain considerably lower level in sharpe ratio than other stocks in an unhedged portfolio. However, their sharpe ratio can significantly increase to a considerably higher level if portfolio is hedged. Additionally, those stocks who have lower beta coefficient have a relatively greater level in sharpe ratio and average return in both unhedged and hedged conditions. The results do not show that those stocks with great beta coefficient have apparent variations in average return between unhedged and hedged, but they may obtain a higher level in sharpe ratio in hedged condition. Investors could find relevant information from the results as help to construct portfolio in financial market.
However, some limitations of this analysis should be noted. The first is the fact that the limits in sample size. This analysis uses the stocks of S&P 500, while this model might be not accurate and efficient in other stock indexes. The second is that the limits in trading strategy. Only MACD trading strategy is adopted in this analysis, while other trading strategies may lead to a slightly difference. All these limitations need to be addressed by the further research study.