# Stock Market Multi-Agent Recommendation System Based on the Elliott Wave Principle

Monica Tirea, Ioan Tandau, Viorel Negru

► To cite this version:

Monica Tirea, Ioan Tandau, Viorel Negru. Stock Market Multi-Agent Recommendation System Based on the Elliott Wave Principle. International Cross-Domain Conference and Workshop on Availability, Reliability, and Security (CD-ARES), Aug 2012, Prague, Czech Republic. pp.332-346, 10.1007/978-3-642-32498-7_25 . hal-01542446

HAL Id: hal-01542446

https://inria.hal.science/hal-01542446

Submitted on 19 Jun 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Stock Market Multi-Agent Recommendation System Based on the Elliott Wave Principle

Monica Tirea<fnref n="1" />, Ioan Tandau<fnref n="2" /> and Viorel Negru<fnref n="1" />

**Abstract.** The goal of this paper is to create a hybrid recommendation system based on a Multi-Agent Architecture that will inform the trader about the future stock trend in order to improve the profitability of a short or medium time period investment.

We proposed a Multi-Agent Architecture that uses the numbers of the Fibonacci Series and the Elliott Wave Theory, along with some special Technical Analysis Methods (namely Gap Analysis, Breakout System, Market Modes and Momentum Precedes Price) and Neural Networks (Multi-Layer Perceptron) and tries to combine and / or compare the result given by part / all of them in order to forecast trends in the financial market. In order to validate our model a prototype was developed.

**Keywords:** Multi-Agent Systems, Elliott Wave Theory, Technical Analysis Methods, Neural Networks, Fibonacci Series

## 1 Introduction

Stock Market Forecasting has gained an important place in the research area due to its attractive benefits and its commercial applications. Due to the fact that the stock market is noisy, non-linear, chaotic, dynamic, very complicated and influenced by many macro-economical factors it is almost impossible to make a perfect prediction of which is the best moment to buy / sell a stock or to forecast a market trend. During the last decades researchers have tried to combine a series of techniques in order to alleviate the insurmountable prediction problem and provide better decision guidelines and optimized forecasting tools.

The most common techniques used are Fundamental and Technical Analysis [4,5,11]. Technical Analysis computes some indicators/oscillators, based on a stock historical data, which have the aim to signal a buy / sell moment. Fundamental Analysis takes in consideration the macro-economical factors that influence the market in order to also signal a buy/sell moment. Another approach is the use of Artificial Neural Networks [2,3,8] because of their ability to capture patterns and relationships based on the historical data and to cope with the environmental changes that may occur in the market in order to help in determining a future stock trend or a good moment to buy / sell.

In the field of Technical Analysis, there are a series of methods that are considered to be profitable such as Gap Analysis, Breakout Systems, Market

<footnote n="1">¹West University of Timisoara, Timisoara Romania,
{tirea.monica,vnegru}@info.uvt.ro</footnote>

<footnote n="2">²Green Mountain Analytics, Cary, North Carolina, USA, tandauioan@gmail.com</footnote>
Modes and Momentum Precedes Price. Another complex and comprehensive Technical Analysis Method is the Elliott Wave Theory [6,7].

The Elliott Wave Theory plays an important part in the stock market research area because of its ability to interpret the psychological aspect that may appear on a market behavior. Taking in consideration that stock prices are following a trend is very important to know which is the direction of the current trend and when this direction will change.

In completion to the Wave Analysis Stock Prediction Model proposal, which is based on Fuzzy Logic Theory, Neural Network, and the Elliott Wave Theory [1], we add an agent based system that uses some special Technical Analysis Methods, for a better detection of a good buy / sell moment and a better forecast of a market trend.

Based on this information we developed a framework (Stock Market Multi-Agent Recommendation System - SMMARS) in which we will combine the result of these Technical Analysis Methods with the Neural Network Methods (Multi-Layer Peceptron) into a Multi-Agent Architecture in order to make a better forecast on the future trend of a stock in a stock market.

This framework's goal is to compare, to find a correlation between the result from three different techniques and to combine them in order to improve the final results and to make a better forecast on the market future trend. We defined a hybrid system whose aim is to find a better solution to how we can manipulate a portfolio in order to have a substantial gain on the stock market. These methods are applied on the Bucharest Stock Exchange Market (BSE).

In Section 2 we describe the Elliott Wave Principle and the methods associated with it along with the Technical Analysis Methods that we will use in order to forecast a stock trend. Section 3 presents the proposed model of the agent architecture. Section 4 presents an analysis of our model on the Bucharest Stock Exchange, the results obtained along with the comparison of our model's results with other similar models. Conclusions and future work is presented in the last section.

# 2 Elliott Wave Principle and Stock Market Forecasting

## 2.1 Profitable Methods Based on Technical Analysis

Stock Market prediction has been an interest area of research for many years. Researchers have played with Technical Analysis indicators and oscillators in order to find a better way to predict an important moment to buy / sell on a stock market. The profitable methods [7] based on the Technical Analysis are considered to be Gap Analysis Patterns, Breakout Systems, the Market's Mode and the Momentum Precedes Price concept.

### Gap Analysis Method

We define a gap as the area on which no trades occurred. These methods can signal an important event on the stock market based on the fundamental data or
on the psychology of the crowd that accompanies this market movement. Taking
in consideration the breaking news or changes that may appear in the market's
conditions, this method signals that something important happened [7,9].

In the case that this information is true and the price of a stock evolves in
the direction of the gap, then we can take in consideration two possible moves:
we buy when the market gaps down below the low on the open and then crosses
above yesterday's close and sell when the market opens above yesterday's high
and crosses below yesterday's close; or we buy/sell if the market gaps up / down
at some percentage of yesterday's range above the open/ bellow the open. Gaps
are good tools for forecasting short and medium trends.

We distinguish four basic categories of gaps : *Common* (appears in a trading range or congestion area, and reinforces the apparent lack of interest in the stock at that time); *Breakaway* (occurs when the price action is breaking out of their trading range or congestion area); *Runaway* (occurs when an increased interest in the stock appears); and *Exhaustion* (occurs when a high volume and large price difference between the previous day's close and the new opening price appears).

Breakout Systems

There are considered to be one of the best methods from the Technical Analysis
because of their ability to carry the stock beyond the breakout point in order for
the user to have a gain on the market. We distinguish two categories of breakout
systems: the channel breakout (occurs when a stock was trading in a given
channel and the trading starts at a price higher than the top of that channel)
and the volatility breakout (buy / sell when the market breaks above/below its
open / previous close by a given percentage of the previous day's range) [7,12].

Market Mode

This method has an interest in identifying the status of the market: if is trending,
will continue to trend or will consolidate. In order to make such assumption we
use a series of Technical Analysis indicators. One of the most used indicators is
the Average Directional Movement (ADX) which signal the market status when
it goes above / below a set level. A market is considered to be trending when
the indicator goes above 25, is consolidating when it goes below 20 [7].

Momentum Precedes Price

This method indicates whether or not a possible price change will occur. Based
on the market movement in one direction it is possible that the price will continue
further in the same direction. A signal of buy / sell moment will appear if the
momentum oscillator sets a new high / low and the oscillator is above / bellow
zero [7].

## 2.2 Elliott Wave Principle

The market moves in ratios and patterns that reflects the human behavior of a
stock price's trend. Taking this fact into consideration, the Elliott Wave Principle
is defined as a two direction waves (impulse wave and corrective wave) [1,6,7].
The impulse wave is defined as a five wave sequence (noted 1-2-3-4-5) that follow the trend direction and the corrective wave is defined as a three wave sequence (noted a-b-c) in the opposite direction of the impulse wave. This type of waves can be used in short-term and long-term prediction because of their construction from similar patterns on a large or short scale.

Elliott defined a hierarchy of waves based on their degree: Grand Supercycle, Supercycle, Cycle, Primary, Intermediate, Minor, Minute, Minuette, Subminuette. In this study we take into consideration the last four of them in order to forecast the stock market trend for short and medium term period.

Looking at a trend on the stock market we can identify on which position of the pattern we are by taking in consideration some rules :

1. The second wave in the Elliott Wave Pattern must not exceed the length of the first wave and cannot return a price lower than the one set at the beginning of the first wave.

2. The third wave must not have the shortest length compared to the first and the fifth waves.

3. The fourth wave must not return a lower price than the closing price of the first wave.

4. Wave two and four usually have alternate forms.

5. Wave 1, 2, and 3 must have the same direction and wave 2, and 4 must be in the opposite direction

The impulse waves are categorized as follows: extended wave ( this means that one of the waves 1, 3, and 5 can be extended into an Elliott Wave sub-wave structure), diagonal triangle (occurs when wave 5 is in the same line with wave 2 and 4 causing a diagonal triangle), fifth wave failure (occurs when the length of wave five doesn't exceed the length of wave 3, causing a double top in the trend).

The Corrective Wave are also categorized as follows: *Zig-Zag* (5-3-5 sub-wave structure); *Flat* (3-3-5 sub-wave structure, *a* and *b* wave having the same length); *Irregular* (3-3-5 sub-wave structure, with *b* longer than *a*); *Horizontal Triangle* (5-wave triangular pattern composed of 3-3-3-3-3 sub-wave structure); *Double Three* (any combination of the above having the form *abcxabc* where *x* is the link wave); *Triple Three* (any combination of the above having the form *abcxabcxabc* where *x* is the link wave).

## 2.3 Fibonacci Mathematics in Financial Markets

The wave principle discovered by Elliott, has in practice a connection with the Fibonacci sequence [13] due to the fact that this series defines the static and dynamic characteristics of a natural system. The Fibonacci sequence is defined as a sequence of derived numbers starting from two initial values

(1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233...).
We take in consideration four ratios computed from the Fibonacci Sequence. Starting from the fifth element, if we divide the current number with the previous number we get a ratio of 1.618. If we divide the current number with the next number in the series we get a ratio of 0.618. If we divide the current number with the number on the previous two position we get a ratio of 2.618. If we divide the current number with the number in the series that precedes it with two position we get a ratio of 0.382. These are called the Fibonacci ratios and in the Elliott Wave Theory, this ratios are the primary factor of the extent of price and time movements in a stock market.

These ratios are used in order to explain the market behavior and to spot a wave. Applied on the Elliott Wave Principles, this ratios have the following behavior: wave 2 corrects up to 50% or 62% of wave 1; wave 4 corrects up to 24% to 28% of wave 3; wave 3 has the length 1.62, 2.62, 4.25 of the length of wave 1; wave 5 depends either on the wave 1 or on the length of the parallel from the start of the wave 1 until the end of the wave 3.

## 3 Agent Based Architecture

We propose the system architecture described in Figure 1 based on three main agents. The first one combines a series of technical analysis methods based on breaking news or changes in the market conditions along with historical data information in order to find a better moment to buy / sell a stock on the market and to identify a market's status. The second one takes in consideration the hierarchical patterns of the market prices and interprets the psychological aspect of the markets behavior in order to forecast the trend of a stock. The third one uses Neural Networks Methods (more precisely Multi-Layer Perceptron) that searches and recognizes pattern from historical data in order to make a better forecast on the current data.

<figure><img src="image_2.png" /><figcaption>Fig. 1. System Architecture</figcaption></figure>
## Coordinator Agent (CA)

The backbone of our proposed system is the Coordinator Agent, who is responsible with the coordination of the agent signals and actions which are presented in Figure 2.

<figure><img src="image_3.png" /><figcaption>Fig. 2. Agent's signals and actions</figcaption></figure>

All other agents are passing the results gathered to this agent for a more accurate interpretation, meaning that these agents are not interpreting the results, but just send it to CA. The main goal of this agent is to generate buy/sell signal at an earlier time as well as to generate predictions of the trend, so that the gain of the investor approaches maximum.

The signal generating principle is considered to be the following: each analyzing agent has a weight of 0.33% in the final result, if the final result has a probability greater than 50% then CA will trigger the appropriate buy/sell signal. Each analyzing agent will return to CA an integer value in the range of [-1, 1]: 1 for 100% probability for a buy signal, -1 for 100% probability for a sell signal. If the sum of the returned value is greater than 1.5 then a buy signal is triggered and if is lower than -1.5 a sell signal is triggered. Our system provides a probability of 100% that the next day price will rise if all three analyzing agents return +1 value to CA. In Table 1 and Table 2 we present the weights for computing the return value for CA.

For Technical Analysis - Profit Methods Agent we have weight(y) = 0.25 for each analyzing method. These weights are multiplied with +1 if we have a buy signal, 0 if we cannot distinguish a signal, and -1 if we have a sell signal. The result of this multiplication is then returned by each analyzing agent to CA.

## Symbol Query Agent (SQA)

CA starts the analysis by signaling SQA to query the stock database servers about a particular share. Our system uses the services provided by SSIFBroker.ro, due to its simple method for downloading the historical data from BSE
<table><caption>**Table 1.** Neural Network Prediction Agent Weight Distribution</caption><tr><td>Forecasted Price Difference (diff)</td><td>0&lt;|diff|&lt;2.5%</td><td>2.5%&lt;|diff|&lt;5%</td><td>5%&lt;|diff|&lt;10%</td><td>10%&lt;|diff|&lt;15%</td></tr><tr><td>Weight(y)</td><td>0.25</td><td>0.5</td><td>0.75</td><td>1</td></tr></table>

<table><caption>**Table 2.** Elliott Wave Agent Weight Distribution</caption><tr><td>Elliott Wave Number</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>a</td><td>b</td><td>c</td></tr><tr><td>Weight(y)</td><td>-</td><td>0.5</td><td>1</td><td>0.66</td><td>0.33</td><td>-1</td><td>-0.66</td><td>-0.33</td></tr></table>

by using the HTTP portal and Comma-Separated Variables (CVS) files. The symbol market and period can be specified in the HTTP address. Also this agent can be modified for downloading data directly from BSE web server.

### Parse Info Agent (PIA)

The data downloaded is then used by PIA in order to parse the essential information and will save the data into Temporary Stock Data Storage. This Stock Data can be then used by the other agents for analyze. When PIA is complete, CA signals Elliott Wave Agent, Technical Analysis Profitable Methods Agent and Neural Network Prediction Agent for a parallel analysis of the historical data.

### Elliott Wave Agent (EWA)

After receiving the Begin Analysis signal from CA, the EWA will start to analyze the data gathered by PIA on cycles and try to forecast market trends, by searching for extremes values in investor psychology, highs and lows in prices. The Elliott Wave patterns link to form five and three-wave structures which can be predicted, regardless of the size or lengths. By distinguishing the waves and wave structures, the application of the wave principle is a form of pattern recognition.

### Neural Network Prediction Agent (NNPA)

NNPA uses Multi-Layer Perceptron Method with variable number of layers in order to predict tomorrow's change. Due to the variable number of layers we can calculate more accurately the predicted values. We discovered, on previous research, that we have a better prediction of stock price if we let the neural network to compute which is the necessary number of hidden layers that it should use, not to give it a fix number of hidden layers.

We set as the maximum difference value between today close value and today generated value to be 1%, meaning that:
$$ (|\text{Today Generated Value} \setminus \text{Today Close Value} - 1|) < 0.01. \qquad (1) $$

Starting from 1 hidden layer, NNPA will forecast Today's Value. If (1) is not satisfied than the number of hidden layers will be incremented with one.

For example different stock share, from different industry type, could need a different number of layers to calculate today's value. Also this value is then used for forecasting tomorrow's value.

## Technical Analysis - Profit Methods Agent (TAPMA)

TAPMA uses data interpreters and other tools to search for times when a security is having a rise period or a fall period, meaning that it predicts what is could happen in the next period by analyzing the historical data and not by searching patterns. The data interpreters are: Gap Analysis Patterns (GAP), Breakout Systems (BreakS), the Market's Mode (MM) and the Momentum Precedes Price concept (MPP). Each of them works in a parallel mode, and don't interact with each other.

1. GAP analysis will trigger a buy/sell signal under these conditions:

- Buy: (Today Open > Yesterday High) & (price = Today Open+0.3\*Average (TrueRange, 3))

- Sell: (Today Open < Yesterday Low) & (price = Today Open+0.3\*Average (TrueRange, 3))

2. BreakS analysis will trigger a buy/sell signal under these conditions:

- Buy: (price = Highest (High, 20))

- Sell: (price = Lowest (Low, 20))

3. MM analysis will trigger a trending/consolidating signal under these conditions:

- Trending: (Today ADX > 25) & (Yesterday ADX < 25)

- Trending: (Today ADX > 25) & (Yesterday ADX < 25)

- Consolidating: (Today ADX < 20) & (Yesterday ADX > 20)

- Consolidating: (Today ADX < 45) & (Yesterday ADX < 45)

4. MPP analysis will trigger a buy/sell signal under these conditions:

- Buy: (MO > 0) & (MO = Highest (MO, 32))

- Sell: (MO < 0) & (MO = Lowest (MO, 32)),

where ADX represents Average Directional Movement, MO represents Momentum Oscillator and TrueRange is the larger of the following:

- The distance between today's High and today's Low.

- The distance between today's High and yesterday's Close, or

- The distance between today's Low and yesterday's Close.

After each method finishes the analysis, TAPM agent is responsible with the interpretation of the intermediate result. GAP analysis signals an important event, BreakS analysis signals if it is a good moment to buy / sell, MM analysis signals if the market is trending or consolidating and MPP analysis signals if the price will continue further in the same direction. Together these four data interpreters can trigger a strong signal to buy or sell.
# 4 Results

Our architecture uses JAVA Agent Development (JADE) framework for implementing our system agents. By using JADE we can fully distribute the resources, the information and the control on a computer or mobile terminals. The data used by SMMARS framework are downloaded from the services offered by ssif-brocker.ro, which is a founding member of the Bucharest Stock Exchange.

We test our proposed system on two Bucharest Stock Exchange symbols: OLT and TLV, based on a time frame of one month (March 2012).

<figure><img src="image_4.png" /><figcaption>Fig. 3. OLT symbol analysis during March 2012</figcaption></figure>

Figure 3 shows the analysis performed by our system on a short time frame for a descending trend. The system had generated two sell signals at day 5 and day 17 and a buy signal at day 23. The first sell signal is generated by the GAP analysis and the second one by BreakS, who is acting like a Stop Loss indicator. The buy signal is generated by MPP. We should follow the next period to see if the market had reverted the price trends as the MPP predicted. On these analysis we considered a time period of 14 days for calculating temporary technical indicators that were used by our system: Average Directional Index, Momentum Oscillator, Exponential Moving Average and Average True Range. From the chart we can also notice that our system is generating the sell signal at almost the highest price of the month (1.27 p.u / share) and the buy signal after the price tried to break the current trend (at 0.96 p.u / share), meaning a net difference of +32%.

Starting from the current data of a stock, we can predict the tomorrow's value and by using the special Technical Analysis methods the system can give a buy / sell signal. (Table 3)
<table><caption>**Table 3.** Stock Price, Predicted Price and Buy / Sell Signals for TLV symbol analysis during March 2012</caption><thead><tr><th>Current data</th><th>Predicted data</th><th>Gap Analysis Signal</th><th>Breakout System Signal</th><th>Momentum Precedes Price</th></tr></thead><tbody><tr><td>1.030</td><td>1.030</td><td></td><td></td><td></td></tr><tr><td>1.080</td><td>1.051</td><td></td><td>Buy</td><td>Buy</td></tr><tr><td>1.100</td><td>1.090</td><td></td><td></td><td></td></tr><tr><td>1.130</td><td>1.160</td><td></td><td></td><td>Buy</td></tr><tr><td>1.135</td><td>1.126</td><td></td><td></td><td></td></tr><tr><td>1.065</td><td>1.093</td><td>Sell</td><td></td><td></td></tr><tr><td>1.100</td><td>1.090</td><td>Buy</td><td></td><td></td></tr><tr><td>1.100</td><td>1.231</td><td>Buy</td><td></td><td></td></tr><tr><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td></tr><tr><td>1.081</td><td>1.064</td><td>Sell</td><td></td><td></td></tr><tr><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td></tr><tr><td>1.090</td><td>1.090</td><td>Buy</td><td></td><td></td></tr><tr><td>1.141</td><td>1.060</td><td></td><td></td><td>Buy</td></tr><tr><td>1.126</td><td>1.120</td><td></td><td></td><td></td></tr><tr><td>1.150</td><td>1.150</td><td></td><td>Buy</td><td>Buy</td></tr><tr><td>1.150</td><td>1.190</td><td></td><td>Buy</td><td>Buy</td></tr><tr><td>1.169</td><td>1.160</td><td></td><td></td><td></td></tr><tr><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td></tr></tbody></table>

Figure 4 presents the system analysis on a rising trend; it generates five buy signals (at day 3, 5, 9, 14 and 22) and two sell signals (at day 8 and 20). We can easily notice that the first sell signal (generated by GAP analysis) is not correctly placed, because at day 10 the price is having an increase. This increase is correctly predicted by 3'th buy signal. Also the second sell signal is generated yet again by BreakS, which is acting such as a Stop Loss Indicator. The net gain in this situation for buying at day 3 (1.08 p.u/share) and selling at day 20 (1.141 p.u/share) is +5.6%. The time period used for the technical indicator is 14 days.

In Figure 5 we present the analysis for a long period of time (1 year) performed by Elliot Wave Agent. As we can notice, this agent is best suited for sell signals, as it generates six major sell signals during the time period. We can also notice that there are two type of wave that an agent is able to distinguish: up trend (sell signals 1, 2 and 5) and down trend (signals 3, 4 and 6). By using this analysis we can maximize our profit by selling at the highest price during an Elliot Wave. The up-trend waves are generating the maximum profit for us, as the sell signal is generated at the moment when the 5'th wave is changing the trend. The down-trend waves sell signals are considered to be such as Stop-Loss signals, because the signals are generated at the moment when 4'th wave is changing the trend. Related to the buy signals, the system is generating four buy signals, each after a down-trend Elliot Wave. Buy signals 2 and 3 are confirmed by the price
<figure><img src="image_5.png" /><figcaption>Fig. 4. TLV symbol analysis during March 2012</figcaption></figure>

movement in the next period and more, our system will forecast a buy signal at
the moment when 5'th wave from sell signals number 6 is changing the trend.

<figure><img src="image_6.png" /><figcaption>Fig. 5. Elliott Wave Agent Analysis</figcaption></figure>

We will compare our system’s results with “Multi-Agent Stock Trading Sys-
tem”. We instructed each model to perform it’s analysis based on the same
time-frame (March 2012) and o the same symbol (OLT).

We can notice that our system is generating the sell signal 3 days ahead
of MASTS system, and at a higher price (1.28 p.u / share vs 1.2 p.u / share)
meaning a net gain of +6% ; also the BreakS analysis will generate the Stop-
Loss signal at the end of the down trend (0.8 p.u / share). The buy signal is
generated by MASTS right after changes had occurred in the trend at 0.95 p.u /
share. Because our system is using Elliot Wave analysis, we can that now detect
<figure><img src="image_7.png" /><figcaption>Fig. 6. Comparison between the Stock Market Multi-Agent Recommendation System (SMMARS) and Multi-Agent Stock Trading System (MASTS) buy / sell signals</figcaption></figure>

if the buy signal is detected before the 5'th Elliot wave is finished, meaning that the buy signal detected by MASTS is not a valid buy signal. Our system will generate a buy signal at the moment when the 5'th wave is finished and the price trend will reverse in an up direction. We can conclude that both systems can detect buy/sell signals at good price/share ratio, but because our proposed system is implementing the Elliot Wave principle, we can detect if non-valid signals appear. Also our system is implementing a Stop-Loss mechanism which is able to save future losses.

Figure 7 presents the recommendation system based on NNPA and TA for TLV symbol for a medium time frame of 100 days. If the recommendation value is +0.1 then the system will trigger a BUY signal and if it is -0.1 it will trigger a SEL signal. These signals will then be filtered by EWA for a more accurate prediction.

Figure 8 presents the recommendation system based on NNPA and TA for OLT symbol for a short time frame of 60 days. The signals are triggered the same as described above.

We quantify the gain/loss in Tabel 4 based on Figure 8:

## 5 Conclusion and Future Work

With this system architecture we proposed a new approach of analyzing the historical data of stock market, by combining pattern recognition software like Neural Network and Elliot Wave with Technical Analysis methods that proved they can be used in predicting buy / sell signals and trends.
<figure><img src="image_8.png" /><figcaption>Fig. 7. Recommendation System based on NNPA and TA for TLV Symbol for a Medium Time Frame of 100 Days</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>Fig. 8. Recommendation System based on NNPA and TA for OLT Symbol for a Short Time Frame of 60 Days</figcaption></figure>

<table><caption>Table 4. Gain/Loss quantification of OLT Symbol Data</caption><thead><tr><th>Day</th><th>3</th><th>10</th><th>25</th><th>32</th><th>57</th></tr></thead><tbody><tr><th>BUY Price</th><td>0.77</td><td>-</td><td>0.9</td><td>0.9</td><td>-</td></tr><tr><th>SELL Price</th><td>-</td><td>0.8</td><td>-</td><td>-</td><td>1.37</td></tr><tr><th>Gain/Loss per share</th><td>-</td><td>0.8-0.77=+0.03</td><td>-</td><td>-</td><td>1.37-0.9=+0.47</td></tr><tr><th>Gain/Loss in % per share</th><td>-</td><td>+3%</td><td>-</td><td>-</td><td>+52%</td></tr></tbody></table>
By adding both type of Neural Network we can forecast the next day price movement as well as the buy / sell signal, maximizing the profit because the buy/sell at the lowest / highest price.

Also, by adding the Elliot Wave capability, we added a Stop-Loss mechanism; so that the price trend enters in down period, the user can be warn at the beginning of 5'th wave. By adding a Multi-Agent Architecture we can better integrate the pattern recognition agents, who communicate with each other.

After comparing the result given by SMMARS and the one's of the MASTS, we conclude that SMMARS gives a more appropriate result in order to have a gain on the stock market.

As a future work, we propose to solve the risk management problems in order to minimize the losses on a portfolio and to take decision based on noises, how much and in which circumstances these noises can influence the market trend.

This system can be used in order to generate forecasts based on historical data in tourism domain such as the number of specific utilities and the service demands that must be used in order to attract tourist in a region.

# 6 Acknowledgment

This work was partially supported by the strategic grant POSDRU/CPP107/ DMI1.5/S/78421, Project ID 78421 (2010), co-financed by the European Social Fund - Investing in People, within the Sectorial Operational Program Human Resources Development 2007 - 2013.

And, partially supported by the grant of the European Commission FP7-REGPOT-CT-2011-284595 (HOST) and Romanian national grant PN-II-ID-PCE-2011-3-0260(AMICAS).

# References

1. G. S. Atsalakis, E. M. Dimitrakakis, C. D. Zopounidis, Elliott Wave Theory and neuro-fuzzy systems, in stock market prediction: The WASP system, Elsevier, Expert Systems with Applications, vol. 38, Pages 9196-9206, 2011

2. P.-C. Chang, C.-H. Liu, J.-L. Lin, C.-Y. Fan, C. S.P. Ng, A neural network with a case based dynamic window for stock trading prediction, Elsevier, Expert Systems with Applications, Volume 36, Issue 3, Part 2, April 2009, Pages 6889-6898

3. E. Guresen, G. Kayakutlu, T. U. Daim, Using artificial neural network models in stock market index prediction, Elsevier, Expert Systems with Applications, Volume 38, Issue 8, August 2011, Pages 10389-10397

4. M. Tirea, I. Tandau, V. Negru, Multi-Agent Stock Trading Algorithm Model, SYNASC - 13th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, September 26-29, 2011, Timisoara, Pages 365-372

5. M. Lam, Neural network techniques for financial performance prediction: integrating fundamental and technical analysis, Elsevier, Decision Support Systems, Volume 37, Issue 4, September 2004, Pages 567-581
6. S. W. Poser, Applying Elliott Wave Theory Profitably, John Wiley & Son, 2003

7. M. Ruggiero Jr, Cybernetic Trading Strategies - Developing a Profitable Trading System with State-of-the-Art Technologies, John Wiley & Son, 1997

8. Z. H. Khan, T. S. Alin, Md. A. Hussain, Price Prediction of Share Market using Artificial Neural Networks (ANN), International Journal of Computer Applications, Volume 22, No. 2, May 2011, Pages 42-47

9. R. P. Schumakera, H. Chenb, A quantitative stock prediction system based on financial news, Information Processing & Management, Volume 45, Issue 5, September 2009, Pages 571-583

10. A. Alsubaiea, M. Najand, Trading volume, time-varying conditional volatility, and asymmetric volatility spillover in the Saudi stock market, Journal of Multinational Financial Management, Volume 19, Issue 2, April 2009, Pages 139-159

11. J.-L. Wanga, S.-H. Chan, Stock market trading rule discovery using pattern recognition and technical analysis, Expert Systems with Applications, Volume 33, Issue 2, August 2007, Pages 304-315

12. Ch. Pierdziocha, J. Döpkeb, D. Hartmanna, Forecasting stock market volatility with macroeconomic variables in real time, Journal of Economics and Business, Volume 60, Issue 3, May-June 2008, Pages 256-276

13. C. Boroden, Fibonacci Trading: How to Master the Time and Price Advantage, McGraw-Hill, 2008