A Monte Carlo simulation technique to determine the optimal portfolio

Article history: Received October 28, 2013 Received in revised format 25 November 2013 Accepted 19 January 2014 Available online January 21 2014 During the past few years, there have been several studies for portfolio management. One of the primary concerns on any stock market is to detect the risk associated with various assets. One of the recognized methods in order to measure, to forecast, and to manage the existing risk is associated with Value at Risk (VaR), which draws much attention by financial institutions in recent years. VaR is a method for recognizing and evaluating of risk, which uses the standard statistical techniques and the method has been used in other fields, increasingly. The present study has measured the value at risk of 26 companies from chemical industry in Tehran Stock Exchange over the period 2009-2011 using the simulation technique of Monte Carlo with 95% confidence level. The used variability in the present study has been the daily return resulted from the stock daily price change. Moreover, the weight of optimal investment has been determined using a hybrid model called Markowitz and Winker model in each determined stocks. The results showed that the maximum loss would not exceed from 1259432 Rials at 95% confidence level in future day.


Introduction
During the past few decades, there have been tremendous changes on financial markets and financial market is over 70% of the market (Fan et al., 2004).The interests in stock market in some developing countries have been tremendous especially in Tehran Stock Exchange and some people have tried to determine the level of risk associated with the market (YekkeZareh, 2010).There were also people who were interested in evaluation of relationships between credit, operational, market risks in banking industry in Iran (Abyak, 2012).Raiee and Saeedi (2004), in other work, presented an empirical investigation for measuring, predicting and risk management called Value at Risk (VaR).In this work, authors paid special attention on financial organizations, banks, and investment market managers from different countries.Fusai and Luciano (2001) considered value at risk (VaR) in order to evaluate the risk rate and selected the optimal portfolio.According to Khiabani and Sarouqi (2011), it can be expected that the mentioned portfolio VaR would have the greatest loss at appointed time (one day, week, and month) and in certain confidence level.The main challenge in measuring VaR is the selecting method, which can measure the most accurate VaR for risk and asset return.Nasrollahi et al. (2010) applied the recent and modern methods such as Monte Carlo simulation technique for investment risk management and optimal portfolio selection based on increasing advance of stock exchange in Iran.Monte Carlo simulation technique can introduce endless scenarios using clear statistical assumptions.The assumptions indicate probable distributions form for changes in market factors as well as distributions from portfolios interests and losses can be stimulated using the standard numerical techniques.
Therefore, the present study aims at measuring VaR of an assumed portfolio from firms' shares using Monte Carlo simulation technique.The firms are members of chemical industry, which exist in Tehran Stock Exchange and the optimal portfolio is formed under a compound model.The present paper includes six sections.After introduction, the literature review, the proposed model of this paper is introduced.Models used for measuring VaR and for determining optimal portfolio are introduced in fourth section.Moreover, obtained results from models estimating entitled "research results" are presented.Finally, sixth section deals with accumulating, concluding, and offering suggestions for further research.

Literature Review
According to Jorion (2007), VaR has roots in severe financial crisis where the most companies including Orange County, Metal Gessel Sheft and Daiva were entangled in 1990s.We can learn a common and important lesson from the crisis that billion dollars may be lost due to poor management and supervision on financial risks.Consequently, it is expected that financial institutions and legislators paid much attention to VaR, which is an intelligible method to quantify the market risk rate.Eqbalnya (2005) stated that VaR method could be considered as a statistical criterion for measuring portfolio losses.VaR measures and quantify the expected maximum loss of an asset or portfolio during the certain time and confidence level.According to Raiee and Saeedi (2004), the risk in investment portfolio including financial tools can be measured just through VaR index.
According to Rasouli (2004), unlike the traditional assessment of risk, VaR presents a general and comprehensive view, consequently, VaR is actually risk assessment with a forward view.Gallati (2003) used VaR technique in terms of parametric and non-parametric.Parametric method can be described by variance-covariance and some analytic methods while non-parametric method includes historical simulation and Monte Carlo simulation method.Utilizing each of VaR measurement method is to some extent influenced by needs of analysts and decision makers of organization, type of assets, which is under the study, the degree of accuracy and speed in measuring and other considerations.Kwak and Ingall (2007) explored Monte Carlo simulation applications for project management and many other firms have used Monte Carlo simulation as a tool in order to make decisions.
According to Choudhry (2006), a large number of simulations are carried out based on correlations and fluctuations estimated by the risk manager while one simulation differs from the other one but generally, simulation comes closer to statistical parameters.Thus, there will be more possibility that value at estimated risk have bigger accuracy.Raiee and Saeedi (2004) explained that there would be no need to assume the return maintains a normal distribution.Rather, forecasting of future changes will be accomplished using the random processes and using simulation technique.
According to Moradi and Akhtarkavan (2009), optimization issues have received much attention under various criteria, which may be in conflict.Various goals and criteria may have different measurement scales.Solving these problems either means designing or selecting the best answer among available options.Multi criteria decision-making is a choice, which deals with decision process in the presence of different and rather inconsistent.
As mentioned above, VaR can be taken into account as a new approach.However, it has had a quick evaluation and growth in the short period of time.One reason of rapid spread has been legislators' emphasis on use of methodology of value at risk in financial institutions, investors firms, and banks.According to conducted literature review, what can be recognized is the efficiency of VaR model in order to determine investment risk in financial portfolio.Nowadays, in addition to various criteria, other issues associated with optimal determination of stock for investment strategies, which could lead to the maximum efficiency have been also drawn much attention.Therefore, there was no research included these both aspects.Some conducted research, which includes just one aspect, are discussed next.Fan et al. (2004) measured VaR of supplied shares in China Stock Exchange in Politics and Management Institution of Science Academy.They reported the comparison between the value at predicted risk and real efficiency with 95% the confidence level.Finally, results indicated that Stock Exchange fluctuations of China was considerable and Shenzen Stock Exchange fluctuations was larger than Shanghay Stock Exchange ones.Glasserman et al. (2000) presented a Monte Carlo method for measuring Value at Risk.They described different methods that applied the best and the salient features of both methods.The preliminary results showed that the mentioned methods had the least effect in normal situations.Eqbalnya ( 2005) used two methods of exponential weighted moving average, and simple moving average by use of VaR concept in order to manage investment risk by parametric VaR method and predicted return fluctuations.In this study, logarithm efficiency of cashed return index as well as securities costs were measured daily over the period 1999-2005 and VaR was measured at 3 confidence levels of 99%, 97.5%, and 95%.Examining the efficiency and accuracy of designed model indicated that the mentioned model could rely on both methods of exponential weighted and simple method average at 95% confidence level, while it was not appropriate for high confidence level (95% & 97%).It was consistent with suggesting of standard metric risk system based on use of 95% confidence level.Vakilzadeh (2007) dealt with measuring market risk by considering one million Rials currency portfolio in one future day by parametric methods and non-parametric.The researcher carried out the Monte Carlo simulation to prevent of process lengthening, merely for American dollar.Ahmadi and Shahryar (2007) first used parametric methods such as simple variance-covariance based on autoregressive conditional variance and generalized autoregressive conditional variance, in order to measure the VaR of four companies mentioned stock in Tehran Stock Exchange.The research variable included the daily return from daily price change of considered stock.At last, the results showed that it would be better for investors to devote the highest value of investment for Melli bank investment stock and the lowest value of investment to Qadir investment stock.
Barjasteh Maleki (2009) used VaR as a measurement criterion of risk in making optimal stock basket in Tehran Stock Exchange by measuring VaR method using parametric method and 15-day return of 100 companies based on Markowitz model over the period 2001-2006.The different optimal baskets would be made by change of value at risk parameters and the parameters and confidence level were approved and accepted by investors.RajabipourMeibodi (2010) measured VaR through Monte Carlo simulation technique using VaR regarding optimal portfolio determination.Accordingly, the researcher considered the companies' stock of automobile industry in Stock Exchange as a sample.The results indicated that the maximum rate of possible loss in 95% confidence level would not exceed of -10205507 per month.Moreover, the researcher made attempt to make an optimal portfolio using his/her own suggested model after measuring VaR of single stock and the total portfolio.Salehi Sedaghiani (2010) measured investment risk using VaR in currency portfolio including five current foreign exchanges in Iran Transaction Market (dollar, Pond, Frank, Yen and Euro).Furthermore, value of each foreign currency would be determined in a currency portfolio through minimizing investment portfolio risk of optimal value.The results indicated that there would not be the losses more than 8.67 Rials with the possibility of 95% currency portfolio and investment for period of 10 days.Moarrefian (2010) designed a particular simulation for measuring VaR for Tehran stock exchange.The researcher could measure VaR using the Monte Carlo simulation.Obtained results from simulation showed the higher accuracy of semi-Monte Carlo simulation for measuring VaR in Tehran stock exchange.Talebnya and Fathi (2010) showed that selection of stock optimal portfolio would be equal (same) through Markowitz model and VaR.Besides, the results of the selection of stock optimal portfolio in Iranian investment market would be equal through Markowitz Model and VaR at 90%, 95%, and 99% confidence level.Xu and Zhang (2012) considered a random planning model in which goal function was a random variance and limitation function was expected value of random a function.Instead of using tree scenario, the recognized sample approximated average method was suggested for solving the function.

Research Questions
The proposed study of this paper tries to determine the asset allocation using Monte Carlo simulation technique.The study also measures the value at risk for each individual firm, analyzes the behavior of the model and provides sensitivity analysis.The selection process includes firms in chemical industry over the period 2009-2011 and the information must be available.In our study, 26 out of 31 companies were qualified and the research method was based on descriptive methods.The present study has measured VaR from daily return variable resulted of daily price change.Moreover, confidence level was assumed at 95%.Measurement steps of VaR for considered portfolio investment will be as follows: Step 1: The daily return rate amount of each share (price change) has been measured regarding that daily last transaction price of considered sample stock as well as the following equation: , where , will be i th stock price at t th day, , will be i th stock price at (t-1) th day, and , will be the i th asset return at t th day.
Step 2: The process of each price return has been accomplished using Crystal Ball Software and the optimal forecasting is determined for the next period return.
Step 3: It was assumed that there were 26 stock sets with equal amount in form of an investment portfolio and 1 billion Rials with equal amount should be invested in the selected stock.The present study, which was based on daily price change of active companies stocks in the chemical products industry, required the historical return of several periods in order to recognize the type of distribution.
In the present research, each return forecasting would be distributed, separately, considered as a preassumed variable of model, and finally the appropriate distribution has been selected and approved.Actually, the software described the possible changes of the market agents more logically in selection of each distribution.According to the available data, software has selected the appropriate distribution, among different types of distributions, based on particular estimations in software.The distribution has been recognized and the preceding returns of each stock would be allocated to the prediction of the next period return.
Step 4: The obtained return amounts, which can be considered as a prediction for the next period would be multiplied by investment amounts of each stock, separately.The obtained predicted answer of return value or loss for the next period would be in Rial.It would be regarded as a prediction variable in model (for stimulation).
Step 5: The step included simulation after passing processes of determining and defining of assumptions, particular distribution and prediction amounts.Crystal Ball Software at 95% confidence level has accomplished the simulation with 10000 scenarios (Berry, 2009).Actually, Monte Carlo simulation produced the random numbers.In sum, simulation process of Monte Carlo conducted in this software can be presented in form of an algorithm as follows.

Yes
No (Landeaux, 2002, p11) What can be received as a final report from the software, will be the collection of various figures.It would be important that the confidence level can be easily changed just by mouse movement and predicted VaR would be determined.Selection for the worst possible condition, indicated amount of 5% value at invested risk in each stock.
Step 6: After measuring VaR of each stock as well as the whole portfolio, optimal portfolio would be made.In this stage, two goals would be considered for all investors.The first goal, based on optimization issue of Winker-Maringer, maximizes the expected return.The second goal is based on Markowitz optimal portfolio theory.Combining these two models, we will be able to create a newer model in order to calculate the optimal investment rate in each stock.Actually, the aim of the mentioned combined model is to minimize the investment portfolio and to maximize the expected return.More specifically, in the first phase, the problem would be just solved by goal function, which may be recognized more important along the existing limitations (Max goal function was selected as the first priority).Moreover, the optimal solution has been provided by the software indicated the maximum expected return.

Research findings
Table 1 demonstrates the summary of return forecasted value for the next period.After passing the mentioned phases, the results obtained from simulation are presented as frequency figures.It is noteworthy that results would be achieved by the trial of 1000 scenarios.One example of frequency figures are presented in Fig. 1    As shown in Table 2, the highest and the lowest risk stock of portfolio in terms of VaR, has been Pars Pamchal (Sh-pamcha) and Kaf Company (Sh-kaf), respectively.After passing these phases, stock optimal compound determination has been accomplished.In order to solve the mentioned compound model, average statistical indices and daily return variance of stock should be determined regarding the obtained return price (price change).The amounts mentioned above are presented in Table 3.It is noteworthy that 6 companies called Shdvs, Sh-fara, Sh-sm, Sh-sfha, Sh-pars, Sh-tvly had negative average; consequently, they were not considered in calculations and optimal portfolio selection.present model actually has chosen the best investing value so that the mentioned portfolio could achieve the maximum return and minimum variance, which is an indicator of risk.Regarding this paper, the researcher suggests that future studies put more emphasis on the other tools, financial organizations which receive less attention such as banks, insurance companies, pension funds, other industries, and finally in designing investing baskets.In addition, the suggested model can be used for optimization and evaluation of investing portfolio operation.

Fig. 1 .
Fig. 1.Frequency Figure of Crystal Ball Software to Portfolio VaR Measurement Fig. 1 is an estimated and stimulated distribution of the total stock loss in the form of a portfolio and with the 10000 iterations.As we can observe from Fig. 1, the maximum probable loss would not exceed from -1259432 Rials at 95% confidence level in the next day.Furthermore, we can draw a similar figure for each stock separately and recognize VaR of each stock and also total portfolio are presented in Table 2 as follows.

Table 1
Return Value Forecasting or loss for the Next Period

Table 2
Stock VaR at 95% Confidence Level

Table 3
Stock Statistical Indices