Application of GARCH and mean-variance model in the U.S. financial market

. How to obtain a high return and face the low-risk investment is a hot topic widely discussed among investors. However, the specific method of targeting the optimal portfolio requires sophisticated mathematical computations. By research, some scholars found that the theory of portfolio helps investors to get a higher return and reduce investment risk. Thus, the aim of this paper is to collect and optimize a selected portfolio—Apple, Google, Netflix, Tesla, and Walmart—by GARCH model and Sharpe ratio, based on the mean returns and correlation matrix, among which Google and Apple are strongly positively correlated to each other, while Walmart, Tesla, and Netflix are weakly positively correlated. The price return of GARCH volatility of each equity shows the stock returns will go down in the next 7 days. We compare the optimal portfolio with NASDAQ composite to find the superiority of our model.


Introduction
Asset allocation-the process of distributing investment capital across the various asset classes in an allowable universe-is widely regarded as one of the most important decisions an investor face. The evolution of asset allocation starts in the middle of twentieth Century. According to "Markovitz's 'Portfolio Selection': a Fifty-Year Retrospective," in 1952, Harry Markowitz, an American Economist, developed a theory called Portfolio Selection Theory on the Journal of Finance [1]. This theory says that investing in a portfolio, i.e., investing in more than one asset simultaneously, can reduce the risk compared to investing in only one asset. He supposed that investors are to be riskaverse; hence he/she wants high returns and small risk. Markowitz used variance of return as the measurement of risk and mean of return as the measurement of expected return [2].
Since the very beginning of portfolio selection theory, numerous researchers are involved with the interesting issue, which has recently become a hot topic in a global level. As Zhang provides a reference to several variance models substantially improve the performance of Markowitz's portfolio selection theory in order to help researchers focus on portfolio selection studies and find useful tools [3]. Sanjib adopts an ensemble approach to forecast the performance of mutual funds based on riskreturn measures [4]. Similarly, Bilian Chen uses a new hybrid approach to solve the portfolio selection problem with skewness and kurtosis [5]. Additionally, Dixit formulates and compares three portfolios of risk-neutral, risk-averse, and combined compromised, in order to help decision makers to choose portfolios in aspect of their risk preferences [6]. In order to research that whether the portfolio selection can return in a higher return, we aim to forecast the returns of a selected portfolio-the dataset of five equities (Apple, Google, Netflix, Tesla, and Walmart) from Yahoo Finance-and analysis the mean returns and correlation matrix of these stocks based on time series modeling. Then, we use the GARCH model and Sharpe ratio to optimize the portfolio and compare our portfolio with NASDAQ composite index. The results show that investing in the portfolio leads to a higher return than NASDAQ.

Data
This study uses the dataset from Yahoo Finance(https://finance.yahoo.com/) for 5 equities, APPLE (symbol-AAPL), GOOGLE (symbol-GOOG), NETFLIX (symbol-NFLX), TESLA (symbol-TSLA), and WALMART (symbol-WMT). Time period of our study is from May 22, 2017, to May 17, 2022. These five companies hold some of the most valuable brands in the world today and their stocks are representative. The stock prices of these five stocks are relatively stable, and the number of buyers is large. These characteristics are applicable to this study. Based on historical data, the Annualized mean returns of the stocks are given as follows in Table 1. The ADF test shows the data is stationary at 99% confidence interval. The results have been calculated as follows in Table 2. T-test H0: AAPL is not stationary -7.8102*** H0: GOOGL is not stationary -8.1635*** H0: NFLX is not stationary -36.8175*** H0: TSLA is not stationary -6.2753*** H0: WMT is not stationary -11.0716*** For portfolio allocation and risk management, the approach of assessing dependency between many variables is crucial. Pearson's correlation coefficient, which is based on the multivariate Gaussian distribution, has been the standard way of evaluating dependency for many years.
Fangfang. Research on power load forecasting based on Improved BP neural network. Harbin Institute of Technology, 2011.

Correlation Matrix
Correlation, in the finance and investment industries, is a statistic that measures the degree to which two securities move in relation to each other. Correlations are used in advanced portfolio management, computed as the correlation coefficient. The correlation between stocks have been calculated as follows in Table 3. All the stocks show positive correlation with each other. Google and Apple are strongly positively correlated to each other, while Walmart, Tesla, and Netflix are weakly positively correlated.

Covariance Matrix
Covariance measures the directional relationship between the returns on two assets. A positive covariance means that returns of the two assets move together while a negative covariance means they move inversely. Risk and volatility can be reduced in a portfolio by pairing assets that have a negative covariance. The covariance matrix for our stocks is given below. There is small positive covariance between stocks.

Methodology
However, financial time series do not meet the premise of normality, as Mandelbrot [7] and Fama [8] pointed out. It took another thirty years for Embrechts, McNeil, and Straumann [9] to establish that Pearson's correlation coefficient is insufficient to describe the dependency between variables that do not belong to the elliptical distribution family. Furthermore, as Hamao, Masulis, have pointed out, the reliance on financial time series evolves throughout time [10].
Considering all above facts, it is clear that new approaches were required to overcome the limitations of Person's correlation coefficient. Such an effort was made with GARCH models. The Generalized Auto-Regressive Conditional Heteroskedasticity (GARCH), a statistical model used in analyzing time series data, is able to autocorrelated the variance error by assuming that it follows an autoregressive moving average process. The primary goal of this model class is to investigate comovements between several assets using conditional covariance or conditional correlation matrix modeling and to forecast the expected returns. GARCH model is a customized regression model for analyzing financial data, especially suitable for volatility analysis and regression prediction. For volatility modelling for prediction, Generalized Autoregressive Conditional Heteroscedasticity (GARCH) processes are used. In general, GARCH (p1, q1) model is given by: ω is mean reversion, αk is persistence, βk is innovation

Forecasting of Apple
Now modelled the training data with GARCH (2,2) and it is seen that AR and MA components at lag were insignificant so, again modelled with GARCH (1,1) with normal distributions.
Here are all the coefficients: μ is the constant mean term, is the mean reversion term, α1 is the persistence at lag 1, β1 is the innovation at lag 1, all are significant. The GARCH result is given as follows in Table 4: For μ, the coefficient is 0.2076, the standard error is 0.0484. For , the coefficient is 0.1751, the standard error is 0.0531. For α1, the coefficient is 0.1381, the standard error is 0.0281. For β1, the coefficient is 0.8198, the standard error is 0.0310. Also, α +β< 1 so we can say that series is stationary and there is long run persistence.
The following figure is the price returns with GARCH Volatility based on training and testing data. It is clear that this model predicts the volatility of this stock very precisely, so this model is quite suitable for future prediction based on historical data. The prediction figure is given below. The prediction says that the stock returns will go down slowly in upcoming 7 days.

Forecasting of Google
Now modelled the training data with GARCH (2,2) and it is seen that AR and MA components at lag were insignificant so, again modelled with GARCH (1,1) with normal distributions.
Here are all the coefficients: μ is the constant mean term, is the mean reversion term, α1 is the persistence at lag 1, β1 the is innovation at lag 1, all are significant. The GARCH result is given as follows in Table 5: For μ, the coefficient is 0.1243, the standard error is 0.0481. For , the coefficient is 0.1890, the standard error is 0.1320. For α1, the coefficient is 0.0861, the standard error is 0.0336. For β1, the coefficient is 0.8526, the standard error is 0.0692. Also, α +β< 1 so we can say that series is stationary and there is long run persistence.
The following figure is the price returns with GARCH Volatility based on training and testing data. It is clear that this model predicts the volatility of this stock very precisely, so this model is quite suitable for future prediction based on historical data.

Figure 3: Price Return with GARCH Volatility for Google
The prediction figure is given below. The prediction says that the stock returns will go down slowly in upcoming 7 days.

Forecasting of Netflix
Now modelled the data with GARCH (1,1) with normal distributions that is found to be significant at lag 1. Here are all the coefficients: μ is the constant mean term, is the mean reversion term, α1 is the persistence at lag 1, β1 is the innovation at lag 1, all are significant. The GARCH result is given as follows in Table 6: For μ, the coefficient is 0.1482, the standard error is 0.0705. For , the coefficient is 0.0864, the standard error is 0.1010. For α1, the coefficient is 0.0259, the standard error is 0.0068. For β1, the coefficient is 0.9666, the standard error is 0.0146. Also, α +β< 1 so we can say that series is stationary and there is long run persistence.
The following figure is the price returns with GARCH Volatility based on training and testing data. It is clear that this model predicts the volatility of this stock very precisely, so this model is quite suitable for future prediction based on historical data.

Figure 5: Price Return with GARCH Volatility for Netflix
The prediction figure is given below. The prediction says that the stock returns will go down slowly in upcoming 7 days.

Forecasting of Tesla
Now modelled the training data with GARCH with different combinations of lags and it is seen that AR and MA components at lag were insignificant so, again modelled with GARCH (2,0) with normal distributions.
Here are all the coefficients: μ is the constant mean term, is the mean reversion term, α1 is the persistence at lag 1, α2 is the persistence at lag 2, all are significant. The GARCH result is given as follows in Table 7: For μ, the coefficient is 0.2985, the standard error is 0.1040. For , the coefficient is 10.6070, the standard error is 1.1460. For α1, the coefficient is 0.1309, the standard error is 0.0420. For α2, the coefficient is 0.2011, the standard error is 0.0707.
The following figure is the price returns with GARCH Volatility based on training and testing data. It is clear that this model predicts the volatility of this stock very precisely, so this model is quite suitable for future prediction based on historical data.

Figure 7: Price Return with GARCH Volatility for Tesla
The prediction figure is given below. The prediction says that the stock returns will go down slowly in upcoming 7 days.

Forecasting of Walmart
Now modelled the training data with GARCH with different combinations of lags and it is seen that AR and MA components at lag were insignificant so, again modelled with GARCH (1,0) with normal distributions.
Here are all the coefficients: μ is the constant mean term, is the mean reversion term, α1 is the persistence at lag 1, all are significant. The GARCH result is given as follows in Table 8: For μ, the coefficient is 0.0884, the standard error is 0.0537. For , the coefficient is 1.3556, the standard error is 0.2410. For α1, the coefficient is 0.4042, the standard error is 0.1870.
The following figure is the price returns with GARCH Volatility based on training and testing data. It is clear that this model predicts the volatility of this stock very precisely, so this model is quite suitable for future prediction based on historical data. The prediction figure is given below. The prediction says that the stock returns will go down slowly in upcoming 7 days.

Portfolio Optimization
Portfolio optimization is the process of selecting the most efficient portfolio. Consider a portfolio P of N risky assets, the T period simple return of portfolio P at time t is given by: Where wi is the weights of assets and Ri,t is the return of ith asset. There is no short selling of assets. The variance of portfolio P is expressed as: Now, the risk of portfolio can be calculated using expected return of portfolio r*, the efficient weights w* variance-covariance matrix, it is given as: Assuming risk free interest rate = 0, Now optimize the portfolio on the basis of mean and variance portfolio and again with Sharpe ratio. First, calculate the weights of assets for each one. Second, calculate the expected returns, minimum variance portfolio, optimal risky portfolio, and efficient frontier. For more efficiency of our portfolio, create the 10000 portfolios. The risks, returns and weights corresponding to the respected stocks for the 10,000 portfolios are based on Monte Carlo simulations. And the efficient frontier is also given as: Figure 11. Efficient Frontier

Optimal minimum variance portfolio
The annualized risk, return, and portfolio weights are tabulated as: For optimal minimum variance portfolio, returns are 16.93% and volatility is 20.12%. In this portfolio, the largest share is invested in WMT. In order to pursue the optimal minimum variance portfolio, maximum risk aversion is required. We guess that WMT was chosen because its stock is relatively less volatile and can minimize risk, so a relatively large investment was made in WMT stock. The efficient frontier is given as:

Maximum Sharpe ratio portfolio
The annualized risk, return, and portfolio weights are tabulated as: For maximum Sharpe ratio portfolio, returns are 102.07% and volatility is 50.31%. In contrast to the optimal minimum variance portfolio, this portfolio has a significantly higher investment in APPL.
For the maximum Sharpe ratio portfolio, the pursuit of high returns also implies high risk. Because of the high volatility of APPL's stocks, we guess that investing in APPL can enjoy high returns while taking high risks. The efficient frontier is given as:  For Day 101 to 150, the mean NASDAQ returns is 33.38%. The mean portfolio return is 52.86%. For Day 0 to 100, the mean NASDAQ returns is 21.36%. The mean portfolio return is 48.96%. NASDAQ returns for both said period are lower than portfolio returns. So, investing in the portfolio may return in higher returns than NASDAQ.

Conclusions
The whole discussion is about the investment strategy that an organization or individual attempts to achieve so that it can maximize its wealth. This study uses the dataset from Yahoo Finance(https://finance.yahoo.com/) for 5 equities, APPLE (symbol-AAPL), GOOGLE (symbol-GOOG), NETFLIX (symbol-NFLX), TESLA (symbol-TSLA), and WALMART (symbol-WMT). Time period of our study was from May 22, 2017, to May 17, 2022. The forecasting of various stocks such as Apple, google, Netflix, Tesla and Walmart were done. The study revealed the future of stock prices of all the above listed stocks which in return will help the investors to park their excess funds at a suitable place. In second half, rather than focusing on one single stock, the investor may choose to invest in variety of stocks and maintain a portfolio and hence the discussion talks about portfolio optimization. For portfolio optimization, the study of co-relation between various stocks is done to find the collective estimated return investors can gain while investing. The whole discussion is supported by various ratios like Sharpe, Treynor's and then at the end deciding the best portfolio a company can achieve along with calculation of standard deviations from average mean return. Hence the whole discussion discusses about portfolio return and its importance along with individual returns.