In this study we interacted with both stock brokers and investors on the floor of the Benin stock exchange in the course of which we used personal interviews and keen observation to garner the requirements for the intended system. We then proceeded to model the entire systems requirements using neural network because of its suitability. Used case diagram was used to capture the logic of stock analysis operation and the interaction between the investor and the stock broker. The design followed first with a table illustrating the behavior specification of the intended system and a unified modeling language class diagram depicting the major attributes and methods in the classes and the relationship between them. We implemented The system with Microsoft Visual Basic Dot Net at the front end, interfaced with Microsoft Structured Language Server at the back end and the systems testing achieved desired results.
INTRODUCTION
One major reason why computers will persist as an integral part of the lives is the increasing number of areas where they have become indispensable. As new application areas emerge, developers are challenged and new applications or systems that address these new identified problems are designed and implemented. At other times, post implementation requirements crops up making modifications to already developed applications inevitable or engendering the need for a new application that encompasses all these requirements altogether.
It is in line with this reality that we embarked on this study to develop a system that is inclined towards investors and potential investors in their all too important stock keeping and forecasting briefs. Experience indicates that stock brokers tend to corner the lion share of the benefits accruable from stock trading operations in virtually all stock markets around the word. This assertion is further reinforced by the finding that most existing stock projecting applications and studies tend to be oriented towards the brokers. Consequently, investors and potential investors tend to recline completely on the brokers advice to buy or dispose their stocks. We all know that the driving force of any going concern is profit making and stock brokers are not left out. Many of them therefore tend to be actuated by the profit motive more, rather than the investor’s gains in their day to day dealings.
Though the system is oriented towards the investor we hasten to point out that it is completely based on the all too familiar existing underlying parameters usually employed in making stock projections. Some of these parameters include (but are not restricted to):
• | Return on Investment (ROI) |
• | Share Market Value |
• | Gains and Losses |
• | Earning Per Share, etc. |
The interaction in the course of the brief to comprehend the functioning of the existing system showed that trading on the floor of the stock exchange house is normally done in a jiffy. And this leaves no room for manual or mechanical analysis that investors need to perform prior to picking up any company’s stock.
Literature review: We encountered a great deal of literature in the course of this study. Owing to time constraint, we were only able to review a few of these studies and are as articulated below in the session following. Tsang et al. (2007) designed a stock buying/selling alert system based on back propagation Neural Network (NN). They tested their system with data from the Hong Kong and Shangai Banking Corporation (HSBC) holdings. And based on their results, they recommended a strategy for trading non-volatile stock. In their study, Briza and Naval (2008) showed that besides differing in the importance they attach to their objectives; stock traders consider several factors in making decisions. They then suggested that stock traders require tools that can provide an optimal tradeoff among different objectives, a problem aptly solved by a Multi-Objective Optimization (MOO) system. They were however, quick to add that in the area of stock modeling and prediction, portfolio selection and portfolio optimization, application of MOO to stock trading is very limited. They tested their system with historical end of day market data and trading signals from a set of financial technical indicators. The results they obtained showed the potential of the system as a tool for making stock trading decisions. Presenting another perspective, Azzini and Tettamanzi (2008) presented an approach to single-position, intraday automated trading based on a neurogenetic algorithm. They developed an artificial neural network to provide trading signals to a simple automated trading agent. The neural network uses open, high, low and close quotes of the selected financial instrument from the previous day as well as a selection of the most popular technical indicators to decide whether to take a single long or short position at market open. The position is then closed as soon as a given profit target is met or at market close. Their experimental results indicated that despite its simplicity both in terms of input data and in terms of trading strategy anticipated automated trading may yield significant returns. Huang et al. (2008) created an automatic stock market forecasting and portfolio selection mechanism.
They tested the system with electronic stock data extracted from the financial database maintained by the Taiwan Economic JThenal (TEJ). They observed that the system yielded a greater average annual rate of return (23.42%) on the selected stocks from 2004-2006 in Taiwan stock market. In an empirical study conducted using the Korean Stock Exchange, Son et al. (2009) suggested an early warning signal against the possible massive selling of Global Institutional Investors (GII) at the local market due to the fact that GII play pivotal role in stabilizing emerging stock markets.
For their design they used a machine learning algorithm which forecasts the behavior of GII by predicting future conditions. Their argument was that Global Institutional Investors (GII) comprised of global mutual funds, offshore funds and hedge funds hence the necessity to monitor their behavior. A cellular automaton model of the stock market was developed by Fan et al. (2009). They represented the complexity of the stock market with fractal and stability properties. These fractal and stability variables were in turn represented with designated variables. They then proceeded to use this model to investigate the dependency of market complexity on the investors imitation degree. Their results showed a clear correlation between investors imitation degree and complexity of the stock market.
Trinkle (2006) tested Adaptive Network-based Fuzzy Inference System (ANFIS) and a neural network for forecasting the annual excess returns of three large publicly traded companies from a time series of said returns. He observed that ANFIS and neural network techniques are able to generate forecasts with significant predictive ability. He was quick to point out that neither technique dominated the other nor did they consistently perform better than the traditional models (strategies). A different knowledge was gleaned from the studies of Quek et al. (2009) who opined that in contrast to short-term stock trading, portfolio managers are interested in the medium to long-term peaks and troughs of the stock price cycles.
They argued further that portfolio managers normally use these signals to balance their stock portfolios the predicted trough is the signal to buy the stock and the predicted peak is the signal to sell the stock. Left to them, statistical models are generally inadequate or incapable of providing such portfolio balancing signals. Consequently, they proposed a Generic Self-organizing Fuzzy Neural Network (GenSoFNN) a fuzzy neural system as a tool for portfolio balancing.
The system uses a supervised learning approach to detect inflection points in the stock price cycles and a modified locally weighted regression algorithm is employed to smooth the stock cycles. The contributions of the proposed GenSoFNN intelligent portfolio balancing system are twofold: it can be used as an efficient trading solution and it can provide decision support in trading via its generated rules.
MATERIALS AND METHODS
The information used for this study was garnered via perusal of appropriate documents, personal interviews and keen observation of processes and proceedings on the floor of the Benin Stock Exchange. The individual methods are briefly explained.
Perusal of documents: The first brief was to source for sundry books and articles on stocks and stock analysis from the Internet some institution’s library and some reputable stock brokers. These materials were perused and we did gained veritable insights into the business of investment in stocks.
Personal interviews: In the course of the perusing study, we did encountered several terminologies, formulas and procedures that posed some challenges. The natural recourse was consultation with distinguished personalities in the academia, most of whom were colleagues and some seasoned stock brokers or stock gazers. The interaction yielded much result. First, we were able to grasp the meanings of sundry terminologies. Secondly, we became grounded on the derivation and utilizations of some frequently used formulas in stock forecasting. And then we were made to better understand the essence of the procedures in use.
Keen observation: Having acquired reasonable knowledge theoretically, we proceeded to personally observe transactions on the floor of the Benin Stock Exchange for a firsthand experience. We were privileged to sit with some stock brokers. From this position, we were able to interact with these brokers and some of their potential clients or investors. We keenly observed transactions on the floor of the house in the course of the visits and we did elucidate clarifications from both brokers and potential investors within this period.
Findings: We observed that proceedings in the stock exchange was skewed in favor of the brokers who were more or less The Judges, The Jurists and of course, The Executioners. First and foremost, it is mostly stock brokers that have the financial statements of quoted companies or information on some other companies that are not quoted. And they seem to be the only ones who attempt to analyze the performance of these companies based on some designated criteria. Meanwhile, they are strictly in business to make profit. And the investors who are keen on putting their funds on the stocks they believe will yield best returns rely on same stock brokers for advice in most cases. And these investors include those that can be classified as elitist.
Regretfully, most brokers tend to rely on past history of firms and the forces of demand and supply as well as the current value of particular stocks to proffer advice to their clients without recourse to any form of projection or analysis. Another important finding is the scramble for the stocks of companies who are seemingly doing very well at the material point in time without bothering to evaluate the stocks of some other companies who have a huge potential for growth.
It is exactly these shortcomings besides others that motivated us to embark upon the design of an easy to use system that will assist investors in making appropriate investment choices promptly within or without the floor of the stock exchange. The system will enable the user to analyze or evaluate appropriate parameters so that they will be better placed to make informed investment decisions. This proposed systems requirements and design are undertaken next using appropriate tools.
RESULTS AND DISCUSSION
The proposed system draws substantially from the existing basic approaches of Fundamental Analysis and Technical Analysis. Fundamental analysis involves the in-depth analysis of a company’s performance and profitability to determine its share price. It is believed that by studying the overall economic conditions surrounding a company such as the company’s competition as well as other factors, it will be possible to determine expected returns and of course the intrinsic value of shares. This type of analysis assumes that a share’s current (and future) price depends on its intrinsic value and anticipated return on investment. This implies that as new information is released pertaining to the company’s status, the expected return on the company’s shares will change and this will affect the stock price.
On the other hand, technical analysis assumes that share prices move according to trends being dictated by the constantly changing attitudes of investors in response to different forces. Price, volume and open interest statistics are typically used by the technical analyst to draw a charts and hence predict future stock movements. Technical analysis rests on the assumption that history repeats itself and that future market direction can be determined by examining past prices.
It can be gleaned from the above explanations that modeling the requirements that will capture all the needed inputs, processes and output will require a system that can exhibit some measure of intelligence. Consequently, we opted for a neural network approach for the task. And below is the neural networks (Fig. 1 and 2) designed to model this system.
![]() |
|
Fig. 1: | A feed forward neural network model depicting input, hidden layers and output |
![]() |
|
Fig. 2: | Feeding of inputs into the hidden layer of the neural network |
![]() |
|
Fig. 3: | UML use case diagram for the stock analysis |
It is a feed forward system which is intended to capture all the input desired in The requirement.
The system set of inputs are market parameters. The hidden layer consists of mathematical methods designed to operate on assigned values such as earnings per share. Weights (W) are automatically assigned to these values as well as all market parameters. It is these different parameter weights for a specific company that amounts to the product f (x)w weight.
And it is the addition of all the parameter weights that translate into output which is used to draw a final chart of the company’s performance so as to advice investor to buy or not to buy. Figure 3 UML use case diagram for the stock analysis application.
Below is a used case diagram representation of the logic of the stock analysis operation showing the interaction of the Investor and the Stock Broker.
Table 1: | Behavior specification for the stock analysis application |
![]() |
![]() |
|
Fig. 4: | UML class diagram of stock analysis system |
Table 1 shows the actions represented by the used case diagram above. It represents the behaviour specification of the stock analysis system.
Systems design: The systems design is aptly captured by the UML class diagram below (Fig. 4) showing the major attributes and methods in the different classes and the relationship between the classes. The major classes of the UML class diagram of Fig. 4 are explained next.
![]() |
|
Fig. 5: | Architecture of the stock forecasting system |
![]() |
|
Fig. 6: | Login page |
Interface: Consist of the interface the user sees when he/she logs on to the system. It contains two major methods sendM and viewM to send messages and view messages sent, respectively to the reporter class.
Logon: Consist of the first screen any user sees when he enters or launches the stock analysis system. It consists of two major methods that either logs different users onto the system or displays an error message if any of the logon parameters are wrong.
Reporter: The reporter class Consists of methods that get queries or take in the input of the user and send them to the necessary underlying class for processing. It contains two major methods to either report the current stock position or report the advice the system is giving based on the stock situation.
StockList: This class takes a company name as input and retrieves details about that companies stock from a database.
Epscalculator: This class contains the methods, and formulas for calculating the earnings per share of each company and thus giving necessary advice about the current stock state of that company.
Figure 5 shows the system architecture for the stock analysis system. It depicts all the different databases holding the information used in the system as well as the interaction among these different parts with regards to information access.
Systems implementation: We used Microsoft Visual Basic Dot Net (VB.Net) interfaced with Microsoft
![]() |
|
Fig. 7: | Home page |
![]() |
|
Fig. 8: | View stock page |
![]() |
|
Fig. 9: | Buy stock page |
Structured Query Language (SQL) server to implement The new system. On execution of the system, the application performed excellently well and The captured screen shots are depicted and explained next.
The first screen shot on start up of the system is the login page Fig. 6 which requests for a username and password. If the two are correctly entered, another screen with full menu display will emerge and this is the home page (Fig. 7).
The desired operation to be performed is initiated or selected from this page. Figure 8 is the view stock page which enables investors to view stocks and the current cost of the stocks individually or in combination with other stock. The buy stock screen and sell stock screen are designated as Fig. 9 and 10, respectively.
The next screen shot is that of stock statistics designated as Fig. 11. It among other features displays information on the current stock of a selected company and in addition it generates an advice for the investor to either dispose or invest in the particular company’s stock. The last screen shot dubbed Fig. 12 is the company’s statistics page. The page helps to furnish some stock related history in respect of a particular company over a short period of time say, 3 months.
![]() |
|
Fig. 10: | Sell stock screen |
![]() |
|
Fig. 11: | Stocks statistic screen |
![]() |
|
Fig. 12: | Company statistic screen |
CONCLUSION
Investment in stocks is the first option for most individuals who wish to invest or who have excess cash to put aside. And going by the volume of transaction on the floor of the Benin stock exchange, stock trading is a multimillion dollar business. And for the industry to continue to grow, some measure of security is desired so that investors can have trust in the system. And one way this can be achieved is to create a congenial environment that would enable investors or potential investors to put their money where they will get reasonable returns. And one way of doing this is to actively involve the investor in the analysis or forecasting activity so that they can determine where to put their stakes rather than recline completely on the discretion of the broker who is being actuated by profit motive.
We are aware that series of applications for stock forecasting already exists but only a few brokers and investors are aware of them and even at that they are scarcely put to use.
Besides designing, implementing and testing an application in this study, we have thrown some light on the need for investors to take just more than a passing interest in stock forecasting and analysis and hence an application that is oriented towards them.
Opani Aweh and Edwin Abdul-Rasheed Isah. Design and Implementation of an Investors Oriented Stocks Analysis/Forecasting System.
DOI: https://doi.org/10.36478/ajit.2010.140.147
URL: https://www.makhillpublications.co/view-article/1682-3915/ajit.2010.140.147