Research on stock historical data based on Markowitz Model and Index Model

: Because of the coexistence of return and risk, how to establish an optimal portfolio to maximize benefits and minimize risks has always been a problem for many investors. However, the existing literature rarely uses different venture capital portfolio models to compare and analyze the same group of stocks, to get which model is more conducive to investors' decision-making analysis. This paper explores the optimal portfolio of the stock portfolio under 5 constraints by using Index Model and Markowitz Model. The key finding taken from our results are as follows: Markowitz Model shows that the return of the optimal portfolio is 7.51% under the minimum variance of constraints 1, 2, and 3 separately, which is higher than the 7.15% from Index Model. In these cases, the sharp ratio from Markowitz Model is 68.54%, while Index Model shows 74.23%. Meanwhile, under the maximum sharp of constraints 1, 2, and 3, we get the returns are 14.01%, 16.56%, and 16.99% in Markowitz Model, correspondingly 12.07%, 12.87%, and 12.87% in Index Model. For Constraints 4 and 5, on the one hand, we get the returns from Markowitz Model always higher than the returns from Index Model. On the other hand, the sharp ratio calculated by Markowitz Model is lower than Index Models. By comparing the results, it is concluded that the Markowitz model is more applicable.


Introduction
A portfolio is a collection of stocks, bonds, and derivatives held by investors or financial institutions to diversify risk. Aggarwal, Kearney, and Lucey clarify the role of culture and extend the set of cultural variables that have been investigated in gravity models of foreign portfolio investment (FPI) by using panel regression estimates from the IMF's CPIS survey of foreign debt and equity portfolios across 174 originating and 50 destination countries from 2001 to 2007 [1]. Venturelli and Kondratyev start from real financial data statistics and following the principles of the Modern Portfolio Theory, we generate parametrized samples of portfolio optimization problems that can be related to quadratic binary optimization forms programmable in the analog D-Wave Quantum Annealer 2000QTM [2]. Prabheesh, Padhan, and Garg examine the causality relation between stock returns and foreign portfolio (FPI) flows in the Indian context during the COVID-19 pandemic [3].
Single-index modeling is widely applied in econometric studies. Hristache, Juditsky, and Spokoiny consist of such iterative improvements of the original ADE [4]. McAleer and Da Veiga evaluate the performance of the single index and portfolio models in forecasting value-at-risk (VaR) thresholds of a portfolio [5]. Mandal takes BSE SENSEX as market performance index and considers daily indices along with the daily prices of sampled securities for the period of April 2001 to March 2011, the proposed method formulates a unique cut-off rate and selects those securities to construct an optimal portfolio [6].
Sharpe describes the advantages of using a particular model of the relationships among securities for practical applications of the Markowitz model [7]. Soleimani, Golmakani, and Salimi consider market sector capitalization which is proposed in this research for the first time as a constraint for the Markowitz model [8]. Mangram presents a simplified perspective of Markowitz's contributions to Modern Portfolio Theory, foregoing an in-depth presentation of the complex mathematical/statistical models typically associated with discussions of this theory [9]. Gasser, Rammerstorfer, and Weinmayer revisit Markowitz's Portfolio Selection Theory and propose a modification allowing to incorporate not only asset-specific return and risk but also a social responsibility measure into the investment decision-making process [10].
In this article, we use the daily rate of return of 20 enterprises for 20 years as the basic data, and then calculate all proper optimization inputs for the full Index Model, alongside the Markowitz Model. Using these optimization inputs for MM and IM to find the regions of permissible portfolios (efficient frontier, minimal risk portfolio, optimal portfolio, and minimal return portfolios frontier) for the 5 additional constraints. By comparison, we get the conclusion that the Markowitz model can help investors make decisions more effectively.
The remainder of the paper is organized as follows: Section 2 describes the data collection, business information, and correlation table; Section 3 performs the two methods about Index model and Markowitz model; Section 4 shows the analysis results of the article; Section 5 Summarize the article, highlight the conclusions and research findings, and reflect on the shortcomings.

Data Collection
The article collected a recent 20 years of historical daily total return for ten stocks, which belong in four different sectors including Technology, Financial Services, Consumer Defensive and Healthcare (according to Yahoo! Finance). We use the Fed Funds Rate (FEDL01) index as a replica of the riskfree or T. Bills rate. By aggregating these daily data to the monthly observations, further calculate proper optimization inputs data.

Business Information
NVIDIA Corporation is an American multinational technology company incorporated in Delaware and based in Santa Clara, California. It is the leader in programmable graphics processing technology, focusing on creating human-computer interaction products that enhance both personal and specialty platforms.
Cisco Systems, Inc. is headquartered in San Jose, California. It is committed to countless enterprises to build network services with their keen insight, rich industry experience, and advanced technology to help enterprises to transform network applications into strategic assets, fully tap the energy of the network to obtain a competitive advantage.
Intel Corporation is headquartered in Santa Clara, California. It is the world's largest semiconductor. Intel worked with its partners to drive innovation and application of transformative technologies such as artificial intelligence, 5G, and intelligence Edge.
The Goldman Sachs Group, Inc. is an American multinational investment bank and financial services company headquartered in New York City. It offers services in investment management, securities, asset management, prime brokerage, and securities underwriting. It also provides investment banking to institutional investors.
U. S. Bancorp is an American bank holding company based in Minneapolis, Minnesota, and incorporated in Delaware. Its subsidiary head ATM Automated Teller machine provides full financial brokerage services. It provides consumers, enterprises, and institutions with banking, brokerage, insurance, investment, mortgage, trust, and payment services.
The Toronto-Dominion Bank is a Canadian multinational banking and financial services corporation headquartered in Toronto, Ontario. Commonly known as TD and operating as TD Bank Group, the bank was created on 1 February 1955, through the merger of the Bank of Toronto and The Dominion Bank, which were founded in 1855 and 1869, respectively.
The Allstate Corporation is an American insurance company, headquartered in Northfield Township, Illinois, near Northbrook since 1967. Founded in 1931 as part of Sears, Roebuck, and Co., it was spun off in 1993. The company also has personal lines insurance operations in Canada.
The Procter & Gamble Company (P&G) is an American multinational consumer goods corporation headquartered in Cincinnati, Ohio, founded in 1837 by William Procter and James Gamble. It specializes in a wide range of personal health/consumer health, and personal care and hygiene products.
Johnson & Johnson (J&J) is an American multinational corporation founded in 1886 which is the largest and most diversified healthcare and consumer care company. J&J produces and sells products in a wide range of fields including nursing products, pharmaceutical products, medical devices, and diagnostic products. The company owns Johnson & Johnson Baby, Neutrogena, Keli, and many other well-known brands.
Colgate-Palmolive Company is an American multinational consumer products company headquartered on Park Avenue in Midtown Manhattan, New York City. It specializes in the production, distribution, and provision of household, health care, personal care, and veterinary products. Its personal care products have been sold to more than 200 countries and regions worldwide, becoming a global consumer goods company with sales of $9.4 billion. Table   Table 1 Table 1 shows that the correlation between PG and NVAD is the lowest 5.9%, and the correlation between CL and NVAD is 6.9%, which means the correlation between Consumer Defensive and Technology is low.

Index-Model
Index-Model is a very useful abstraction. It simplifies the estimation of the covariance matrix problem and enhances the analysis of security expected returns. Index-Model explicitly decomposes the risk into firm-specific and systematic components. Excess return for the portfolio pf stocks: The portfolio's variance is: If M denotes market index, then, its' excess return is R M =r M -r f , and standard deviation σ M . α P , is non-market risk-premium. β p 2 σ M 2 is systematic and σ 2 (e p ) is a specific risk.

Markowitz Model
Markowitz Model is the venture capital model proposed by H. M. Markowitz in 1952. Markowitz defined risk as the volatility of the rate of return and applied mathematical statistics to portfolio selection for the first time. The model requires a large number of estimates of expected returns, variances, and covariance.
Assume an investor invests in a portfolio of n risky assets during an investment period. R epresents the expected return on the asset i. The expected return on the portfolio is: x i represents the investment weight of the asset i. If σ p 2 is the variance of the asset i, the variance of the portfolio consisting of n assets is: x j ρ ij σ i σ j It shows that the risk of the portfolio mainly depends on the investment weight of each asset, the correlation coefficient between different securities, and the standard deviation of each asset. Therefore, we should choose the assets with minimal variance and lower correlation coefficient between them to construct the portfolio, so as to reduce the investment risk.

Constraint
1. This additional optimization constraint is designed to simulate Regulation T by FINRA which allows broker-dealers to allow their customers to have positions, 50% or more of which are funded by the customer's account equity.
2. This additional optimization constraint is designed to simulate some arbitrary "box" constraints on weights, which may be provided by the client.
3. no constraints; without any additional optimization constraints. 4. This additional optimization constraint is designed to simulate the typical limitations existing in the U.S. mutual fund industry.
≥0, for∀ 5. For the sake of seeing if the inclusion of the broad index into our portfolio has a positive or negative effect.

=0
(8) Table 2 below shows the investment methods under the index model and there are five constraints to limit the weight of each investment. Also, there are minimum variance and maximum Sharpe which represent two different types of investment strategy. The minimum variance represents the minimum risk and the maximum Sharpe means have the most benefit. Under the constrain one the minimum variance of SPX is 25.62% and to reach this the stock of NVDA needs to sell for 4.04% and the CSCO needs to sell out for 5.27% also the INTC needs to sell for 2.81% and the GS needs to sell 8.73%. While the stock of USB TDCN PG JNJ and CL need to buy. Also, the stock of ALL needs to be sold for 1.4%. The maximum Sharpe of the constrained one is -47.66%. And the stock of the CSCO INTC and GS needs to be sold for 1.24% 0.48% and -0.62%. While the other stock such as NVDA needs to buy 8.88% the USB needs to buy 6.67%, and the TDCN needs to buy 29.55. The stock of ALL needs to buy 4.58%, the stock of PG needs to buy 43.95% and the JNJ and CL need to buy 33.37% and 23.01%. Under the constrain two the minimum variance of SPX is 25.65% and the stock of NVDA need to sell out for 4.04% and the CSCO need to be sold -5.27% the INTC need to be sold for 2.81% and the GS needs to sold 8.73%, Also the ALL need to sold 1.4%. And the rest of the stock needs to buy to achieve the minimum risk. The maximum Sharpe of the SPX under the constrain two is -70.16% and the stock of NVDA need to buy 10.32% the GS need to buy 0.57% and the USB stock need to buy 9.39% the TD CN need to buy 34.25% and the PG need to buy 46.9% the JNJ need to buy 36.94% also the CL need to buy 25.11%. While the CSCO and the INTC need to sell out for 0.57% and 0.11%. And the result of constraining three is the same as the constraint two. And the SPX of the minimum variance under constrain four is 0 and the stock of NVDA CSCO INTC GS USB and ALL are all 0 which means they don't have to buy or sell. And the stock of TDCN needs to buy 9.21% the PG needs to buy 33.55% and the JNJ needs to buy 28.89% the CL needs to buy 28.35%. The SPX of the maximum Sharpe under constraining four is also 0 and the stock of CSCO INTC GS USB and ALL are also 0. The stock of NVDA needs to buy 6.74% and the stock of TDCN needs to buy 17.75% and the stock of PG needs to buy 37.34% the stock of JNJ need to buy 22.75% CL need to buy 15.41%. The SPX of the minimum variance under constrain five is 0 and the stock of NVDA CSCO INTC GS needs to be sold out and the USB TDCN ALL PG JNJ and CL need to buy. The SPX of maximum Sharpe under constraint five is also 0. And the stock which needs to be sold and buy is the same with the minimum variance under constraint five but the data is not the same which has shown in the below table.  Table 3 below shows the result of the Markowitz model under five constraints. These results also include two different types which are minimum variance and maximum Sharpe. The minimum variance means the lowest risk and the Maximum Sharpe means the maximum return. The portfolios are constrained by five constraints. The minimum variance of the Markowitz model under the constrained one is 39.53% to get this data the stock of NVDA needs to sell for 2.96% the CSCO stock needs to sell for 2.97% and the stock GS needs to be sold for 5.93% also the USB needs to sold out for 0.3% and the stock of ALL needs to sell for 11.48%. And for other stocks, they need to buy. For INTC it needs to buy 1.34% the TDCN needs to buy 19.38% the PG needs to buy 25.97% and the JNJ needs to buy 18.82% the CL needs to buy 19.61%. The SPX of maximum Sharpe under constrain one is -42.74% and the NVDA needs to buy 15.74% and GS needs to buy 3.25% USB needs to buy 6.48% the TDCN needs to buy 35.29% and ALL needs to buy 1.07% of the PG needs to buy 45.71% the JNJ needs to buy 30% CL needs to buy 12.45%. Also, the CSCO needs to sell for 1.15% the INTC needs to sell for 6.11%. The minimum variance of constraint two is the same as the variance under constraint one. The maximum Sharpe of the SPX under constrains two is -100% and the stock id INTC needs to be sold for 8.15%. While the stock of NVDA needs to buy 21.5% the CSCO needs to buy 0.31% GS stock needs to buy 11.46%. The stock of USB needs to buy 12.25% The TDCN has the second-highest proportion which is 44.92% and the ALL needs to buy 6.87% the PG has the highest 52.33% The JNJ also needs to buy 41.02% The CL needs to buy 17.48%. The SPX of minimum variance under constraint three is 38.37% and five stocks need to be sold which are NVDA CSCO GS USB and ALL. While other five stocks need to buy which are INTC TDCN PG JNJ and CL and according to them the highest is PG which is 25.93% and the lowest is INTC which is 1.33%. The SPX of maximum Sharpe under constrain three is -109.97% and the NVDA needs to buy 22.46% the CSCO needs to buy 0.89% GS needs to buy 12.73% and the USB needs to buy 13.21% TDCN needs to buy 46.46% which is the second-highest proportion and the ALL needs to buy 7.9% the stock of PG which has the highest proportion which is 53.5% and JNJ needs to buy 42.72% and CL needs to buy 18.3%. And under these constraints, there is only one stock that needs to sell which is INTC. Under the fourth constrain the SPX of the minimum variance is 9.49% and the stock of NVDA CSCO INTC GS USB and ALL are all 0 which means they do not need to invest. And the TDCN needs to buy 19.85% and PG needs to buy 28.91% JNJ and CL also need to buy 20.62% and 21.13% respectively. While the maximum Sharpe of SPX under constraining four is 0 also the stock of CSCO INTC GS USB and ALL they do not need to invest. And the stock of NVDA needs to buy 10.95% the TDCN needs to buy 23.73% PG has the highest rate which is 42.56% The JNJ needs to buy 16.17% and the CL needs to buy 6.59%. The SPX of the minimum variance under the constrain five is 0 and the stock of NVDA GS and ALL needs to be sold while the stock of other 7 different companies need to buy and PG has the highest rate which is 28.91% and CSCO has the lowest which is 0.08%. Also, the maximum Sharpe under constraint five is 0, and the stock of CSCO INTC GS and ALL needs to be sold and the rest of the stock in the portfolio needs to buy and the PG also has the highest rate which is 43.31%.  Table 4 shows the return and Sharpe ratio of the index model and Markowitz model under five constrains it can be seen that the return of the minimum variance of Markowitz model under constraint one two and three are the same which is 7.51% and also, they have the same Sharpe ratio which is 0.685. For the maximum Sharpe they do not have the same return and under the constrain one is 14.01% and under the constrain two 16.56% and under the constrain three is 16.99%. Under the constrain four the return of minimum variance is 8.88% and the return for maximum Sharpe is 12.06% and the Sharpe ratio is 0.788 and 0.919 respectively. The return under constraint five is 8.71% for the minimum variance and 13.06% for maximum Sharpe. And the Sharpe ratio is 0.779 and 0.954. For the Index model, the return under constraint one and two, and three are the same which is 7.15% And the Sharpe ratio of these three are also the same which is 0.742. While the return of the maximum Sharpe under constrain one is 12.07% and the Sharpe ratio is 0.990. The return of maximum Sharpe under constraints two and three are the same which is 12.87% also they have the same Sharpe ratio which is 0.996. The return of the minimum variance under constraint four is 8.64% and the Sharpe ratio is 0.85 while for the maximum Sharpe the return is 10.71% and the Sharpe ratio is 0.914. Under the constrain five the return of minimum variance is 7.82% and the Sharpe ratio is 0.802 for the maximum Sharpe the return is 10.84% and the Sharpe is 0.994. Under the Markowitz model the maximum Sharpe under the constrain three has the highest return which is 16.99% and also it has the highest Sharpe ratio and under the Index model the maximum Sharpe of constraint two and three have the same ratio and they are also the highest which are 12.87% and there Sharpe ration is 0.996.

Conclusion
In sum by analyzing 20 years of stock data and bringing in Markowitz and index models under five qualifications, we get 20 portfolios, and we analyze the returns and Sharpe ratios for these 20 portfolios. The final result is that the Markowitz model has higher returns than the exponential model and has the highest return under the third constraint. And also, it has the highest Sharpe ratio. Therefore, to obtain higher returns when predicting the future stock portfolio, the Markowitz model can be used for calculation. Also, the constrain three is no constraint, without any additional optimization constraints. So, if the investor wants to achieve the highest return, they have to use the Markowitz model. Markowitz model is highly used in calculating the portfolio and it can be seen that it will be more valued in the future. And it can help investors better analyze the stock market and make correct judgments to obtain higher returns.