Visualized Portfolio Optimization of stock market: Case of TSE
الموضوعات :Fatemeh Lakzaie 1 , Alireza Bahiraie 2 , saeed mohammadian 3
1 - Department of Mathematics, Semnan University, Semnan, Iran
2 - Department of Mathematics, Semnan University, Semnan, Iran
3 - Department of Mathematics, Semnan University, Semnan, Iran
الکلمات المفتاحية: Portfolio optimization, Mean-variance theory, Minimum spanning tree,
ملخص المقالة :
An investment portfolio is a collection of financial assets consisting of investment tools such as stocks, bonds, and bank deposits, among others, which are held by a person or a group of persons. In this research, we use the Markowitz model to optimize the stock portfolio and identify the minimum spanning tree (MST) structure in the portfolio consisting of 50 stocks traded in the TSE. The observable which is used to detect the minimum spanning tree (MST) of the stocks of a given portfolio is the synchronous correlation coefficient of the daily difference of logarithm of closure price of stocks. The correlation coefficient is calculated between all the possible pairs of stocks present in the portfolio in a given time course. The goal of the present study is to obtain the taxonomy of a portfolio of stocks traded in the TSE by using the information of time series of stock prices only. In this research, report results obtained by investigating the portfolio of the stocks used to compute 50 stocks of the Iran Stock Exchange in the time period from January 2012 to October 2022.
[1] Deng, G. F., Lin, W. T., and Lo, C. C., Markowitz-based portfolio selection with cardinality constraints using
improved particle swarm optimization, Expert Systems with Applications, 2012; 39(4): 4558–4566. doi: 10.1016/j.eswa.2011.09.129
[2] Engels, M., Portfolio Optimization : Beyond Markowitz, A master thesis in University of Leiden, 2004.
[3] Hernandez, J. A., Are oil and gas stocks from the Australian market riskier than coal and uranium stocks ?
Dependence risk analysis and portfolio optimization, Energy Econ., 2014; 45:528–536. doi: 10.1016/j.eneco.2014.08.015
[4] Palczewski, J., Poulsen, R., Schenk-Hoppé, K. R., and Wang, H., Dynamic portfolio optimization with
transaction costs and state-dependent drift, European Journal of operational research, 2015; 243(3): 921–931.
doi: 10.1016/j.ejor.2014.12.040
[5] Logubayom, A. I., and Victor, T. A., Portfolio Optimization of Some Stocks on the Ghana Stock Exchange
Using the Markowitz Mean-Variance Approach, Journal of Financial Risk Management, 2019; 8(01): 29–
41.doi: 10.4236/jfrm.2019.81003
[6] Hali, N. A., and Yuliati, A., Markowitz Model Investment Portfolio Optimization : a Review Theory,
International Journal of Research in Community Services, 2020; 1(3):14–18.doi: https: 10.46336/ijrcs.v1i3.104
[7] Li, B., and Zhang, R., A new mean-variance-entropy model for uncertain portfolio optimization with liquidity
and diversifica-tion, Chaos, Solitons & Fractals, 2021; 146: 110842.doi: 10.1016/j.chaos.2021.110842
[8] Barbi, A. Q., and Prataviera, G. A., Nonlinear dependencies on Brazilian equity network from mutual
information minimum spanning trees, Physica A: Statistical Mechanics and its Applications, 2019 ; 523: 876–
885.doi: 10.1016/j.physa.2019.04.147
[9] Kumar, S., Kumar, S., and Kumar, P., Diffusion entropy analysis and random matrix analysis of the Indian
stock market, Physica A: Statistical Mechanics and its Applications, 2020; 560:125122.doi: 10.1016/j.physa.2020.125122
[10] Coletti, P., Comparing minimum spanning trees of the Italian stock market using returns and volumes,
Physica A: Statistical Mechanics and its Applications, 2016; 463: 246–261.doi: 10.1016/j.physa.2016.07.029
[11] Bonanno, G., Caldarelli, G., Lillo, F., and Mantegna, R. N., Topology of correlation-based minimal
spanning trees in real and model markets, Physical Review E, 2003; 68(4): 4–7.doi: 10.1103/PhysRevE.68.046130
[12] Wang, J., Zhao, L., and Huang, R., A network analysis of the Chinese stock market, Physica A: Statist.
Mech, Appl, 2009; 388(14): 2956–2964.doi: 10.1016/j.physa.2009.03.028
[13] Peng, C.K., Buldyrev, S.V., Havlin, S., Simons, M., Stanley, H.E. and Goldberger, A.L., Mosaic organization of DNA nucleotides, Physical review e, 1994; 49(2):1685.doi: 10.1103/PhysRevE.49.1685
[14] Huang, C.F., A hybrid stock selection model using genetic algorithms and support vector regression,
Applied Soft Computing, 2012; 12(2): 807-818.doi: 10.1016/j.asoc.2011.10.009
[15] Li, T., Zhang, W. and Xu, W., A fuzzy portfolio selection model with background risk, Applied
Mathematics and Computation, 2015; 256: 505–513.doi: 10.1016/j.amc.2015.01.007
[16] Tumminello, M., Aste, T., Di Matteo, T. and Mantegna, R.N., A tool for filtering information in complex
systems, Proceedings of the National Academy of Sciences, 2005; 102(30):10421–10426.doi.org/10.1073/pnas.0500298102
[17] Onnela, J. P., Chakraborti, A., Kaski, K., and Kertesz, J., Dynamic asset trees and Black Monday, PhysicaA:
Statistical Mechanics and its Applications, 2003; 324(1-2) :247–252.doi: 10.1016/S0378-4371(02)01882-4
[18] Heimo, T., Saramäki, J., Onnela, J. P., and Kaski, K., Spectral and network methods in the analysis of
correlation matrices of stock returns, Physica A: Statistical Mechanics and its Applications, 2007; 383(1):
147–151.doi: 10.1016/j.physa.2007.04.124
[19] Mangram, M. E., A simplified perspective of the Markowitz portfolio theory, Global journal of business
research, 2013; 7(1)P59–70.
[20] Gasser, S. M., Rammerstorfer, M., and Weinmayer, K., Markowitz revisited: Social portfolio engineering,
European Journal of Operational Research., 2016; 258(3):1181-1190.doi: 10.1016/j.ejor.2016.10.043
[21] Zanjirdar, M., Overview of portfolio optimization models, Advances in mathematical finance and
applications, 2020 ; 5(4):419–435.doi: 10.22034/amfa.2020.1897346.1407
[22] Fabozzi, F.J., Markowitz, H.M. and Gupta, F., 2008. Portfolio selection. Handbook of finance, 2.
[23] Kalayci, C. B., Ertenlice, O., and Akbay, M. A., A comprehensive review of deterministic models and
applications for mean-variance portfolio optimi-zation, Expert Systems with Applications, 2019; 125:345–
368.doi: 10.1016/j.eswa.2019.02.011
[24] Ozyesil, M., Markowitz Portfolio Optimization Model: An Application On Listed Firm On Borsa Istanbul-
30 National Stock Index (Bist-30), no. February, 2021.
[25] Chen, W., Zhang, H., Mehlawat, M. K., and Jia, L., Mean–variance portfolio optimization using machine
learning-based stock price prediction, Appl. Soft Comput, 2021; 100, p.106943.doi: 10.1016/j.asoc.2020.106943
[26] Kolm, P. N., Tütüncü, R., and Fabozzi, F. J., 60 Years of portfolio optimization: Practical Challenges and
current trends, European Journal of Operational Research, 2013;234(2):356-371.doi: 10.1016/j.ejor.2013.10.060
[27] Li, H., Mao, W., Zhang, A., and Li, C., An improved distribution network reconfiguration method based on
minimum spanning tree algorithm and heuristic rules, International Journal of Electrical Power & Energy
Systems, 2016; 82: 466–473.doi: 10.1016/j.ijepes.2016.04.017
[28] Xue, L., Chen, F., Guo, S., Fu, G., Li, T., and Yang, Y., Time-varying correlation structure of Chinese stock
market of crude oil-related companies greatly influenced by external factors, Physica a: Statistical Mechanics
and Its Applications, 2019; 530:121086.doi: 10.1016/j.physa.2019.121086
[29] Bonanno, G., Caldarelli, G., Lillo, F., Micciche, S., Vandewalle, N., and Mantegna, R. N., Networks of
equities in financial markets, The European Physical Journal B, 2004; 38(2): 363–371.doi: 10.1140/epjb/e2004-00129-6
[30] Bonanno, G., Lillo, F., and Mantegna, R. N., High-frequency cross-correlation in a set of stocks,
Quantitative Finance, 2001; 1:1469-7688. doi: 10.1080/713665554
Adv. Math. Fin. App., 2024, 9(2), P.707-722 | |
| Advances in Mathematical Finance & Applications www.amfa.iau-arak.ac.ir Print ISSN: 2538-5569 Online ISSN: 2645-4610
|
Visualized Portfolio Optimization of Stock Market: Case of TSE
| |||
Fatemeh Lakzaie , Alireza Bahiraie*, Saeed Mohammadian
| |||
Department of Mathematics, Semnan University, Iran | |||
Article Info Article history: Received 2023-01-29 Accepted 2024-02-23
Keywords: Portfolio Optimization Mean-Variance Theory Minimum Spanning Tree |
| Abstract | |
An investment portfolio is a collection of financial assets consisting of investment tools such as stocks, bonds, and bank deposits, among others, which are held by a person or a group of persons. In this research, we use the Markowitz model to optimize the stock portfolio and identify the minimum spanning tree (MST) structure in the portfolio consisting of 50 stocks traded in the TSE (Tehran Stock Exchange). The observable which is used to detect the minimum spanning tree (MST) of the stocks of a given portfolio is the synchronous correlation coefficient of the daily difference of logarithm of the closure price of stocks. The correlation coefficient is calculated between all the possible pairs of stocks present in the portfolio in a given time course. The goal of the present study is to obtain the taxonomy of a portfolio of stocks traded in the TSE by using the information of time series of stock prices only. This research, reports results obtained by investigating the portfolio of the stocks used to compute 50 stocks of the Iran Stock Exchange in the period from January 2012 to October 2022. |
1 Introduction
Portfolio optimization, which is an analytical process of selecting and allocating a group of investment assets, is an essential problem in risk management. Expected returns and risks are the most important parameters in portfolio optimization problems. Investors generally prefer to maximize returns and minimize risk [1]. The Markowitz mean-variance (MV) model, which was first developed in 1952, and is among the best models for solving the portfolio selection problem, can be described in terms of the mean return of the stock and the variance of return (risk) between these stock [2]. The Markowitz mean-variance (MV) the basic model obtains the ‘‘efficient frontier’’, which is the portfolio of stock that achieves a predetermined level of expected return at minimal risk. For every level of desirable mean return, this efficiency frontier indicates the best investment strategy.Hernandez (2014), and Palczewski et al. (2015) presented different approaches to dealing with portfolio management, but they mainly refer to the optimization of assets, especially in the stock exchange, which was the initial purpose of the Markowitz theory [3-4]. Logubayom and Victor (2019) used historical monthly data of the stock returns from 2011 to 2016 for portfolio optimization and showed how the Markowitz model can be applied to the Ghana Stock Exchange. They also unraveled the most efficient portfolio among selected stocks, to the relief of the investor [5]. Abdul and Yuliati (2020) studied the optimization of the investment portfolio with the Markowitz model. Optimization was done by using the Lagrange Multiplier method, and an equation was obtained to determine the ratio (weight) of fund allocation for each asset in the formation of the investment portfolio. The results showed that by using these equations, the determination of investment portfolio weights can be determined by capital [6]. Science et al. presented portfolio optimization with uncertain returns. First, an uncertain mean-variance-entropy model was formulated. Finally, they performed a numerical simulation to demonstrate the practicality and efficiency of their model. The results certified that asset liquidity and diversification degree of the portfolio affected the optimal investment strategies [7]. Financial Markets are complex systems whose structure and conduct are strongly dependent on their component's interrelations. In particular, network theory has contributed to characterizing and understanding the behavior of financial markets [8]. Many models based on physical phenomena have been suggested to analyze financial networks. These network models are very important in investigating complex phenomena theoretically [9]. The starting idea of building a network based on the log difference of equity prices comes from Mantegna, who proposes building a correlation matrix of log returns, an induced distance, and consequently a network of companies. The correlation matrix is dense and, the resulting network would have an overwhelming amount of linkages, Mantegna suggests building a minimum spanning tree (MST) [10] which can give an overview of the structure without cycles, which is therefore very comprehensible for professionals The proposal of MST provides a practical tool based on which many valuable types of research were conducted in studying different aspects of financial systems [11, 12]. In 1994, Peng [13] presented a method called defended fluctuation analysis (DFA) as an alternative to studying the long-range power-law correlations for DNA sequences [14]. Proposed a method for efficient stock selection using support vector regression (SVR) as well as genetic algorithms (GA). They first used the SVR method to create a surrogate for real stock returns, that in turn provided reliable stock ratings [15]. A fuzzy portfolio selection model with background risk based on the definitions of potential return and potential risk. The results showed that the background risk can better reflect the investment risk of the real economic environment, which make the investors choose a more suitable portfolio for themselves. Many studies have been published on a network analysis of a special stock market, in particular on the New York Stock [16, 17, 18].
In 2013, Men Gram presented a simplified perspective of Markowitz's contributions to Modern Portfolio Theory. Instead of involving complex and advanced models that are based on statistical calculations, they only discussed this model’s theoretical basis and stated that this model, one of the leading theories for the last 6 decades, should be considered only a simple financial tool. They concluded that his theory is subject to and based on probable growth and expansion, and so where this advance leads is known [19]. In 2017, Gasser et al. evaluated Markowitz Portfolio Selection Theory completely, and they offered an adjustment that includes asset return and risk relationship specifically but also social responsibility measure in decision-making during the investment period. The model they use allowed investors to build their customized asset allocations and include all their requests related to risk, and return. According to the results of the analysis, they found that investors who wanted to maximize the social effects of investments experienced a decrease in expected returns, and findings regarding these results are statistically meaningful [20].
2 Methodology
One of the most important issues in portfolio optimization is risk mensuration. The problem of portfolio optimization is the determination of the amount of each share in the portfolio, with the two objectives of maximizing returns and minimizing risk [21]. This section presents the Markowitz mean-variance model and shows an efficient frontier calculation for 50 stocks of the Iran Stock. Finally, we draw a minimum spanning tree for 50 stocks.
2.1. Portfolio Optimization
Optimization can be defined as the process of finding conditions that give the maximum or minimum value of a function. The two most important components in deciding on an investment are the amount of risk and return on capital assets. Optimal asset selection is often driven by the trade-off between risk and return, and the higher the asset risk, investors expect higher returns. Identifying the asset boundary of the portfolio enables investors to derive the most expected return on their investment based on their utility and degree of risk aversion and risk-taking. Each investor selects a point on the effective boundary based on their risk-taking and risk aversion and sets their portfolio composition to maximize returns and minimize risk [22].
Portfolio optimization is the method of determining the best combination of securities and stock with the object of having less risk and obtaining more profit in an investment [23]. The basic theory of portfolio optimization can be traced back to Markowitz (1952), who advised the choice and allocation of investments based on mean-variance analysis. According to Markowitz, the two main factors in portfolio optimization are risk and return factors.
The main purpose of the Markowitz model is to institute a numeric relationship between return and risk and to obtain the average expected return at the lowest risk level or to obtain the maximum return at the average risk level [24].
2.2. Markowitz Mean-Variance Model
Markowitz was the one who introduced and developed the concept of portfolio diversification. He showed in general how the diversification of the portfolio reduces the risk for the investor. Investors can obtain an efficient portfolio for a given return by minimizing portfolio risk. Further, the above process can lead to the formation of efficient baskets called the mean-variance efficient boundary. Logical investors always pursue the lowest risk under a specific expected return or the highest return under a particular risk, choosing an appropriate portfolio to maximize the expected utility [25].
Markowitz model is a method used to optimize the portfolio and involves some mathematics, which makes it possible to construct a stock portfolio with different combinations. This model is all about maximizing return and minimizing risk, but simultaneously. The MVO model made use of mean and variance, which are calculated from historic stock prices, to quantify the expected return and risk of the generated portfolio. The MVO model maximizes the expected return for a certain level of risk or minimizes risk for a given [26].
In the model, firstly, each of the stocks was given equal weight and the optimal distribution was calculated according to various equation constraints. The equation constraints are shown below.
1) A Sum of stocks’ weights will be a maximum of 1.
2) Changing variables for the optimization are the weights of the stocks.
3) To obtain an average return for the minimum risk, the standard deviation is arranged as a minimum during the optimization process.
4) To calculate the maximum return for the given level of risk, the average return of the portfolio is arranged as the maximum value during the optimization process.
To obtain the optimal portfolio selection in the Markowitz method that has the least variance for a specific level of return, we have the following linear programming model [24].
Following Markowitz (1952, 1959) we define the problem of portfolio selection as follows:
Suppose there are N stocks with a return . Then the return expectancy value vector is given by [6]:
, with
| (1) |
, with
| (2) |
, Subject to = =1 , , , , In relation (3) we have: Portfolio variance (risk) Weight of each i stock in the portfolio Average return on stock i Expected return of the portfolio
| (3)
|
| (4) |
| (5) |
|
Fig. 2: Correlation between Stocks and QQ. Plot |
A metric distance between a pair of stocks can be rigorously determined [29] by defining:
(t)= | (6) |
Fig. 3: Correlation Matrix between Stocks |
Also, the distance matrix between stocks according to the calculations made in MATLAB is shown in Fig 4 as follows:
Fig. 4: Distance Matrix between Stocks
Based on all these results, the correlation network between stocks can be generated in Fig 5 as follows:
|
Fig. 5: Correlation Network between Stocks |
Also, the graph of the stock distance matrix is calculated and shown in Fig 6 as follows:
Fig. 6: Graph Distance Matrix |
The minimum spanning tree visualization is shown as follows in Fig 7 as follows:
|
Fig. 7: Minimum Spanning Tree of 50 Stocks in the TSE |
The minimum spanning tree visualization with the distance between the stocks is shown in Fig 8 as follows:
|
Fig. 8: Minimum Spanning Tree of 50 Stocks in the TSE |
The filtering approach based on the MST can also be used to consider aspects of portfolio optimization and to do a correlation-based classification. In short, the study of correlation-based financial networks is able to filter out economic information from the correlation coefficient matrix of a set of financial time series [29]. A visualization of the MST shows the existence of well-characterized clusters. The minimum spanning tree presents a few clusters composed of stocks working in the same part and many stocks having a single link [30]. Examples are the cluster of basic metals. Most of these stocks connect with a reference stock that, in the present network, is ROOI1.
3 Results
In this section, the results of stock portfolio optimization with the Markowitz’mean-variancece method are presented. Finally, the efficient frontier curve of the portfolio is determined for 50 stocks in the TSE. Creating optimal portfolio allocation is very important, which guarantees the main goals of the investor in the form of maximizing returns or minimizing the degree of investment risk. In the analysis, first, we're minimizing the risk degree of the investments.An optimal portfolio allocation that provides an average expected return with the lowest risk level is shown in Table 1 as follows. According to Table 1, it is observed that MDKO1 has the highest return with 0.016964821, on the other hand, it has also the highest standard deviation. PARS1 is ranked as the 2nd highest stock in return with 0.009569826 and 0.456611305 standard deviations. NOSH1 is ranked as the 3rd highest stock in return with 0.005335935 and 0.211941463 standard deviations. After solving the optimizing equation to minimize risk level and get an average return, Table 1 is obtained.
Table 1: Optimal Portfolio Allocation That Shows Average Expected Return with Lowest Risk Level
Symbol |
Full name |
Average Return
|
Standard Deviation |
Weight |
FOLD1 | S*Mobarakeh Steel | 0.000634835 | 0.027490140 | 0.025451187 |
PIRN1 | Pumpiran | 0.001167464 | 0.028462601 | 0.041536271 |
MSMI1 | S*I. N. C. Ind. | 0.000470769 | 0.028514980 | 0.025446990 |
MDKO1 | Khavarmianeh Ins. | 0.016964821 | 0.816649823 | 0.000362996 |
GOLG1 | Gol-E-Gohar. | 0.000818267 | 0.036815288 | 0.014370200 |
CHML1 | Chadormalu | 0.001409756 | 0.064795228 | 0.000000000 |
BPAS1 | S*Pasargad Bank | 0.000781521 | 0.021877630 | 0.068251542 |
DMVN1 | Damavand Min. | 0.001829559 | 0.037914915 | 0.032853042 |
NOSH1 | Noush Maz. | 0.005335935 | 0.211941463 | 0.001128301 |
SHSI1 | Sina Chem. Ind. | 0.001343076 | 0.036642185 | 0.031497281 |
KRTI1 | Iran Carton | 0.001157948 | 0.035976352 | 0.026902693 |
KSKA1 | Kaveh Paper | 0.001030610 | 0.037971784 | 0.011947358 |
KHFZ1 | Hafez Tile | 0.001360247 | 0.034445157 | 0.051238428 |
SINA1 | Sina Tile | 0.001475497 | 0.035697371 | 0.018191831 |
GSBE1 | S*Sabet Khorasan | 0.001100571 | 0.039257442 | 0.008590815 |
SGAZ1 | Glass and Gas | 0.001398848 | 0.032367836 | 0.007841389 |
NSAZ1 | Azar Refract. | 0.001403544 | 0.040471042 | 0.000000000 |
PRDZ1 | Pardis Petr. | 0.001162554 | 0.026283206 | 0.036035238 |
GMRO1 | Marvdasht Sugar | 0.000753084 | 0.037088055 | 0.017971814 |
DJBR1 | Jaber Hayan P. | 0.000826543 | 0.028152671 | 0.027357348 |
LEAB1 | Loabiran | 0.000920999 | 0.038283793 | 0.004372321 |
PSIR1 | Iran Glass Wool | 0.001613339 | 0.040593419 | 0.013542975 |
PARS1 | PARS Petrochemical | 0.009569826 | 0.456611305 | 0.000569637 |
AYEG1 | Pardis Investment | 0.000686203 | 0.028055767 | 0.015796606 |
OFRS1 | Fars Dev. | 0.001079131 | 0.029406048 | 0.023213990 |
BALI1 | Buali Inv. | 0.001051918 | 0.027236084 | 0.002757575 |
NIKI1 | Iran N. Inv. | 0.000870253 | 0.027164513 | 0.040838408 |
NOVN1 | S*EN Bank | 0.000375910 | 0.027357668 | 0.010715896 |
BANK1 | Bank Melli Inv. | 0.000973894 | 0.028283938 | 0.000000000 |
SHMD1 | Hamadan Glass | 0.001266110 | 0.031654296 | 0.000000000 |
NBEH1 | Behran Oil | 0.000583673 | 0.030999924 | 0.027567130 |
PARK1 | Shazand Petr. | 0.001160479 | 0.029525221 | 0.000000000 |
NKOL1 | NiroCholor | 0.000932952 | 0.033167129 | 0.006540718 |
ATDM1 | Atye Damavand | 0.001318406 | 0.034597556 | 0.000000000 |
SKER1 | Kerman Cement | 0.001018504 | 0.030123724 | 0.024523573 |
BHMN1 | Bahman Group | 0.000944734 | 0.034423779 | 0.000000000 |
LSMD1 | Ind. & M. L. | 0.000681585 | 0.028029014 | 0.004746398 |
DARO1 | Daroupakhsh | 0.000995533 | 0.025342841 | 0.063891668 |
ROOI1 | Iran Zinc Mines | 0.001059548 | 0.028173917 | 0.000000000 |
GESF1 | Isfahan Sugar | 0.001625476 | 0.037742167 | 0.000000000 |
SADB1 | Ardebil Cement | 0.001266883 | 0.050932183 | 0.017621110 |
TMEL1 | Tosee Melli Inv | 0.000733132 | 0.026703669 | 0.016423295 |
GOST1 | Iran Kh. Inv. | 0.001506039 | 0.044675801 | 0.000000000 |
GHND1 | Khoy Sugar Co. | 0.000804069 | 0.033054518 | 0.049838121 |
FKAS1 | Khorasan Steel Co. | 0.000704230 | 0.020336541 | 0.160261367 |
GLOR1 | Lorestan Sugar | 0.001241364 | 0.040981226 | 0.011399377 |
SIMS1 | Shomal Cement | 0.001794054 | 0.056037386 | 0.007745395 |
INFO1 | Inf. Services | 0.000226005 | 0.029763713 | 0.037854360 |
BALB1 | S*Alborz Bimeh | 0.000578690 | 0.033655504 | 0.000000000 |
MNGZ1 | Iran Mn. Mines | 0.001114845 | 0.042336068 | 0.012805356 |
It should be highlighted that to attain this target, 11 out of 50 stocks are excluded from the portfolio and FKAS1, BPAS1, DARO1, and KHFZ1 will have the most shares (weights) the in portfolio by 0.160261367, 0.068251542, 0.063891668 and 0.051238428 respectively.
Table 2: Portfolio Optimization at The Minimum Point
Portfolio Return | 0.000956657 |
Portfolio Variance | 0.00009222 |
Portfolio Standard Deviation | 0.009602922 |
The best solution for the overall portfolio can be outlined as an average return is 0.000956657 with a minimum standard deviation is 0.009602922, which is shown in Table 2.
Another main objective is to maximize the return with the average standard deviation of the investment portfolio. Similar to the first optimization process, the results are shown in the table below. The portfolio optimization that provides the maximum expected return with a given average level is shown in Table 3.
Table 3: Optimal Portfolio Allocation That Provides Maximum Expected Return with Average Risk Level
Symbol |
Full name |
Average Return
|
Standard Deviation |
Weight |
FOLD1 | S*Mobarakeh Steel | 0.000634835 | 0.027490140 | 0.00000000 |
PIRN1 | Pumpiran | 0.001167464 | 0.028462601 | 0.00000000 |
MSMI1 | S*I. N. C. Ind. | 0.000470769 | 0.028514980 | 0.00000000 |
MDKO1 | Khavarmianeh Ins. | 0.016964821 | 0.816649823 | 0.99999284 |
GOLG1 | Gol-E-Gohar. | 0.000818267 | 0.036815288 | 0.00000071 |
CHML1 | Chadormalu | 0.001409756 | 0.064795228 | 0.00000000 |
BPAS1 | S*Pasargad Bank | 0.000781521 | 0.021877630 | 0.00000087 |
DMVN1 | Damavand Min. | 0.001829559 | 0.037914915 | 0.00000000 |
NOSH1 | Noush Maz. | 0.005335935 | 0.211941463 | 0.00000000 |
SHSI1 | Sina Chem. Ind. | 0.001343076 | 0.036642185 | 0.00000000 |
KRTI1 | Iran Carton | 0.001157948 | 0.035976352 | 0.00000094 |
KSKA1 | Kaveh Paper | 0.001030610 | 0.037971784 | 0.00000000 |
KHFZ1 | Hafez Tile | 0.001360247 | 0.034445157 | 0.00000000 |
SINA1 | Sina Tile | 0.001475497 | 0.035697371 | 0.00000000 |
GSBE1 | S*Sabet Khorasan | 0.001100571 | 0.039257442 | 0.00000093 |
SGAZ1 | Glass and Gas | 0.001398848 | 0.032367836 | 0.00000000 |
NSAZ1 | Azar Refract. | 0.001403544 | 0.040471042 | 0.00000000 |
PRDZ1 | Pardis Petr. | 0.001162554 | 0.026283206 | 0.00000000 |
GMRO1 | Marvdasht Sugar | 0.000753084 | 0.037088055 | 0.00000000 |
DJBR1 | Jaber Hayan P. | 0.000826543 | 0.028152671 | 0.00000000 |
LEAB1 | Loabiran | 0.000920999 | 0.038283793 | 0.00000000 |
PSIR1 | Iran Glass Wool | 0.001613339 | 0.040593419 | 0.00000000 |
PARS1 | PARS Petrochemical | 0.009569826 | 0.456611305 | 0.00000000 |
AYEG1 | Pardis Investment | 0.000686203 | 0.028055767 | 0.00000000 |
OFRS1 | Fars Dev. | 0.001079131 | 0.029406048 | 0.00000000 |
BALI1 | Buali Inv. | 0.001051918 | 0.027236084 | 0.00000000 |
NIKI1 | Iran N. Inv. | 0.000870253 | 0.027164513 | 0.00000000 |
NOVN1 | S*EN Bank | 0.000375910 | 0.027357668 | 0.00000000 |
BANK1 | Bank Melli Inv. | 0.000973894 | 0.028283938 | 0.00000000 |
SHMD1 | Hamadan Glass | 0.001266110 | 0.031654296 | 0.00000000 |
NBEH1 | Behran Oil | 0.000583673 | 0.030999924 | 0.00000000 |
PARK1 | Shazand Petr. | 0.001160479 | 0.029525221 | 0.00000000 |
NKOL1 | NiroCholor | 0.000932952 | 0.033167129 | 0.00000072 |
ATDM1 | Atye Damavand | 0.001318406 | 0.034597556 | 0.00000061 |
SKER1 | Kerman Cement | 0.001018504 | 0.030123724 | 0.00000000 |
BHMN1 | Bahman Group | 0.000944734 | 0.034423779 | 0.00000000 |
Table 3: Continu | ||||
LSMD1 | Ind. & M. L. | 0.000681585 | 0.028029014 | 0.00000000 |
DARO1 | Daroupakhsh | 0.000995533 | 0.025342841 | 0.00000000 |
ROOI1 | Iran Zinc Mines | 0.001059548 | 0.028173917 | 0.00000000 |
GESF1 | Isfahan Sugar | 0.001625476 | 0.037742167 | 0.00000000 |
SADB1 | Ardebil Cement | 0.001266883 | 0.050932183 | 0.00000000 |
TMEL1 | Tosee Melli Inv | 0.000733132 | 0.026703669 | 0.00000081 |
GOST1 | Iran Kh. Inv. | 0.001506039 | 0.044675801 | 0.00000000 |
GHND1 | Khoy Sugar Co. | 0.000804069 | 0.033054518 | 0.00000095 |
FKAS1 | Khorasan Steel Co. | 0.000704230 | 0.020336541 | 0.00000000 |
GLOR1 | Lorestan Sugar | 0.001241364 | 0.040981226 | 0.00000000 |
SIMS1 | Shomal Cement | 0.001794054 | 0.056037386 | 0.00000000 |
INFO1 | Inf. Services | 0.000226005 | 0.029763713 | 0.00000000 |
BALB1 | S*Alborz Bimeh | 0.000578690 | 0.033655504 | 0.00000000 |
MNGZ1 | Iran Mn. Mines | 0.001114845 | 0.042336068 | 0.00000062 |
Table 4: Portfolio Optimization at The Maximum Point
Portfolio Return | 0.016964707 |
Portfolio Variance | 0.66690739 |
Portfolio Standard Deviation | 0.816643979 |
After solving the optimization equation to maximize the expected return level based on a given level of average standard deviation, Table 3 is obtained. It should be highlighted that to attain this target, nearly all stocks are excluded from the portfolio except for MDKO1. MDKO1 has all shares (weights) in the portfolio by 0.99999284 by providing 0.016964821 return and 0.816649823 standard deviations. The best solution for the overall portfolio can be outlined as an average return is 0.016964707 with a minimum standard deviation is 0.816643979, which is shown in Table 4.
Based on all these results, the efficient frontier curve of the portfolio is calculated and shown in Fig 9 as follows:
Fig. 9: The Efficient Frontier Curve of the Portfolio |
The efficient Frontier Curve underpins portfolio theory. This curve shows the best rate of return an investor can obtain against the risk. The Efficient Frontier Curve shows the portfolio with the highest return at a given risk level or the portfolio with the lowest risk against a specific return target. Points above the curve in the graph represent optimal portfolio returns.
The variance matrix of stocks according to coding in MATLAB is shown below:
Fig. 10: Variance Matrix between Stocks |
4 Conclusion
Today, one of the major concerns of investment managers is optimal decisions in a large volume of information and data on stocks and capital markets. Especially when investment diversification increases, optimal decision-making is very important given the limits of expected returns and the level of risk [21]. The two basic criteria of portfolio management are risk and portfolio return, respectively. Modern portfolio optimization led by Markowitz establishes a quantitative relationship between return and risk. An investor can obtain the average expected return at the minimum risk level or the maximum return at the average risk level In this paper, we studied the Markowitz model to optimize the stock portfolio in the period from January 2012 to October 2022 period. The stock price return was calculated daily basis, and the variance and standard deviation of the stock return were calculated based on the calculated return. The main objective of this study is to create a portfolio allocation that provides the average expected return at the minimum risk level and the maximum expected return at the medium risk level. When the analysis is performed to obtain the average expected return at the minimum risk level of the portfolio of stocks, 11 stocks are not included in the optimal portfolio. FKAS1, BPAS1, DARO1, and KHFZ1 shares have the highest shares in the optimal portfolio with 0.160261367, 0.068251542, 0.063891668, and 0.051238428, respectively. The average return of the portfolio that fulfills the minimum risk level average return requirement was determined as 0.000956657 and its standard deviation as 0.009602922. When the analysis is made to obtain a maximized expected return at the average risk level of the portfolio, only MDCO1 stock is included in the optimal portfolio. In other words, the optimal portfolio has only MDCO1 stock and its expected return is 0.016964707. The expected return of the portfolio that fulfills the average risk level with maximized return requirement was determined as 0.016964707 and its standard deviation as 0.816643979.
In the next section, we identified the minimum spanning tree (MST) structure in the portfolio consisting of 50 stocks traded in the Iranian stock market. To detect the minimum spanning tree (MST) of the stock, we used the simultaneous correlation coefficient of the daily difference of the logarithm of the closure price of stocks. According to the minimum spanning tree structure, the stock network is divided into several clusters, and each cluster contains approximately one industry. In conclusion, the main target of this paper is to link stocks traded in a financial market, which has associated with a meaningful economic taxonomy. The present study shows that it is possible to determine an MST starting from the distance matrix of equation (4). The detected MST might be useful in the theoretical description of financial markets and the search for economic factors affecting specific groups of stocks. The classification associated with the MST structure is obtained by using information present in the time series of stock prices only. This result shows time series of stock prices are carrying valuable economic information.
References
[1] Deng, G. F., Lin, W. T., and Lo, C. C., Markowitz-based portfolio selection with cardinality constraints using
improved particle swarm optimization, Expert Systems with Applications, 2012; 39(4): 4558–4566. doi: 10.1016/j.eswa.2011.09.129
[2] Engels, M., Portfolio Optimization : Beyond Markowitz, A master thesis in University of Leiden, 2004.
[3] Hernandez, J. A., Are oil and gas stocks from the Australian market riskier than coal and uranium stocks ?
Dependence risk analysis and portfolio optimization, Energy Econ., 2014; 45:528–536. doi: 10.1016/j.eneco.2014.08.015
[4] Palczewski, J., Poulsen, R., Schenk-Hoppé, K. R., and Wang, H., Dynamic portfolio optimization with
transaction costs and state-dependent drift, European Journal of operational research, 2015; 243(3): 921–931.
doi: 10.1016/j.ejor.2014.12.040
[5] Logubayom, A. I., and Victor, T. A., Portfolio Optimization of Some Stocks on the Ghana Stock Exchange
Using the Markowitz Mean-Variance Approach, Journal of Financial Risk Management, 2019; 8(01): 29–
41.doi: 10.4236/jfrm.2019.81003
[6] Hali, N. A., and Yuliati, A., Markowitz Model Investment Portfolio Optimization : a Review Theory,
International Journal of Research in Community Services, 2020; 1(3):14–18.doi: https: 10.46336/ijrcs.v1i3.104
[7] Li, B., and Zhang, R., A new mean-variance-entropy model for uncertain portfolio optimization with liquidity
and diversifica-tion, Chaos, Solitons & Fractals, 2021; 146: 110842.doi: 10.1016/j.chaos.2021.110842
[8] Barbi, A. Q., and Prataviera, G. A., Nonlinear dependencies on Brazilian equity network from mutual
information minimum spanning trees, Physica A: Statistical Mechanics and its Applications, 2019 ; 523: 876–
885.doi: 10.1016/j.physa.2019.04.147
[9] Kumar, S., Kumar, S., and Kumar, P., Diffusion entropy analysis and random matrix analysis of the Indian
stock market, Physica A: Statistical Mechanics and its Applications, 2020; 560:125122.doi: 10.1016/j.physa.2020.125122
[10] Coletti, P., Comparing minimum spanning trees of the Italian stock market using returns and volumes,
Physica A: Statistical Mechanics and its Applications, 2016; 463: 246–261.doi: 10.1016/j.physa.2016.07.029
[11] Bonanno, G., Caldarelli, G., Lillo, F., and Mantegna, R. N., Topology of correlation-based minimal
spanning trees in real and model markets, Physical Review E, 2003; 68(4): 4–7.doi: 10.1103/PhysRevE.68.046130
[12] Wang, J., Zhao, L., and Huang, R., A network analysis of the Chinese stock market, Physica A: Statist.
Mech, Appl, 2009; 388(14): 2956–2964.doi: 10.1016/j.physa.2009.03.028
[13] Peng, C.K., Buldyrev, S.V., Havlin, S., Simons, M., Stanley, H.E. and Goldberger, A.L., Mosaic organization of DNA nucleotides, Physical review e, 1994; 49(2):1685.doi: 10.1103/PhysRevE.49.1685
[14] Huang, C.F., A hybrid stock selection model using genetic algorithms and support vector regression,
Applied Soft Computing, 2012; 12(2): 807-818.doi: 10.1016/j.asoc.2011.10.009
[15] Li, T., Zhang, W. and Xu, W., A fuzzy portfolio selection model with background risk, Applied
Mathematics and Computation, 2015; 256: 505–513.doi: 10.1016/j.amc.2015.01.007
[16] Tumminello, M., Aste, T., Di Matteo, T. and Mantegna, R.N., A tool for filtering information in complex
systems, Proceedings of the National Academy of Sciences, 2005; 102(30):10421–10426.doi.org/10.1073/pnas.0500298102
[17] Onnela, J. P., Chakraborti, A., Kaski, K., and Kertesz, J., Dynamic asset trees and Black Monday, PhysicaA:
Statistical Mechanics and its Applications, 2003; 324(1-2) :247–252.doi: 10.1016/S0378-4371(02)01882-4
[18] Heimo, T., Saramäki, J., Onnela, J. P., and Kaski, K., Spectral and network methods in the analysis of
correlation matrices of stock returns, Physica A: Statistical Mechanics and its Applications, 2007; 383(1):
147–151.doi: 10.1016/j.physa.2007.04.124
[19] Mangram, M. E., A simplified perspective of the Markowitz portfolio theory, Global journal of business
research, 2013; 7(1)P59–70.
[20] Gasser, S. M., Rammerstorfer, M., and Weinmayer, K., Markowitz revisited: Social portfolio engineering,
European Journal of Operational Research., 2016; 258(3):1181-1190.doi: 10.1016/j.ejor.2016.10.043
[21] Zanjirdar, M., Overview of portfolio optimization models, Advances in mathematical finance and
applications, 2020 ; 5(4):419–435.doi: 10.22034/amfa.2020.1897346.1407
[22] Fabozzi, F.J., Markowitz, H.M. and Gupta, F., 2008. Portfolio selection. Handbook of finance, 2.
[23] Kalayci, C. B., Ertenlice, O., and Akbay, M. A., A comprehensive review of deterministic models and
applications for mean-variance portfolio optimi-zation, Expert Systems with Applications, 2019; 125:345–
368.doi: 10.1016/j.eswa.2019.02.011
[24] Ozyesil, M., Markowitz Portfolio Optimization Model: An Application On Listed Firm On Borsa Istanbul-
30 National Stock Index (Bist-30), no. February, 2021.
[25] Chen, W., Zhang, H., Mehlawat, M. K., and Jia, L., Mean–variance portfolio optimization using machine
learning-based stock price prediction, Appl. Soft Comput, 2021; 100, p.106943.doi: 10.1016/j.asoc.2020.106943
[26] Kolm, P. N., Tütüncü, R., and Fabozzi, F. J., 60 Years of portfolio optimization: Practical Challenges and
current trends, European Journal of Operational Research, 2013;234(2):356-371.doi: 10.1016/j.ejor.2013.10.060
[27] Li, H., Mao, W., Zhang, A., and Li, C., An improved distribution network reconfiguration method based on
minimum spanning tree algorithm and heuristic rules, International Journal of Electrical Power & Energy
Systems, 2016; 82: 466–473.doi: 10.1016/j.ijepes.2016.04.017
[28] Xue, L., Chen, F., Guo, S., Fu, G., Li, T., and Yang, Y., Time-varying correlation structure of Chinese stock
market of crude oil-related companies greatly influenced by external factors, Physica a: Statistical Mechanics
and Its Applications, 2019; 530:121086.doi: 10.1016/j.physa.2019.121086
[29] Bonanno, G., Caldarelli, G., Lillo, F., Micciche, S., Vandewalle, N., and Mantegna, R. N., Networks of
equities in financial markets, The European Physical Journal B, 2004; 38(2): 363–371.doi: 10.1140/epjb/e2004-00129-6
[30] Bonanno, G., Lillo, F., and Mantegna, R. N., High-frequency cross-correlation in a set of stocks,
Quantitative Finance, 2001; 1:1469-7688. doi: 10.1080/713665554
© 2024. All rights reserved. |