Predicting the optimal time for transactions using fuzzy neural network with technical analysis approach

Number of pages: 136 File Format: word File Code: 31182
Year: 2013 University Degree: Master's degree Category: Management
  • Part of the Content
  • Contents & Resources
  • Summary of Predicting the optimal time for transactions using fuzzy neural network with technical analysis approach

    Master's Thesis of Business Management, Financial Orientation

    Abstract

    In this research, as an example, forecasting of stock trading timings of 17 active companies in Tehran Stock Exchange was carried out. In this way, first the primary data, which includes 3 variables of closing price, the lowest price and the highest stock price during the period of 1388 to the end of 1391 on a daily basis, was collected from the official website of the Tehran Stock Exchange Organization. Then, using these data and defining the relevant functions in the Excel software, relative strength indices (RSI, Convergent-Divergent Moving Average (MACD), Simple Moving Average (SMA, Random Oscillator) Exponential (EMA) and signal line (SL) were calculated. After the step-by-step regression of the input variables of each stock, it was found that the RSI, MACD and the total stock index had an impact on the future 14-day RSI in 94% of the analyzed samples MACD-SL is considered 14 days ahead. Among the independent variables, the closing price has been repeated the most (in almost 76 percent of cases) in 14 days SMA-P prediction networks. The most variable that was identified as the input of EMA-P and SO 14 days prediction networks was the price-to-profit ratio. Among all the variables, dollar and gold are considered as input variables in a lesser proportion. These inputs were used in Matlab software and through Anfisedit graphic interface to train and test the desired network. In such a way, five ANFIS networks were designed to predict RSI, -SL MACD, -P SMA, SO and EMA-P variables for the next 14 days for each stock. Then, using MSE and RMSE criteria and the accuracy percentage of prediction, the performance of the created networks was checked. The results showed that the average prediction accuracy percentage of all created networks (96.55%) is higher than the random state (50%). Then, by applying trading regulations, the predicted values ??were converted into signals. Then it was suggested that the final signal of the designed system be obtained from the sum of the signals created by the mentioned 5 technical indicators. In the next step, a hypothetical transaction was simulated using the proposed trading strategy of the presented model to measure the efficiency of the proposed transactions. Then, the efficiency of transactions based on the final signal of the proposed system was compared with the efficiency of technical methods and purchase and maintenance methods (in two cases before deducting transaction costs and after deducting transaction costs). Considering the positive performance of SMA, EMA, SO indicators and the proposed method, it can be concluded that the trend of stock prices can be predicted using these technical analysis indicators in the Iranian stock market. Among these, the simple moving average method has the highest reliability for predicting stock price trends. As a result, the Tehran stock market has the potential to use various indicators of technical analysis.

    Key words: technical analysis, fuzzy neural network, prediction, Tehran Stock Exchange.

    Chapter 1

    Overview of the research

    Introduction

    The present research was conducted in order to conduct a scientific research. For this purpose, in order to examine the relevant issue, a proper research plan should be prepared, in which the research problem is well defined, its hypotheses are formulated correctly, and the method of data collection and analysis is clear. Therefore, in this chapter, the topic will be explained briefly. In the following, the importance and necessity of conducting research will be examined. Then, the research hypotheses, the basic goals of the research are discussed, and then, the research method, the scope of the research, and the tools used in the research to analyze the information are stated, and the specialized words and corrections are also defined. In the end, due to the large use of abbreviations throughout the text, the definitions and full expressions of the most commonly used terms are displayed in a table. 1- Description and statement of the research problem Investment and capital accumulation have always played a significant role in the economic development of the country. The importance of this factor and its effective role can be clearly seen in the system of countries with a capitalist system. Undoubtedly, the stock market is one of the most suitable places to attract small capitals and use them for the growth of a company, at the macro level, as well as the personal growth of the investor (Falah Shams and Asghari, 2018). Since the purpose and definition of investment is to postpone consumption for more and better consumption in the future; Investors expect to achieve their expected profit (Taloei Ashlaghi and Haq Dost, 2018). Therefore, in order to achieve the expected return, buying and selling should be done at the best possible time and in the right volume. One of the important issues in the field of investment management is determining the right time to buy and sell shares. This problem has attracted the attention of researchers for many years. The reason for paying attention to this issue is the important financial benefits that can be obtained from a successful forecasting model. To achieve these benefits, many efforts have been made and hardware and software, different financial analyzes and the like have been invented and used. Capital market experts have studied the market for many years and have learned patterns and make predictions based on it. They use a combination of pattern recognition and experience based on observing cause and effect relationships (Q [1] et al., 2001). However, in financial trends, there are often situations that disturb the rules and make it difficult to predict by the mentioned methods (Hanifi et al., 2018). In logic as well as in science, there is always a gap between the theory and the interpretation of the results of the imprecise world due to the ambiguity and lack of real information. Since the presentation of the theory of fuzzy sets, an effective step has been taken to solve this problem. There are concepts that are vague and imprecise from the point of view of software, but they are completely understandable and acceptable for humans (Khatami, 2007). The integration of fuzzy sets and neural networks is one of the measures that are taken to identify ambiguous conditions and uncertainty in forecasting models. Artificial neural networks are one of the novel and evolving methods that can be used in a variety of subjects (Lin [2], 2008). The timing of stock trading is a very important and difficult issue due to the complexity of the stock market. What is important is to predict the stock price trend, which is the main goal in technical analysis. Technical analysis is the process of analyzing historical stock prices and trading volume in an attempt to predict future price movements. In this regard, buying and selling opportunities are determined by estimating the range of market fluctuations. Although this is not easy due to the involvement of many market factors and the relationships between them (Tehrani and Abbasion, 2007). It seems that the use of more complex computational tools and algorithms, such as fuzzy neural networks, can be very useful in modeling the nonlinear processes that result in stock prices and trends. Therefore, in this research, by using capital market variables (total index, P/E ratio, profit per share, etc.), economic variables (exchange rate, oil price, gold price, etc.) and technical analysis indicators (RSI, SO, MACD, etc.), a fuzzy neural network is designed that has the ability to achieve an optimal solution close to the real solution. According to the description and expression of the said research problem, the purpose of this research is to design a model to predict the optimal time to conduct transactions. 1-2- Importance and value of research Investors in the capital market are always interested in knowing the best time to conduct transactions in order to obtain the highest possible returns. Obtaining such information is possible only if they know about the future state of the stock. Knowing the future state of stocks requires being equipped with a tool to predict the future. This tool should have the ability to predict the optimal time of the transaction and the resulting yield. Therefore, it is necessary to investigate the adequacy of non-linear methods such as fuzzy neural networks in order to obtain a tool that has the ability to predict the best time to execute a transaction despite different time conditions.

    1-3-Research Objectives

    The main goal of this research is to investigate the role of fuzzy neural networks in improving the effectiveness of technical analysis indicators in predicting stock buy and sell signals. In this regard, the following sub-goals are defined:

    check the accuracy of the prediction of the fuzzy neural network model.

    comparing the yield of the proposed method with the yield of buy and hold methods and trading methods of technical analysis before deducting trading costs.

    comparing the yield of the proposed method with the yield of buy and hold methods and trading methods of technical analysis after Deduction of transaction costs.

  • Contents & References of Predicting the optimal time for transactions using fuzzy neural network with technical analysis approach

    List:

    Chapter One: General Research

    Introduction. 1

    1-1-Description and expression of the research problem. 2

    1-2-The importance and value of research. 3

    1-3-Research objectives. 3

    1-4-Research hypotheses. 3

    1-5-Research method. 3

    1-5-1- The type of study and hypothesis testing method 3

    1-5-2- Statistical population. 4

    1-5-3- Data collection tool 4

    1-5-4- Analysis tool. 4

    1-6-key words. 5

    1-7- Abbreviations. 6

    Summary. 6

     

    Chapter Two: Review of the subject literature

    Introduction. 7

    2-1- Investment concepts. 8

    2-1-1- Financial markets. 8

    2-1-1-1-types of financial markets. 8

    2-1-1-2- Exchange. 9

    2-1-1-2-1- Importance of stock exchange 9

    2-1-1-2-2- History of Tehran Stock Exchange. 10

    2-1-2- The concept of investment. 12

    2-1-3- Investment process. 12

    2-1-4- Investment methods. 13

    2-1-5- Ordinary shares. 13

    2-1-6- Theory of investing in the stock market. 14

    2-1-7- investment return. 14

    2-1-8- Capital market efficiency and its importance in stock evaluation. 15

    2-2- Prediction. 16

    2-2-1- Qualitative forecasting methods. 16

    2-2-2- Quantitative forecasting methods. 16

    2-2-3- Selection of prediction method. 16

    2-2-4- Basic method. 17

    2-2-5- Classical time series prediction method. 18

    2-2-6- Technical or technical methods. 19

    2-3- fuzzy system. 24

    2-3-1- Fuzzy logic. 24

    2-3-1-1- fuzzy sets. 25

    2-3-1-2- Fuzzy set operators. 25

    2-4- Fuzzy neural network. 26

    2-4-1- Artificial neural networks. 26

    2-4-2- History of artificial neural networks. 26

    2-4-3- Features and capabilities of artificial neural networks. 27

    2-4-4- Definition of Ghazi neural network. 28

    2-4-5- fuzzy neurons. 28

    2-4-6- fuzzy rules. 30

    2-4-7-fuzzy inference systems. 30

    2-4-7-1- fuzzifying methods 32

    2-4-7-2- non-fuzzifying methods 35

    2-4-7-3- Mamdani inference system. 37

    2-4-7-3- Takagi-Sugno inference system. 38

    2-4-8- multilayer fuzzy neural networks. 39

    2-4-9- ANFIS network. 39

    2-4-9-1- Advantages of ANFIS. 41

    2-4-10- The learning process in the network 42

    2-4-10-1- Learning algorithm after error propagation 42

    2-4-10-2- Creating the initial structure of FIS. 43

    2-4-10-3- Learning process in ANFIS network. 44

    2-4-11- Error measurement in neural networks. 44

    2-4-12- Linear normalization of data in [L,H] interval. 46

    2-5- Background of the subject. 47

    2-5-1- Examining the efficiency or inefficiency of the market 47

    2-5-2- Feasibility of using technical analysis indicators in predicting stock price trends. 48

    2-5-3- An overview of research conducted in the field of forecasting economic and financial variables using intelligent systems 49

    2-5-3-1- Internal research. 49

    2-5-3-2- Foreign research. 52

    Summary. 61

    The third chapter: research method

    Introduction. 62

    3-1- Research objectives. 63

    3-2- Research variables. 63

    3-3- Research hypotheses. 65

    3-4- Type of research. 65

    3-5- Research method. 66

    3-6- Statistical population. 73

    3-7- Data collection tool 73

    3-8- Analysis tool. 75

    3-9- Research scope. 75

    Summary. 75

     

    Chapter Four: Data Analysis

    Introduction. 76

    4-1- Selection of input variables. 77

    4-1-1- Data normalization 77

    4-1-2- Identification of network input variables. 77

    4-2- Prediction of technical analysis indicators using fuzzy neural network. 81

    4-2-1- Selection of test and training data. 81

    4-2-2- Fuzzy neural network design. 81

    4-2-3- Evaluation of network performance. 82

    4-2-3-1- Evaluation of network performance based on the MSE criterion. 82

    4-2-3-2- Evaluation of network performance based on the RMSE criterion. 85

    4-3- Investigating the accuracy percentage of fuzzy neural network prediction. 87

    4-4- The significance of the difference in the average return of trading methods. 89

    Summary. 93

     

    Chapter Five: Conclusion and93

     

    Chapter Five: Conclusion and Suggestions

    Introduction. 94

    6-1- Summary of the research. 95

    6-2- Research results. 95

    6-2- Research limitations. 97

    6-3- Suggestions 97

    Summary. 98

    Persian sources. 99

    English sources. 103

    Appendix 1. 107

    Appendix 2 117

    Source:

    Persian sources

    Akhbari Mohammad, Akhbari Mehdi. (1390). Application of fuzzy logic approach in informal economy modeling in Iran. Economic Research Quarterly. 19th year No. 59. pp. 167-131.

    Amir's officer. (1384). Stock price prediction modeling using fuzzy neural network and hybrid methods. Tehran: Tarbiat Modares University: Faculty of Management.

    Akanel B. (1375). Time series forecasting (identification, estimation, forecasting). Translated by Reza Shiva. Tehran: Business Studies and Research Institute.

    Alborzi Mohammad. (1380). Familiarity with neural networks. Tehran: Sharif University of Technology Publishing Institute.

    Alwani Mehdi. (1388). General management. Tehran: Nei Publications.

    Alehi Yaari Akbar. (1387). Investigating the weak form of capital market efficiency in Tehran Stock Exchange. Stock Exchange Quarterly, Year 1, Number 4, pp. 75-108.

    Emami Amir Abbas, Razmi Jafar, July Freeborz. (1386). Review and comparison of forecasting rules of technical analysis in Tehran Stock Exchange. The 5th International Industrial Engineering Conference. July 20 to 21. Iran University of Science and Technology.

    Ezadi Hossein. (1383). The principles and techniques of stock portfolio formation, Tehran: Publications of Iran Industrial Research and Education Center.

    Azer Adel. Officer Amir (1385). Stock price prediction modeling with fuzzy neural networks approach. Business research paper. 40. pp. 52-33.

    Azer Adel. Officer Amir Ahmadi Parviz (1385). Comparison of classical methods and artificial intelligence in forecasting the stock price index and designing a hybrid model. Quarterly journal of humanities teacher. Period 10. Number 4. pp. 1-16.

    Pour Zakir Arabani Sudabah. (1385). Concepts of artificial intelligence and neural networks and algorithm genetics. Lahijan: Nedaya Sabz Shamal Publications.

    Pormiri Behrouz. (1384). Steel price prediction with neural networks and its comparison with ARMIA method. Isfahan: University of Isfahan: Faculty of Administrative Sciences and Economics.

    Tehrani Reza, Abbasion Vahid. (1387). The use of artificial neural networks in the timing of stock transactions: with a technical analysis approach. Economic research. Volume 8, Number 1, pp. 177-151.

    Jahankhani Ali, Parsaian Ali. (1375). stock exchange Tehran: University of Tehran Management Press.

    Jehankhani Ali, Parsaian Ali. (1376). Investment management and securities evaluation. Tehran: University of Tehran Management Press. Hatami Nima, Mirzazadeh Hojat, Ebrahimpour Reza. (1389). Combining neural networks for stock price prediction. Research Journal of Economic Sciences, Year 10, Number 2, Series 39, pp. 61-80.

    Hamdian Mehdi. (1379). Investigating factors affecting stock prices and investors' decisions in Tehran Stock Exchange. Tehran: Shahid Beheshti University: Faculty of Management. (1386). Soft computing with fuzzy sets and neural networks. Tabriz: Mehr Iman Publications.

    Hanfizadeh Payam, Jafari Abolfazl. (1389). Kohonen's hybrid model of forward-looking and self-organizing artificial neural networks for stock price prediction. Scientific-Research Quarterly of Industrial Management Studies, Year 8, Number 19, pp. 187-165.

    Hanifi Farhad, Bahrul Alamum Mohammad Mahdi, Javadi Babak. (1388). Design and comparative analysis of meta-heuristic algorithms to implement index-based investment in Tehran Stock Exchange. Management Perspective, No. 32, pp. 108-89. Khatami Hamid Reza. (1387).  Fuzzy Modeling Basics Volume I: Fuzzy Algebra. Kerman: Shahid Bahonar University Press, Kerman.

    Khaluzadeh Hamid, Khaki Ali. (1382). Evaluation of stock price forecasting methods and presentation of a nonlinear model based on neural networks. Journal of Economic Research, No. 64, pp. 85-43. (2011). Investigating the efficiency of the Tehran Stock Exchange market based on the valuation model of conditional capital assets. 9th International Industrial Engineering Conference, Khwaja Nasiruddin Toosi University of Technology.

    Dalbari, Mehdi. (1380). Investigating the effective criteria on stock selection in Tehran Stock Exchange based on Hierarchical Process (AHP) model. Isfahan: University of Isfahan: Faculty of Administrative Sciences and Economics.

    Rai Reza, Telangi Saeed.

Predicting the optimal time for transactions using fuzzy neural network with technical analysis approach