INVESTMENT PORTFOLIO ANALYSIS BY USING NEURAL NETWORKS

,


Introduction
The best investment decisions are readily available with full details of the instruments to which we want to invest. However, any future price variation decisions are made in an uncertain manner. Insight is a great feature of the investor that leads to success if an investor is able to analyse historical data and use analysis and forecasting algorithms.
Nowadays, artificial intelligence helps to find the best information and use it for the best predictions to find optimal investment portfolio. For financial analysis, the best choice is the field of artificial intelligence, e.g., neural networks, and in particular, the neural network recurrent architecture of long short memory cell (Choi, 2018;Hanson, 2017;Liu, 2016;Maknickienė, Rutkauskas, & Maknickas 2011).
The main purpose of the article to compare the formation of portfolios and to make predictions about how it will change. The main objectives highlighted to achieve the purpose of the article are as follows:  to perform the analysis of the methods and measures of the optimal investment portfolio and predictions of changes of the portfolio;  to find the best neural network for forming the investment portfolio and predictions;  to make the models of the neural network to format the optimal portfolio and compare with the equal asset allocation investment portfolio;  to find the profitable form of the investment portfolio;  to analyse and assessment predictions for the optimal portfolio and the equal portfolio. The structure of the paper is as follows: We start with an overview of previous research in a literature review; then, the methodology of the research is presented in the methodology section; the paper is finished with a discussion of the results, conclusions and suggestions. This study differs from others because it uses the business condition state, e.g., optimistic and pessimistic, to determine the probable states through the neural network.

Portfolio formation in uncertainty
Unpredictability is a headache almost of all financial markets participants. Every person wants to know how much money he or she can obtain in a period of time and the risk for that opportunity. The first scientist who developed a model to calculate risk and expect a return at the same time was Markowitz. The main publication about that concept was published in 1952 (Markowitz, 1952(Markowitz, , 1959. Markowitz"s theory is based on several prerequisites that comprised the basis for other investigations:  Investors determine every investment opportunity based on the probability distribution for the expected return on investment for a given period (Lopez de Prado et al. (2018);Benaroch, (2018)).  Investors seek to maximize the expected benefits for the investment period, and their utility curves show decreasing marginal profitability (Morgan & Tumlinson, 2018).  Investors measure portfolio risk based on the variability of expected returns (Guiso et al. 2018).  Investors make decisions based only on risk and return, so their utility curves are the function of expected return and the standard deviation of expected return.  At the same level of risk, investors prefer a portfolio with higher returns, and under a fixed rate of return, investors will prefer less risk to more risk (Reilly & Brown, 2012). All investors and financial institutions make some predictions based on changes in the situation of the market. The answers are based on business cycles, and every investor should know how to understand the patterns of the market situation. The economy always experiences a period of expansion and contraction, but the duration and amplitudes of those cycles can be irregular. Those periodic patterns of recession and recovery are called business cycles (Bodie, Kane, & Marcus, 2014). All situations are periodic, so investors can predict changes if they use some support systems. The support systems require information about changes in the financial market and the velocity of getting information, and that information is related to economic cycles. The first step of the investment process is choosing the investment products, then creating the model of business cycles, and lastly making the expected return of all chosen products during the process are related to the business cycle: rapid and increasing growth, stable growth, equilibrium, stable decline, rapid decline (Rutkauskas & Martinkutė, 2007). The support systems of the present time are based on different achievements of computational intelligence. Artificial intelligence is the key of this study to format an investment portfolio, and to study the prediction support system using algorithms of artificial intelligence of the new generation, the neural network of recurrent long short memory cell architecture (LSTM) is used in this work. Two great scientists, Sepp Hochreichter and Jurgen Shmidhuber, introduced a recurrent neural network with an architecture of an LSTM cell in 1997 (Shmidhuber & Hochreichter, 1997). In 1999, Felix Gers, Jurgen Shmidhuber and Cummins for the LSTM neural network introduced a very important part of the cell, a forget gate (Gers, Schmidhuber & Cummins, 2000). In 2000, Felix Gers and Jurgen Shmidhuber added peephole connections into LSTM architecture (Gers, 2001). All those inventions produced capabilities to predict financial, weather, translate text from one language to another, filter spam and other capabilities (Persio & Honchar, (2016). Nelson et al. (2017), Roondiwala et al. (2017) and Samarawickrama and Fernando (2017) used neural networks based on LSTM for stock market moment prediction. Hansson (2017) predicted stock return, while Zhuge, Xu and Zhang (2017), as well as Zhang and Tan (2018), proposed models based on the memory cell for selecting stocks.
However, one study has not combined the study of LSTM neural networks, business condition state, Markowitz modern portfolio theory, financial prediction, and formation optimal portfolio. This paper fills that gap and addresses the open question of improving financial prediction by using neural networks.

Selection of instruments and prediction models
Our research studied the period from 2014-01-01 to 2018-12-31. This period is the period of economic growth after the economic crisis. In 2014, Russia's intervened in Ukraine, which forced countries around the world to be concerned about security, increase investment in the military industry, and understand the impact of technology in this process. Unchanged national borders and trade markets have become very vulnerable, and the trade war between the United States and China in 2018 is becoming a real expression of this uncertainty, compromising stock price growth.

Selection of investment instruments
Selection of investment instruments was based on technological companies. For the investigation, we created two portfolios: the IT portfolio and ETF portfolio. The S&P 500 index was used as a benchmark for comparing changes in the market and in portfolios. Those financial instruments were chosen because of the large capitalization of IT firms and their Net Assets in ETF indexes. These instruments were chosen because of the large changes in the price of stock or index (see Table 1 Table 1 and Table 3).  Table 2 and Table 3).  The price changes of the securities in the portfolios allow us to select the final instruments to investigate the investment portfolios (Table 3). Historical data from 2014-01-01 to 2019-01-01 of the selected instruments were used to predict the future behaviours of the prices at the time of investment.

Models for predictions
The main model, based on the architecture of the recurrent neural network LSTM cell, was created by Sepp Hochreichter and Jurgen Shmidhuber (Shmidhuber & Hochreichter 1997). In this investigation, we adapted the LSTM prediction model, and its schema is shown in Table 4 and Figure 3.
The LSTM neural network was formatted from four neural layers. The first input layer was formatted from 10 neurons and the hyperboloid tangent activation function was for this layer, the second and third layers were formatted from 512 neurons and the rectified linear unit activation function was used, and the last output layer had equal portfolio models with 2 neurons. For the optimal portfolio model, it was formatted from 12 neurons for the ETF and IT portfolios, and the S&P 500 index model was formatted by 1 neuron and used the linear activation function for the last layer.   This prediction model gives a single point prediction for each instrument. This numerical information is the basis for investment portfolio formation.

Models for portfolio formation
Investors can calculate risk and expected a return by using models for portfolio formation. Expected return is calculated as a weighted average of every financial instrument that can be an investment portfolio, as described in the following equation (Valentinavičius, 2010): where p ER is the expected portfolio profitability, i W is part of invested funds for instrument i, i ER is the expected profitability of instrument i, and d is the number of instruments in the portfolio. The main purpose of the modern Markowitz portfolio theory is to determine the investors' possibilities to obtain a greater return on financial instruments for a given level of tolerated risk (Kvietkauskienė, 2014). In this research, the allocations of the financial instruments for the portfolios for the optimal portfolios were determined by the prediction results of the neural network. This article investigates three models for the predictions. The first model is the Optimistic prediction model with equal investment in securities and formatted for the following business cycle probabilities to occur: rapid growth -0.4, stable growth -0.3, equilibrium -0.2, stable decline -0.06, and rapid decline -0.04 (see Table 5). The second model is the Pessimistic prediction model with equal investment formatted for the following business cycle probabilities to occur: rapid growth -0.06, stable growth -0.3, equilibrium -0.4, stable decline -0.2, and rapid decline -0.04 (see Table 6). The third model was created for the formation of an optimal investment portfolio. The main criterion for the optimal portfolio is a larger return. The financial instruments were studied from a five-year period comprising 2014 to 2018. The formations of two portfolios from all three prediction models were chosen from 10 ETF funds and 10 IT firms (see Error! Not a valid bookmark self-reference.), and the benchmark investment was the S&P 500 index (Finance Yahoo, 2018) (see Table 5 and Table 6). The prediction process used the neural network, i.e., the recurrent LSTM architecture.

Comparison of investment portfolios
Forecasting can determine the solution for the portfolio formation. The first result of the experiments is the investment portfolio with an equal allocation of financial instruments (see Figure 4 and Figure 5.). The best forecasting return based on the Optimistic strategy is for the IT portfolio at 35.72 per cent, the second-best return is for the ETF portfolio at 19.32 per cent, and the return for the benchmark portfolio S&P 500 index is 12.80 per cent. The best forecasting return based on the Pessimistic strategy is for the IT portfolio at 8.67 per cent, the second-best return is for the ETF portfolio at 8.34 per cent, and the return for the benchmark portfolio S&P 500 index is 8.02 per cent. The largest risk in the Optimistic strategy is for the IT portfolio at 24.06 per cent, the second-largest risk is for ETF portfolio at 13.43 per cent, and the risk for the S&P 500 index is 8.78 per cent. The largest risk based on the Pessimistic strategy is for the ETF portfolio at 10.40 per cent, the second-largest risk is for IT portfolio at 7.86 per cent, and the risk for the S&P 500 index is 5.69 per cent. The best choice in the Optimistic and Pessimistic strategies for formatting the portfolio is using an IT portfolio.

Optimistic Strategy of Portfolio with Allocation Equal
Return Standard Deviation The second experiment is to format an optimal portfolio. The main purposes of the optimal portfolio are maximum return and minimum risk, and the measure of the effectiveness of the portfolio was the Sharpe ratio. The allocation of the IT optimal portfolio that provided the maximum return, 41 per cent, is shown in Table 7. The allocation of the IT optimal portfolio based on providing minimum risk, which is a standard deviation of 16 per cent, is shown in Table 8. The allocation of the ETF optimal portfolio based on maximum return, 15 per cent, is shown in Table 9. The allocation of ETF optimal portfolio based on minimum risk, which is a standard deviation of 17 per cent, is shown in Table 10. The efficiencies of the selected portfolios are compared in Table 11. The best choice of the optimal portfolio is the IT portfolio. It has a higher return with 41 per cent of return and a higher Sharpe ratio of 1.7. The worst choice is the benchmark portfolio S&P 500 index; it only has a return of 7 per cent and a Sharpe ratio of 0.39.

Pesimistic Strategy of Portfolio with Allocation Equal
Return Standard Deviation IT companies are attractive investments because of the large expectations regarding profit growth in the future. However, the history of investment provides examples of investment bubbles and big losses when the opinions regarding the future of new discoveries are greatly overstated.

Conclusions
The investigation reveals that we can use artificial intelligence to automate the parsing of the information from the global world of information and to search for some patterns for financial decisions.
Results from this study have led to a deeper understanding of how to work with neural networks. The experiments have revealed that neural networks can be used for different tasks to obtain answers for financial analysis. We can conclude that investors and speculators should use neural networks to investigate the financial market.
Based on the current research presented in the paper, as well as the results of previous researches, the authors confirm that for the best choice for prediction models is useful the recurrent neural network of the LSTM cell. This architecture of neural network has memory and allows the use of the network for time series researches and experiments.
The investigation reveals that the best investment portfolio is the IT portfolio because this portfolio generated 8.67 per cent revenue in the pessimistic model, 35.72 per cent of revenue in the optimistic portfolio, and generated 41 per cent revenue in the optimal portfolio for the next financial year. The worst results showed the S&P 500 index benchmark portfolio, as it generated 8.02 per cent revenue in the pessimistic model, 12.8 per cent in the optimistic model, and just 7 per cent in the optimal model in the next financial year. All those results are for the neural network and for suggestions and not for imperative decisions.
The investigation reveals that investors and speculators should always have pessimistic and optimistic models for investment solutions. This research also shows that the neural network or other algorithms of artificial intelligence can help determine the strategies because the neural network provides probability measurements of bad or good situations occurring.