A Stock Trading Algorithm Model Proposal, based on Technical Indicators Signals

Similar documents
Business Intelligence: Data Mining in Finance

Technical Analysis. Technical Analysis. Schools of Thought. Discussion Points. Discussion Points. Schools of thought. Schools of thought

An Automated Guided Model For Integrating News Into Stock Trading Strategies Pallavi Parshuram Katke 1, Ass.Prof. B.R.Solunke 2

A New Approach to Neural Network based Stock Trading Strategy

Neural Network Stock Trading Systems Donn S. Fishbein, MD, PhD Neuroquant.com

Strategy Modeling and Classifier Training for Share Trading

NEURAL networks [5] are universal approximators [6]. It

MATHEMATICAL TRADING INDICATORS

Genetic algorithm evolved agent-based equity trading using Technical Analysis and the Capital Asset Pricing Model

Tai Kam Fong, Jackie. Master of Science in E-Commerce Technology

Chapter 2.3. Technical Analysis: Technical Indicators

Empower Mobile Algorithmic Trading Services with Cloud Computing

Professional Trader Series: Moving Average Formula & Strategy Guide. by John Person

High Probability Trading Triggers for Gold & Silver

A STUDY ON EQUITY SHARE PRICE MOVEMENT OF SUN PHARMACEUTICALS INDUSTRIES LIMITED

Chapter 2.3. Technical Indicators

Technical Indicators Tutorial - Forex Trading, Currency Forecast, FX Trading Signal, Forex Training Cour...

Finanzdienstleistungen (Praxis) Algorithmic Trading

NEDBANK PRIVATE WEALTH STOCKBROKERS Graphical Analysis Manual

News Trading and Speed

Advanced Trading Systems Collection MACD DIVERGENCE TRADING SYSTEM

The Master of Science in Finance (English Program) - MSF. Department of Banking and Finance. Chulalongkorn Business School. Chulalongkorn University

SAIF-2011 Report. Rami Reddy, SOA, UW_P

Empirical Analysis of an Online Algorithm for Multiple Trading Problems

News Trading and Speed

THE MACD: A COMBO OF INDICATORS FOR THE BEST OF BOTH WORLDS

Proceedings of the 9th WSEAS International Conference on APPLIED COMPUTER SCIENCE

FREEFOREXEBOOK.ORG. Forex Trading

The Applications of Genetic Algorithms in Stock Market Data Mining Optimisation

Highly Active Manual FX Trading Strategy. 1.Used indicators. 2. Theory Standard deviation (stddev Indicator - standard MetaTrader 4 Indicator)

A Hybrid Load Balancing Policy underlying Cloud Computing Environment

Market Microstructure: An Interactive Exercise

Disclaimer: The authors of the articles in this guide are simply offering their interpretation of the concepts. Information, charts or examples

Stop Investing and Start Trading. How I Trade Technical Strategies Over Fundamental Strategies

Leon Wilson Trading Success

Designing a Decision Support System Model for Stock Investment Strategy

Numerical Research on Distributed Genetic Algorithm with Redundant

Trend Determination - a Quick, Accurate, & Effective Methodology

How To Determine If Technical Currency Trading Is Profitable For Individual Currency Traders

International Journal of World Research, Vol: I Issue XIII, December 2008, Print ISSN: X DATA MINING TECHNIQUES AND STOCK MARKET

Transition Method into Alternate Symbols of Korean Option Market by Expiration Date

How to use Hamzei Analytics CI and DCI Indicators By Fari Hamzei

The Application of Trend Following Strategies in Stock Market Trading

White Paper Electronic Trading- Algorithmic & High Frequency Trading. PENINSULA STRATEGY, Namir Hamid

A Sarsa based Autonomous Stock Trading Agent

STREET SMARTS I. Planetary 2 Library. Introduction: Benefits: L I B R A R I E S

ID ING WHEN TO BUY AND SELL USING THE STOCHASTIC OSCILLATOR

Section 1. Introduction to Option Trading

Spare Parts Inventory Model for Auto Mobile Sector Using Genetic Algorithm

atching Currency Moves with The Schaff Trend Cycle Indicator

Stochastic Oscillator.

How To Balance In Cloud Computing

Delivering NIST Time to Financial Markets Via Common-View GPS Measurements

JUST SIT BACK AND LET THE GIRTH MODEL MAKE MONEY FOR YOU. Elham Negahdary

Dynamic Trading Indicators New Techniques for Evolving Markets. Presented by David Stendahl

Price Prediction of Share Market using Artificial Neural Network (ANN)

ValueCharts TradeStation

The Jim Berg Entry and Exit System. 1.

A Load Balancing Algorithm based on the Variation Trend of Entropy in Homogeneous Cluster

Using News Articles to Predict Stock Price Movements

Supply chain intelligence: benefits, techniques and future trends

A Comparison of Genotype Representations to Acquire Stock Trading Strategy Using Genetic Algorithms

Fleet Management Solutions: Effective fuel management and lowering operating expenses

THE INTERNATIONAL JOURNAL OF BUSINESS & MANAGEMENT

High Frequency Trading Volumes Continue to Increase Throughout the World

A Study on Commodity Derivative Market of Selected Non- Agricultural Products (Gold, Crude Oil, Copper) in the Chennai Market- An Analysis

Map-Parallel Scheduling (mps) using Hadoop environment for job scheduler and time span for Multicore Processors

Data Mining Solutions for the Business Environment

DATA MINING TECHNOLOGY. Keywords: data mining, data warehouse, knowledge discovery, OLAP, OLAM.

Integrated Approach Model of Risk, Control and Auditing of Accounting Information Systems

Stock Trading Using Analytics

ALGORITHMIC TRADING USING MACHINE LEARNING TECH-

Intraday FX Trading: An Evolutionary Reinforcement Learning Approach

Lecture 24: Market Microstructure Steven Skiena. skiena

Neural Network and Genetic Algorithm Based Trading Systems. Donn S. Fishbein, MD, PhD Neuroquant.com

Contrarian investing and why it works

Real Time Network Server Monitoring using Smartphone with Dynamic Load Balancing

XMPP A Perfect Protocol for the New Era of Volunteer Cloud Computing

Clearing and Settlement Case Study

Self-organized Multi-agent System for Service Management in the Next Generation Networks

IMAV: An Intelligent Multi-Agent Model Based on Cloud Computing for Resource Virtualization

Improved Trend Following Trading Model by Recalling Past Strategies in Derivatives Market

8 Day Intensive Course Lesson 5 Stochastics & Bollinger Bands

Fuzzy logic decision support for long-term investing in the financial market

APPLICATION OF ADVANCED SEARCH- METHODS FOR AUTOMOTIVE DATA-BUS SYSTEM SIGNAL INTEGRITY OPTIMIZATION

Day Trading Stock Controller

Review on Financial Forecasting using Neural Network and Data Mining Technique

TECHNICAL CHARTS UNDERSTANDING TECHNICAL CHARTS

Using Bollinger Bands. by John Bollinger

ELECTRONIC TRADING AND FINANCIAL MARKETS

5 Pitfalls To. Avoid For. Sucessful

KNOWLEDGE-BASED IN MEDICAL DECISION SUPPORT SYSTEM BASED ON SUBJECTIVE INTELLIGENCE

Trading Stocks and Options with Moving Averages A Quantified Approach

THE INTELLIGENT BUSINESS INTELLIGENCE SOLUTIONS

rtfx asset ManageMent ServiceS INFORMATION BROCHURE

A Comparative Study of the Pickup Method and its Variations Using a Simulated Hotel Reservation Data

Transcription:

Informatica Economică vol. 15, no. 1/2011 183 A Stock Trading Algorithm Model Proposal, based on Technical Indicators Signals Darie MOLDOVAN, Mircea MOCA, Ştefan NIŢCHI Business Information Systems Dept. Babeş-Bolyai University of Cluj-Napoca {Darie.Moldovan, Mircea.Moca, Stefan.Nitchi}@econ.ubbcluj.ro The algorithmic stock trading has developed exponentially in the past years, while the automatism of the technical analysis was the main research are for implementing the algorithms. This paper proposes a model for a trading algorithm that combines the signals from different technical indicators in order to provide more accurate trading signals. Keywords: Decision Support System, Trading Algorithm, Technical Analysis 1 Introduction The use of technical analysis indicators in decision making for stock investments stays a controversial subject, being appreciated by some investors, but rejected by others [4]. While professionals and researchers from the academic world developed new methods and indicators, live or simulated tests are needed to validate them [5]. The price prediction is a very complex issue, and selecting the right technical indicators for the analysis of a particular stock is one of the first preoccupations of the investors that use the technical analysis. One difficulty is the tuning of the parameters of these indicators in a way that makes their signals correct in a percentage as high as possible [1]. While the behavior of the stocks is different from one to another and changes during time, the choice of parameters values becomes a difficult task without the help of an advanced computational method. The data mining methods are considered to be a smart choice for selecting the right technical indicators, allowing tests on very large datasets (an essential condition, regarding the large volume of financial data available) and many combinations of parameters values, combining daily, weekly or monthly prices for tests [2] [5]. Our objective is to propose a methodology that combines different technical indicators, based on tests conducted over data sets gathered from the international or local stock markets, and obtaining buy or sell signals with an improved accuracy, compared to the results obtained using the use of a singular indicator, comparing the results with other research conducted. The reminder of the paper is structured as follows. We describe the general conditions of trading algorithms development in section 2. In section 3 we describe our proposed methodology for designing a trading algorithm based on signals from three different technical analysis indicators. Section 4 is for conclusions and further developments discussion. 2 Related work Most of the studies regarding the trading algorithms are conducted either as the design of an agent that works in a simulated environment, proving their efficiency on the test data or based on other studies, trying to prove a superior approach of the problem described. In the past years algorithmic trading has become a strong preoccupation for all the major investors of the financial market, starting 2004 the American markets being dominated by this kind of trading [6]. The first reason for this trend is the certainty that the algorithm will follow with perfect consistency strict rules. Human traders usually follow trading rules, but become uncertain at some point that something that worked in the past will work this time too, and will make some changes, causing an important damage to the trading strategy.

184 Informatica Economică vol. 15, no. 1/2011 A condition for the successful implementation of a trading algorithm is that all the processes involved to be automated. From the gathering of the market data to sending the orders to the market must be done automatically, any delay causing a loss of accuracy. The success of an algorithm, besides the trading strategy, depends on the infrastructure and the programming language used. The reaction speed of the algorithm to the incoming market data, the processing and the response are all key factors for the success or failure. The faster the algorithms react to live data, the better the strategy proposed will be applied. The scope of the algorithm is to take profit from the price changes of the stock traded, considering precise rules, considering the market data (price and/or volume traded) and offering buy or sell signals. The main types of trading algorithms are considering momentum, relative-value or market microstructure. The first category tries to determine trends, based on price movements, considering different statistical indicators, the most common being the average. They are considered to perform better on markets that have a persistent trend in time. Our approach is for this type of algorithms, as will be discussed later. Another type of algorithms is the one that compares the evolution of one or more financial instruments and, based on this, buys the ones considered undervalued and sells the overvalued ones. The algorithms based on the microstructure of the market will consider the order book information, processing information that otherwise is difficult to keep and observe by a human trader and develop a time-effective strategy. According to Russell [8] the performance of a trading algorithm can be tested by three different approaches: the first is when one will use a given probability distribution for the stock prices the Bayesian method; the competitive analysis assumes the worst case possible and considers uncertainty for the prices; the other approach is to test the algorithms on a simulated environment, using historic data collected. The signal indicator considered in our model proposal is a combination of three momentum indicators used by the technical analysis and the benchmark will be if a signal aggregation will lead to better results than the signals gathered individually from the indicators. The three indicators are MACD(Moving Average Convergence-Divergence), ROC(Price Rate of Change) and STS (Stochastic Oscillator). MACD is a widely used indicators and tracks the changes in strength, direction, momentum and direction of a trend. It is calculated considering the Exponential Moving Average(EMA) for two different periods and compare them. The formula for calculating an EMA at a certain point is the following: where is a constant smoothing factor expressed like a percent or as the number of periods. Generally, EMA= The weighting factor in each data point (p) is decreasing exponentially, so the older the data point, the less influence will have in the result. Next, the MACD formula is the following: MACD =, where a < b. The trade signals are given when the EMA for the shorter period increases at a higher value than the longer EMA ( ) - a buy signal - or the shorter EMA becomes smaller than the longer EMA. The Price Rate of Change (ROC) indicator is an oscillator that calculates the movement of the price between the

Informatica Economică vol. 15, no. 1/2011 185 current time price and the one of n periods of time before. The calculation formula is the following: or the relative value: Where t is the current time and n is the number of periods of time in the back. The ROC signals when a certain stock is overbought or oversold, the trading signals occurring when a divergence appear against the current price evolution. The Stochastic Oscillator measures the momentum of the market by considering the trading range from a certain period of time. For the calculation we use the following formulas: where C represents the closing price of the stock, L the lowest price for the period, while is the maximum price. %D = 3 period MA(%K), Where MA(%K) is the moving average of %K. 3 Proposed methodology The algorithm gets in touch with two independent entities and an efficient communication between them must be assured. First the database from which the data for analysis is gathered in real time. This is a one way communication, from the database to the system. An important issue is the consistency of the data, missing or unformatted data is not acceptable, the technical indicators being very sensitive. The other entity is the market(e.g. Stock Exchange). A mutual communication is needed in this case. The system sends trading orders to the market and the market sends responses whether they were executed or not. A very stable and fast connection is needed between the two, the execution speed being a very important factor for the success of a trading algorithm, sometimes the precision must be of milliseconds [7]. Inside the system, the trading algorithm is the core. All other processes send their signals to the algorithm, which reacts depending on the calculations made, deciding whether to send orders to the market, close the open positions or not to react at all, just wait for the data to change so new information becomes available. The system will perform additional tasks, in addition to the trading signal aggregation. These tasks are the open positions management and risk management. Figure 1 shows the integration of the algorithm in the whole system. Market Data Stock Exchange Execution confirmations Trading Algorithm Trading orders Signal 1 computation Signal 2 computation Signal 3 computation Fig. 1. Integration The functionality of the system depends not only on the optimal design, but also on the programming language used. Russell and Yoon[8] consider the.net framework the

186 Informatica Economică vol. 15, no. 1/2011 most appropriate due to it s superior flexibility, scalability compatibility and interoperability. Before entering a trading order, the system must do some validations regarding the management of the positions owned and the risk management. Enter order Indicators Computation B/S Signal Open positions t exceeded Fig. 2. Functionality Check exposure limit Exceded A very often verification of the trading signal must be performed (this interval can be settled depending on the trading strategy, whether it will be a high frequency trading or not). If a signal was issued the status of the current open positions must be checked. An exposure limit that was reached will not allow an order to get in the market. Figure 2 shows the flow of the order validation before entering the market. The flow is a continuous one, in any of the situations occurred; the end of the verification process will mean the beginning of a new flow, with different parameters obtained from the indicators calculation module. The risk management process must also take place in real time, alongside with the indicators calculation and order management. The value of the open positions and cash available must be carefully correlated with the terms settled when the algorithm starts, the tuning of parameters like order value, profit and loss limits depending on tests conducted in a simulated environment but also considering the liquidity of the market, and different risk levels accepted. Profit/Loss Calculations Loss Limit Exceeded Profit Profit Limit Exceeded Enter close position order Fig.3. Risk management Figure 3 shows the risk management process. Like all other processes involved in the system, it is a continuous one, the end of a cycle represents the beginning of a new one,

Informatica Economică vol. 15, no. 1/2011 187 until the algorithm stops. The risk management process is responsible not only for the loss limitation but also for cashing the profit. It has the priority 0 in the system, having the power to stop the entry of a new order in the market even if the order would have been valid in other circumstances. One important issue is the one of tuning the parameters of the technical indicators. Even if in practice there are some standard values for them, the performance of the algorithm can be much affected by a non-optimum parameter value chosen. The main factors that lead to parameters changing are the trend (when the trend is ascending the indicators having some particular parameters will perform considerably better than having the same parameters on a descending trend) and the stock behavior (depending on volatility, the parameters must be adjusted). One smart solution to overcome the issue of choosing among multiple combinations of parameters values in order to find the optimum for the data tested is the use of a Genetic Algorithm[9,10]. A greedy algorithm that would test all the possible combination would be very time consuming, even it would find the best possible solution. The Genetic Algorithm will probably not find the best combination, but one very close to it, acceptable considering the need of time efficiency. 4 Conclusion and future developments perspectives The combination of the three indicators in getting trading signals was tested only by human traders, and the effectiveness of the strategies needs to be proven on a simulated environment in order to validate the proposed model. The integration with a Genetic Algorithm is a highly desirable solution in order to tune up the parameters of the indicators in a quick and reliable way, but also can be used in the discovery of new trading rules. A combination between automatically discovered trading rules and others discovered by experts observations could be a performing way of setting up the automated trading system. Considering that every individual has different risk averseness the risk-return balance must be controlled, which may lead in a development of an evolutionary trading system. A limitation of the state of the art knowledge about developments in this field is a fact that could be an obstacle in the study, in most cases the developers of the algorithms do not make public the results and the methodology used. Acknowledgments This work was supported by ANCS-CNMP, project number PNII 91049/2007. References [1] D. J. Bodas-Sagi, P. Fernández, J. I. Hidalgo, F.J. Soltero and J.L. Risco- Martín, Multiobjective optimization of technical market indicators. In Proceedings of the 11th Annual Conference Companion on Genetic and Evolutionary Computation Conference: Late Breaking Papers. GECCO '09. ACM, New York, pp. 1994-2004. [2] M. Tanaka-Yamawaki, S. Tokuoka, K. Awaji. Short-Term Price Prediction and the Selection of Indicators. Progress of Theoretical Physics. Japan, 2009, pp.17-25. [3] M. Tanaka-Yamawaki, S. Tokuoka. Adaptive Use of Technical Indicators for Predicting the Intra-Day Price Movements. Lecture tes in Computer Science, Springer, 2009. pp.597-603. [4] R.D. Edwards, J. Magee, W.H.C. Bassetti. Technical Analysis of Stock Trends, 9th Edition (Hardcover). American Management Association, 2007. [5] G. C. Silaghi, V. Robu. An agent strategy for automated stock market trading combining price and order book information. In 2005 ICSC Congress on Computational Intelligence Methods and

188 Informatica Economică vol. 15, no. 1/2011 Applications. IEEE Computer Society, 2005. [6] K. KIM, Electronic and Algorithmic Trading Technology. Burlington, MA. Elsevier, 2007. [7] A. Chaboud, B. Chiquoine, E. Hjalmarsson, and C. Vega. Rise of the Machines: Algorithmic Trading in the Foreign Exchange Market. Federal Reserve Board - International Finance Discussion Papers. 2009-980. [8] S. Russell, V. Yoon. Heterogeneous Agent Development: A Multi-Agent System for Testing Stock Trading Algorithms. AMCIS 2005 Proceedings, 2005. [9] L. Lin, L. Cao. Mining in-depth patterns in stock market. International Journal of Intelligent Systems Technologies and Applications. Vol. 4, 2008. [10] H. Subramanian, S. Ramamoorthy, P. Stone, and B. Kuipers. Designing Safe, Profitable Automated Stock Trading Agents Using Evolutionary Algorithms. In Proceedings of the Genetic and Evolutionary Computation Conference, July 2006. Darie MOLDOVAN is a PhD Student at the Faculty of Economics and Business Administration, Business Information Systems department at Babeş-Bolyai University of Cluj-Napoca. His doctoral orientation is towards studying the application of Data Mining in Finance. He is interested in the Business Intelligence field, trading algorithms and automated systems for trading. Mircea MOCA is a Teaching Assistant and PhD Student at the Faculty of Economics and Business Administration, Business Information Systems department at Babes-Bolyai University of Cluj-Napoca. So far he worked on developing distributed computing systems using structured and unstructured P2P architectures. His research interests are volunteer computing systems and building MapReduce applications for Desktop Grids. Ştefan Ioan NIŢCHI is a Professor, PhD, at the Faculty of Economics and Business Administration, Business Information Systems department at Babes-Bolyai University of Cluj-Napoca. He has very strong knowledge in collaborative systems and databases. His research interests are collaborative systems for business intelligence and distributed decision support systems.