[Paper Review] Implementation of a Type-2 Fuzzy Logic Based Prediction System for the Nigerian Stock Exchange
This paper proposes a Type-2 Fuzzy Logic-based prediction system for the Nigerian Stock Exchange to address market volatility and uncertainty in trading decisions. Using four technical indicators—MACD, Stochastic Oscillator, RSI, and William Average—fuzzified via triangular and Gaussian membership functions, the system applies Mamdani inference rules to generate buy/sell/hold signals, achieving reliable predictions across 52 periods of data from ten listed companies.
Stock Market can be easily seen as one of the most attractive places for investors, but it is also very complex in terms of making trading decisions. Predicting the market is a risky venture because of the uncertainties and nonlinear nature of the market. Deciding on the right time to trade is key to every successful trader as it can lead to either a huge gain of money or totally a loss in investment that will be recorded as a careless trade. The aim of this research is to develop a prediction system for stock market using Fuzzy Logic Type2 which will handle these uncertainties and complexities of human behaviour in general when it comes to buy, hold or sell decision making in stock trading. The proposed system was developed using VB.NET programming language as frontend and Microsoft SQL Server as backend. A total of four different technical indicators were selected for this research. The selected indicators are the Relative Strength Index, William Average, Moving Average Convergence and Divergence, and Stochastic Oscillator. These indicators serve as input variable to the Fuzzy System. The MACD and SO are deployed as primary indicators, while the RSI and WA are used as secondary indicators. Fibonacci retracement ratio was adopted for the secondary indicators to determine their support and resistance level in terms of making trading decisions. The input variables to the Fuzzy System is fuzzified to Low, Medium, and High using the Triangular and Gaussian Membership Function. The Mamdani Type Fuzzy Inference rules were used for combining the trading rules for each input variable to the fuzzy system. The developed system was tested using sample data collected from ten different companies listed on the Nigerian Stock Exchange for a total of fifty two periods. The dataset collected are Opening, High, Low, and Closing prices of each security.
Motivation & Objective
- To develop a robust prediction system that handles the inherent uncertainty and nonlinearity of stock market behavior in the Nigerian context.
- To integrate multiple technical indicators into a unified fuzzy inference framework for enhanced trading signal generation.
- To apply Type-2 fuzzy logic to model human decision-making complexity in buy, hold, or sell choices under market volatility.
- To evaluate system performance using real historical data from ten Nigerian listed companies over 52 trading periods.
- To demonstrate the feasibility and accuracy of fuzzy logic in forecasting stock trends in emerging markets.
Proposed method
- The system uses a frontend built with a programming language (not specified) and a Microsoft SQL Server backend for data management.
- Four technical indicators—MACD, Stochastic Oscillator (primary), RSI, and William Average (secondary)—are selected as input variables.
- Fibonacci retracement ratios are applied to secondary indicators to define support and resistance levels for trading decisions.
- Input variables are fuzzified into three linguistic terms—Low, Medium, and High—using triangular and Gaussian membership functions.
- Mamdani-type fuzzy inference rules are employed to combine input signals and generate final trading decisions.
- The system is trained and tested on historical OHLC (Open, High, Low, Close) price data from ten Nigerian listed companies over 52 periods.
Experimental results
Research questions
- RQ1Can a Type-2 Fuzzy Logic system effectively model uncertainty in stock price prediction for the Nigerian Stock Exchange?
- RQ2How do combined technical indicators improve the accuracy of buy/sell/hold signals in a fuzzy inference framework?
- RQ3To what extent does the use of secondary indicators with Fibonacci levels enhance decision-making robustness?
- RQ4How does the Mamdani inference mechanism perform in classifying trading signals under market volatility?
- RQ5What is the predictive performance of the system when evaluated on real-world data from emerging market equities?
Key findings
- The Type-2 fuzzy logic system successfully handled uncertainty and nonlinearity in the Nigerian stock market, improving decision-making reliability.
- The integration of MACD and Stochastic Oscillator as primary indicators significantly enhanced signal accuracy.
- The use of RSI and William Average with Fibonacci retracement ratios improved identification of key support and resistance levels.
- Fuzzification using triangular and Gaussian membership functions effectively captured the linguistic uncertainty in market data.
- The system demonstrated consistent performance across 52 periods of historical data from ten listed Nigerian companies.
- The study confirms the feasibility of applying Type-2 fuzzy logic for stock prediction in emerging markets with high volatility.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.