Masaryk University Faculty of Economics and Administration Study Programme: Finance

THE USE OF IN TRADING ON FOREX MARKET

Master Thesis

Supervisor: Author: Ing. Peter Mokrička Bc. Marián Hockicko

Brno, May 2014 Masaryk University Faculty of economics and administration

Department of finance

Academic year 2013/2014

ASSIGNEMENT

Name: HOCKICKO Marián

Department: Finance

Topic: THE USE OF TECHNICAL ANALYSIS IN TRADING ON FOREX MARKET

/Czech/ Vyuţití technické analýzy při obchodování na trhu FOREX

P r i n c i p l e s :

The aim:

To propose an optimization of selected technical analysis indicators on the Forex market and formulate recommendations for intraday traders.

Approach of work and the methods used:

1. Definition and characteristics of FOREX market 2. Characteristics of technical analysis and technical analysis indicators 3. Creating, testing and optimization of defined trading strategy 4. Formulation of conclusions and recommendations

Methods: description, analysis, comparison, deduction, synthesis Graphic pictures: acoording to instructions

Extent: 60 – 80 pages

Bibliography:

 BACHRATÝ, Milan. Forex :dobrodružstvo vývoja stratégie. [Slovensko]: Fxmprofit, 2012. 190 s. ISBN 9788097092603.  VESELÁ, Jitka. Investování na kapitálových trzích. Vyd. 1. Praha: ASPI, 2011. 789 s. ISBN 9788073576479.  HARTMAN, Ondřej. Jak se stát forexovým obchodníkem :naučte se vydělávat na měnových trzích. Praha: FXstreet.cz, 2009. 230 s. ISBN 978-80-904418-0.  O'KEEFE, Ryan. Making Money in Forex: Trade Like a Pro Without Giving Up Your Day Job. : John Wiley and Sons, 2010. ISBN 0-470-48728-3.  HARTMAN, Ondřej a Ludvík TUREK. První kroky na FOREXu. Vyd. 1. Brno: Computer Press, 2009. 120 s. ISBN 978-80-251-2006.  Trading and investing in the Forex market using chart techniques. Edited by Gareth Burgess. Hoboken: Wiley, 2009. xiii, 211. ISBN 9780470745274.  Turning losing Forex trades into winners proven techniques to reverse your losses. Edited by Gerald E. Greene. Hoboken, N.J.: John Wiley & Sons, 2008. xi, 224 p. ISBN 0470187697.

Supervisor: Ing. Peter Mokrička

Thesis bulit in: 5. 3. 2013

The deadline for submitting the thesis into the IS is listed in schedule for the academic year

…………………………………… ………………………………………… Head of department Dean

In Brno, 5. 3. 2013

Name and Surname of the Author : Marián Hockicko Title of the Master Thesis: The use of technical analysis in trading on FOREX market Title in Czech: Vyuţití technické analýzy při obchodování na trhu FOREX Department: Finance Supervisor: Ing. Peter Mokrička Year of defense: 2014

Annotation

The master thesis on topic ―The use of technical analysis in trading on FOREX market‖ detects, if there is possibility for improvement in trading using technical analysis indicators and their optimizing. The thesis defines Forex market as an integral part of financial market, introduces market participants and currency pairs. Followed by description of individual elements of technical analysis and subsuming of technical indicators at Forex market. In the last chapter, chosen technical strategies will be tested and optimized afterwards. Finally conclusion and recommendation for intraday traders will be drawn.

Anotace

Diplomová práce na téma "Vyuţití technické analýzy při obchodování na devizovém trhu" zjišťuje, jestli existuje moţnost zlepšit obchodování s vyuţitím indikátorů technické analýzy a jejich optimalizace. Práce definuje trh Forex jako neoddílnou součást finančního trhu, opisuje účastníky trhu a měnové páry, které lze na trhu Forex obchodovat. Následuje popis jednotlivých prvků technické analýzy a začlenění technických ukazatelů na Forexu. V poslední kapitole, budou vybrané technické strategie testovány a následně optimalizovány. Nakonec budou vypracovány závěry a doporučení pro intra-denní obchodníky.

Keywords

Back-test, Foreign exchange market (Forex), indicator, currency pair, optimization, trading strategy, technical analysis

Klíčova slova

Back-test, mezinárodní měnový trh, indikátor, měnový pár, optimalizace, obchodní strategie, technická analýza

Declaration

I hereby state, that I made my master thesis The use of technical analysis in trading on FOREX market on my own with the guidance of my university supervisor Ing. Peter Mokrička and external coordinator Prof. Giovanni Zambruno. I also stated all used literary and other scholarly sources are in accordance to law, internal regulations of the Masaryk University and internal acts of management of the Masaryk University and the Faculty of Economics and Administration of the Masaryk University.

In Brno, May 2014 Author`s sign

Acknowledgements

I would like to express my gratitude to my supervisor Ing. Peter Mokrička, for willingness to supervise thesis in foreign language, for his all-rounded knowledge and the satisfactory amount of time I was granted his company.

I would also like to thank Prof. Giovanni Zambruno (from Università degli Studi di Milano – Bicocca) for his help, advices and incredible willingness to cooperate with international student without any restrictions or any compulsion to do so.

A special thanks to my family and my beloved Ivka for all of the sacrifices that you‘ve made on my behalf. Words cannot express how grateful I am to having you.

Last but not the least, I would like to thank all my friends, in particular Michal and Silvester who have kept me afloat when times were hard or crazy. I am truly lucky to count you amongst my friends.

CONTENT

INTRODUCTION - 9 -

TOTAL OBJECTIVE AND PROJECT STEPS - 10 - METHODOLOGY - 11 -

1 FOREX MARKET - 12 -

1.1 PARTICIPANTS - 12 - 1.2 TRADING HOURS - 13 - 1.3 CURRENCY PAIRS - 15 -

2 APPROACHES TO INVESTMENT INTO FINANCIAL ASSETS - 17 -

2.1 TECHNICAL ANALYSIS - 17 - 2.2 FUNDAMENTAL ANALYSIS - 17 - 2.3 PSYCHOLOGICAL ANALYSIS - 18 - 2.4 EFFICIENT MARKET HYPOTHESIS - 18 -

3 TECHNICAL ANALYSIS AND ITS INDICATORS - 19 -

3.1 ASSUMPTIONS - 19 - 3.2 THEORETICAL BACKGROUND - 20 - 3.2.1 - 20 - 3.2.2 ELLIOTT WAVES - 21 - 3.3 CHART ANALYSIS - 22 - 3.3.1 TYPES OF CHARTS - 23 - 3.3.2 - 27 - 3.3.3 TREND LINE AND TREND CHANNEL - 28 - 3.3.4 MARKET PATTERNS - 28 - 3.4 TECHNICAL INDICATORS - 29 - 3.4.1 TREND INDICATORS - 29 - 3.4.1.1 MA - 29 - 3.4.1.2 Moving Average Convergence Divergence - 32 - 3.4.1.3 Parabolic stop and reverse - 33 - 3.4.2 INDICATORS - 34 - 3.4.2.1 Index RSI - 34 - 3.4.2.2 - 35 - 3.4.2.3 Stochastic - 36 - 3.4.3 INDICATORS - 38 - 3.4.3.1 - 38 -

4 CREATING AND OPTIMIZATION OF STRATEGIES - 40 -

4.1 TECHNICAL DESCRIPTION - 40 -

4.1.1 DATA AND TIMEFRAME - 40 - 4.1.2 SOFTWARE - 41 - 4.1.3 BACKTESTING - 41 - 4.1.4 CHOICE OF CURRENCY PAIR AND INDICATORS TESTED - 42 - 4.2 MONEY MANAGEMENT AND RISK - 43 - 4.2.1 DRAWDOWN - 44 - 4.2.2 LEVERAGE EFFECT - 44 - 4.2.3 STOP-LOSS - 45 - 4.3 TRADING STRATEGY BASED ON MA - 46 - 4.3.1 SIMPLE MA STRATEGY - 46 - 4.3.2 MA CROSSOVER - 50 - 4.4 TRADING STRATEGY BASED ON RSI - 54 - 4.5 TRADING STRATEGY BASED ON MACD - 59 - 4.6 TRADING STRATEGY BASED ON BOLLINGER BANDS - 63 -

5 COMPARISON AND RECOMMENDATIONS - 67 -

CONCLUSION - 69 -

BIBLIOGRAPHY - 70 -

LIST OF TABLES - 74 -

LIST OF FIGURES - 74 -

LIST OF ABBREVIATIONS - 76 -

APPENDIX: GLOSSARY 77

INTRODUCTION

The importance of Forex market wasn‘t always as strong as it is today. When the value of a currency was tied to physical commodity, e.g. silver or gold, it was impossible to benefit from the currency trading. Lately the abandoning of Bretton Woods system with fixed-rate led into floating exchange rate mode that allowed currency rates to be determined by trading on Forex market.

Due to technical development, all financial data that were previously calculated manually and analysed using charts drawn on paper can now be calculated in seconds and drawn directly to computer software. All those advances led into developing more and more sophisticated trading platforms that make currency trading possible and easier even for retail traders.

Nowadays, the exchange rates are incessantly changing as a result of interaction between supply and demand for currency within online trading. The question is: Is there possibility to benefit from this change?

Exactly this question inspired me to find the answer. I was motivated by the authors LO, Mamaysky and Wang and by their scientific work Foundation of Technical Analysis. Those professionals claim that application of some indicators can results in a profit. The problem could be choice of indicators and setting their input values to make profitable strategies. In my master thesis I am trying to find answer even on this puzzle.

Considering the size of issue relating to technical indicators, it is necessary to aim at concrete researched area. Therefore this thesis concerns into specific area of technical indicators and their optimization and use on Forex market using technical analysis. Moreover, for possibility to compare individual indicators, thesis is focusing only on EUR/USD currency pair.

The meaning of this thesis is to point out that there is possibility to trade on profitable level using optimization of strategy and setting inputs correctly. This topic has been chosen due to growing popularity of Forex market. Decision to use technical analysis instead of fundamental or others came from my own long-time experiences and interest in given issue.

- 9 -

TOTAL OBJECTIVE AND PROJECT STEPS

The principal goal of this master thesis is proposition an optimization of selected technical analysis indicators on the Forex market and formulation of recommendations for intraday traders. This thesis should provide the reader with view of possibility of using technical analysis indicators on Forex market and optimization of indicators for achieving profitability improvement. No less importance is put on recommendation for intraday traders.

I aimed to point out profitable trading opportunities using optimization of technical indicators. I implemented an automated trading strategy (ATS) using a suitable programming language. Strategies will be tested on real market data. To achieve the primary objective, thesis is structured into chapters that represent different partial goals.

The first partial goal is to definie and characterize Forex market. This chapter contains detailed describtion of Forex market. Also main participants and their intention to trade foreign currency will be included. Moreover I will aim at currency pairs and their classification into specific divisions by characterist features.

The second partial goal is characteristics of technical analysis and its indicators. This chapter starts with the assumptions, necessary for understanding the workings of technical analysis. Nowadays, some assumptions can be seen as irrational or not properly well-founded, however it came from age-long history, which also will be part of chapter. The most important part will be technical indicators as my thesis is based on its use. Indicators will be described in detail and their trading conditions, parameters and sample will be shown.

The third partial goal is referring to practical part of thesis and is also aimed to create, test and optimize trading strategy based on indicators defined in theoretical part. Despite the fact it is practical part, it starts with technical description necessary to understand setting of strategy and background of backtesting. Essential part of any trading, especially the one on Forex market should be money management. Therefore it will also be part of this chapter.

After all conditions will be explained and background will be set, I will choose trading strategies based on both, the simple indicator and combination of more indicators. Next step will be backtesting and finding the best inputs for strategy to make it more profitable.

The fourth partial goal is formulation of conclusions based on caparison of strategies tested and recommendations for traders. However conclusion will be based only on background defined in meaning of specific currency pair, specific time period, specific time frame. Therefore absolute numbers will not be determinative, but potential improvement of strategy using backtest and optimization technique will be important.

- 10 -

METHODOLOGY

Drawing up this master thesis was preceded by study of the literature focused on the issue of technical analysis and its indicators. Very important sources of information necessary for the development of thesis were books of foreign specialists. Therefore intention to write thesis in English language has occurred.

To reach the goal I used general methods, especially description, analysis, comparison, deduction and synthesis.

Very basic method, also used in my thesis is description, so detailed characteristics of certain or salient aspects. Description is mostly used in the beginning of first chapter where I‘m describing Forex market. Chapter two also use description method to characterize individual approaches to investment. Moreover whole subchapter 4.1 is based on description method, where I am describing technical background of backtest.

Another essential method – analysis – means separating complex topic into the constituent elements, identifying characteristics and relationship between them. I used this method to analyse Forex market, its structure and participants. I also analysed technical indicators as a complex topic divided into smaller segments up to individual indicators.

Comparison is very common method in my thesis, as well. By comparison I understand statement or estimate of similarities and differences. This method is used mainly in fifth chapter to compare results based on strategy tested.

In the fourth chapter, there was used method of deduction, which means deriving logical conclusions from general premises or logical consequences of assumed premises. I applied this method to deduct the problems and results of strategy tested that I have in form of statistical outputs from Metatrader programme.

Opposite process of analysis is synthesis. By synthesis I understand linking constituent elements or abstract entities into whole piece. In the end of thesis I synthesize findings achieved during the process of drawing the thesis.

In addition to those five essential methods, for the needs of this thesis I use also other methods; e.g. graphical – used to construction of charts and statistical – used to construction of tables.

- 11 -

1 FOREX MARKET

Forex is a decentralized global network of trading partners, including banks, public and private institutions, retailers, speculators and central banks who take part in the system of buying and selling money. Trading between dealers represents a huge turnover and thus Forex possesses the largest liquidity of all financial, equity and commodity markets. The Forex market is a spot market, which means that it trades at the current market price as determined by supply and demand within the marketplace [O‗Keefe, R., 2010, p.1-3].

Forex is the fastest-growing financial marketplace in the world. According to BIS, the daily of transactions in this market is nearly $ 5.3 trillion, which makes it undoubtedly the world's largest financial market [Bank for International Settlements 4/2013].

Forex is classified like an over-the-counter market. OTC means that the currency is traded between two parties, without any direct intervention of intermediaries or regulations. The contract terms as well as the agreed price are not publicly disclosed. Terms of a contract and agreed price as well are not disclosed. Considering the fact that the foreign exchange market lacks a central exchange, there is no single price for a given instrument - currency pair. Differences in prices of instrument are not marked, the prices are very close to one another; however, any significant price difference would result in arbitrage opportunity [Frankel, J. A., 2008].

The Forex market was created to facilitate the sale of currency to customers who intend to take delivery of the currency; however, the vast majority of trading is done by speculators seeking nothing more than profit [O‘Keefe, R., 2010, p.2].

1.1 PARTICIPANTS

There are two types of traders on the Forex: consumer traders and speculative traders. A consumer trader exhibits a long-term need for currency and is not so concerned with daily price movements, whereas a speculative trader is only concerned with daily price movements, as that is where the profit potential is. Speculative traders are also called scalpers—they are trying to scalp a profit in a small price movement [Martinez, J., 2007, p.22]. Those traders represent mainly:

Banks The biggest players in the Foreign Exchange are the banks. A large bank may trade billions of dollars in one day. Hundreds of banks participate in Forex, either to hedge for currency risks for themselves or their clients or to simply gain profits for their stockholders. The resulting massive flows of money handled by these large banks are what primarily drives currency prices [Cheng, G., 2007, p.49].

- 12 -

The banks conduct their trading by having a proprietary dealing desk that is responsible for executing orders, dealing and managing risks. In practice, trading takes place in the interbank market, a network of banks and financial institutions. The interbank has the lowest spreads due to very high liquidity and sometimes the spread can even reach zero. Banks also have the highest amount of insider information about the market as they have access to their clients‘ positions. One can easily see why banks have advantage over retail traders.

Central banks Central banks use the Foreign Exchange to enforce monetary policy; hence they play a very important role in the Forex markets. Their aim is to manage currency reserves and keep the fluctuation of their currency rates under control by means of an intervention.

Corporations International firms use the Foreign Exchange for trade, to pay workers and receive payments from clients. Finally, all of their earned profits must be converted to their home currency. They are exposed to the current exchange rate fluctuations and thus may resort to using Forex derivatives to hedge against currency risk.

Investors Most of these institutional speculators, including hedge funds and investment management companies, have international portfolios. Investors deal with bonds, shares and other types of securities offered in foreign countries. All of these activities require obtaining the currency of the foreign country [Levinson, M., 2005, p.18].

Other reason of participating in the currency market might be hedging own risk directly in the market, rather than waiting for a bank to exchange the currency for them [O‗Keefe, R., 2010, p.5].

Speculators A speculator is simply anyone who expects to gain profit from Forex without using it for business reasons. It‘s a trader with a variable amount of capital that seeks to estimate the movement and direction of currency pairs and thus enhance his own capital.

Along with growth of popularity in currency trading, the number of retail speculators involved in Forex grows as well. However, due to decentralization of Forex market it is impossible to estimate the exact percentage of speculations in total trade volume.

1.2 TRADING HOURS

Due to decentralization, Forex market is open 24 hours a day, 5 days a week, which gives it another major difference from other markets. The OTC nature of the Forex market means that currency transactions do not concentrate at one single place, but instead are conducted all over the world; therefore Forex is divided into four time zones called sessions. There are four major trading sessions that account for the majority of volume seen throughout the trading day: Sydney, Tokyo, London and New York session. Because of the geographical distribution - 13 - trading sessions are so overlapped that they cover the entire day. This argument is proven in the following table.

Table 1: Trading sessions 23:00 1:00 3:00 5:00 7:00 9:00 11:00 13:00 15:00 17:00 19:00 21:00 23:00 Sydney

Tokyo

London

New York Source: own illustration, time GMT+1, data: Forex Market Hours 2006

As table 1 shows, there is always at least one session running at a certain time. Overlapping of trading sessions brings greater trading volume, greater volatility, smooth movement of conversion rates and offers better trading opportunities.

Figure 1: Historical hourly trade activity

Source: own illustration, data: Oanda 1996-2014, date 11/09/2013

Price fluctuation varies from day to day and in different hours as well. As a general rule, some days of the week are busier than others. Whether in London, Tokyo, Sydney or the US, pip range movements for all currency pairs tend to be greater towards the middle of the week as is shown in table 2.

Table 2: Average pip range Time zones Day EUR/USD GBP/USD USD/CHF USD/JPY Sunday 21 34 32 22 Monday 97 118 140 90 Tuesday 114 133 165 108 Wednesday 109 120 159 111 Thursday 83 98 124 82 Friday 84 86 109 74 Source: own calculation using Metatrader software

- 14 -

Data from table 2 were computed as an average between daily high and low for last 180 days. Generally speaking, in the middle of the week (Tuesday and Wednesday) Forex trading sessions have the widest pip variation for all currency pairs that offers better trading opportunities.

1.3 CURRENCY PAIRS

Currencies in spot Forex are traded against each other in practice by using currency pairs. A currency pair is usually denoted as XXX/YYY, where XXX is the base currency and YYY the quote currency. The quote of a currency pair represents the number of units of one currency that are required to buy or sell one unit of the other, based on the given exchange rate. For example exchange rate between the Euro and U.S. dollar is 1,34, a trader can purchase 1,34 dollars for each Euro or buy one euro for 1,34 dollars. The goal is to hold currency that by assumption will gain value against other currencies.

Nowadays, according to the BIS survey, almost 90 % of all currencies are traded against the U.S. dollar. Besides the dollar we can mention Euro (EUR), Pound sterling (GBP), Australian dollar (AUD) and Japanese yen (JPY) among the most traded currencies.

Some books refer Swiss franc instead of the Australian dollar like a more traded currency and classify Swiss franc into major currency group. Due to the decentralization of Forex is this argument hardly rebuttable, but according to the BIS survey (Table 3), I consider Australian dollar like a major currency. My inference is based on ever-increasing volume in trading the Australian dollar.

Table 3: Currency distribution of global foreign exchange market turnover Daily currencies turnover in % 1998 2001 2004 2007 2010 2013 American dollar – USD 86,8 89,9 88 85,6 84,9 87 Euro – EUR ... 37,9 37,4 37 39,1 33,4 Japanese Yen – JPY 21,7 23,5 20,8 17,2 19 23 Pound sterling – GBP 11 13 16,5 14,9 12,9 11,8 Australian dollar – AUD 3 4,3 6 6,6 7,6 8,6 Swiss franc – CHF 7,1 6 6 6,8 6,3 5,2 Canadian dollar – CAD 3,5 4,5 4,2 4,3 5,3 4,6 Hong-Kong dollar – HKD 1 2,2 1,8 2,7 2,4 1,4 Swedish krona – SEK 0,3 2,5 2,2 2,7 2,2 1,8 New Zealand dollar – NZD 0,2 0,6 1,1 1,9 1,6 2 Others … 15,5 15,9 20,1 18,6 21,1 Total 200 200 200 200 200 200 Source: own calculation, data: BIS 2013

Table 3 lists the most common currencies and their International Standards Organization (ISO) codes that are used in the Forex market to construct currency pairs. Depending on composition, currency pairs can be divided into 3 groups: major, cross and exotic pairs.

- 15 -

Major pairs Major currency pairs are created by pairing currencies from countries with highly developed economies and financial systems. Major currency pairs are the most liquid and heavily traded currency pairs on the Forex market [O‗Keefe, R., 2010, p.12]. Among them belongs: AUD/USD, EUR/USD, GBP/USD, NZD/USD, USD/CAD, USD/CHF and USD/JPY.

Cross pairs Currency pairs which do not involve the US dollar: EUR/JPY, EUR/GBP, EUR/CHF, GBP/CHF, GBP/JPY.

Before cross pairs were placed on the Forex market, it was necessary to sell one‘s currency for US dollars and then sell back US dollars for the currency needed.

Exotic pairs Exotic pairs represent currencies with a little liquidity and limited dealing, which are neither a major nor minor currencies. Spot rates are available, but may be restricted with regard to transaction amount or government intervention. The forward market could be missing, intermittent, or very expensive [Taylor, F., 2003, p.27]. Generally these are the currencies of the deregulated eastern bloc countries like USD/CZK, USD/PLN.

Instead of trading all the currency pairs available, it is important to concentrate on only few currency pairs and follow also fundamental facts that may have an impact on the exchange rate level. This is recommended to avoid confusion.

- 16 -

2 APPROACHES TO INVESTMENT INTO FINANCIAL ASSETS

Whether the market is efficient or it is not and whether it is possible to analyse and forecast financial markets has been discussed for a long time. Another dilemma discussed was; What analysis use to forecast price movement?; Can we use history to predict future?; Does the fundamental factor really influence price or it is psychological factor that determines trend ?

There is no unequivocal answer, therefore some theories and analysis approaches has arisen. The most relevant of them will be described in this chapter.

2.1 TECHNICAL ANALYSIS

Technical analysis is the study of past price movement for the purpose of predicting future price movement, which, if done correctly, can lead to substantial trading profits. The proof of the profitability trading is detected in [Park, C., Irwin S.H., 2004] manuscript.

The prices studied are typically those of financial instruments such as stocks, commodities, and foreign currencies. For purpose of this these, only foreign currencies will be tested using technical analysis. But regardless what market is being studied, the underlying principles are the same and described in detail in Chapter 3.

2.2 FUNDAMENTAL ANALYSIS

While technical analysis concentrates on the study of market action, fundamental analysis focuses on the economic, social and political forces of supply and demand that cause markets to rise, fall or stay the same.

Those using fundamental analysis as a trading tool look at various macroeconomic indicators such as interest rates, gross domestic product (GDP) or employment cost index (ECI). When those important numbers are released currencies react immediately. If the numbers vary a lot from what was expected, huge moves can occur [Dicks, J., 2010, p.73-75].

According to fundamentals, supply and demand are the real determinants for predicting future price movements. Currency rallies because there is demand for that currency, no matter if the demand is for hedging, speculative, or conversion purposes. Similarly, currency values decrease when there is excess supply [Lien, K., 2013, p.49].

There are many factors that contribute to the net supply and demand for a currency, such as capital flows, trade flows, speculative needs, and hedging needs, therefore prediction of supply and demand is not as simple as it may looks.

- 17 -

Fundamental analysts combine all of this information and factors to assess current and future performance. This requires a lot of work and thorough analysis, as there is no single set of beliefs that guides fundamental analysis [Lien, K., 2013, p.50].

2.3 PSYCHOLOGICAL ANALYSIS

Psychological analysis works with the psychological aspects of crowd behaviour describing a large group of investors trading on the market. Psychological analysts look at behaviour of investors in the market instead of asset analysis. Exchange rate movements or volumes traded have a function of secondary information, from which is analysts able to deduce current market sentiment. Psychological traders do not concentrate on asset itself, but they mainly look for impulse, which could lead to massive buying. To explain investor‘s behaviours and habits is necessary to understand crowd psychology. Among well-known theories, describing crowd psychology belongs Keynes‘s and Kostolany‘s attitude [transl. Veselá, J., 2011, p.518- 519]. As the psychological analysis is not that important for the purpose of this thesis, therefore attitudes of psychological experts will not be described in detail.

From the very nature of psychological analysis, it is clear that the elements are presented in both in the technical and in the fundamental analysis. Therefore, according to Brada (2000) psychological analysis is not seen as separate analysis describing market price movements nor timing into positions, but it can be seen as complement for both analysis mentioned. [transl. Brada, J., 2000, p.7].

2.4 EFFICIENT MARKET HYPOTHESIS

Technical, psychological and fundamental analysis commonly agree that publicly available information result in changes in price, whereas the Efficient market hypothesis (EMH) states that this is not possible.

The efficient markets theory claims that financial markets are efficient in the meaning that the price of any asset reflects all known information. Therefore the price is properly valued and it reflects the collective analysis of all investors [Barnes, P., 2009, p.45].

The EMH states that it is impossible to permanently win over the market by using any information that is already included in price, except inside information. Applied to the Forex market, this would mean that exchange rates reflect information making potential excess returns unpredictable. In other words, it is impossible to steadily profit in the Forex market by trading on information that are publicly available [Barnes, P., 2009, p.45-48].

- 18 -

3 TECHNICAL ANALYSIS AND ITS INDICATORS

Technical analysis as a method of trading has become widespread within the Forex market. Neely (1997) concludes that technical analysis is the most widely used trading strategy in the Forex market. Park and Irwin (2004) advocate that technical analysis works better on Forex market in comparison with other markets; e.g. futures or stock markets.

Technical analysis is the study of market action, primarily through the use of charts, for the purpose of forecasting future price trends. Technical analysis relies on the fact that price charts will always give the most correct picture of a tradable object. ‖Chart is as good as it gets‖. Every information that can be publicly known is already built into the graph [Knight, T., 2007, p.1].

Technical analysis uses indicators and patterns. Indicators are mathematical operations on the range of prices that exist in a chart, whereas patterns are forms that are often repeated over time. In contrast to patterns, technical indicators are defined algorithms that traders use to calculate value of given indicator applying on price chart. Patterns work directly with price chart, where they try to predict future trend on the market [Dicks, J., 2010, p.149-150].

3.1 ASSUMPTIONS

The authors engaged in technical analysis specify various assumptions of technical analysis. Most of them consist of the following assumptions:

 Market action discounts everything This is considered to be the cornerstone of technical analysis. According to technical analysis, traders do not need to study neither fundamentals nor psychological factors affecting the price such as interest rates, GDP, inflation, or the mood of market participants, as they are already reflected in the price. Study of price action is all that is necessary for understanding price changes and determining future predictions [Murphy, J.J, 1999, p.2-5].

The charts do not move by themselves, it is the economic fundamentals (supply and demand) that cause bull and bear markets. The charts simply reflect the bullish or bearish psychology of the marketplace.

 Prices move in trends Price movements always create a trend in which the price stays for a certain period, namely it does not change the direction of its movement immediately. The purpose of charting the price action is to identify trends in their early stages for the purpose of trading in the direction of those trends.

- 19 -

 History repeats itself The key to understanding the future lies in the study of the past. This assumption tells that human behaviour doesn‘t change, and therefore price behaviour doesn‘t change as well. Therefore identifying chart patterns of a bullish and bearish nature will give us an insight as to what might happen in the future, a repetition of the past [Taylor, F., 2003, p.313-314], [Murphy, J.J, 1999, p.2-5].

3.2 THEORETICAL BACKGROUND

Technical analysis started from Dow Theory developed by Charles H. Dow in the beginning of the 20th century. His methods were based on the behaviour of investors, on psychology, and on the movements of prices. Dow Theory included such trading concepts as trends, divergence and support/resistance, for example [Dicks, J., 2010, p.149-150].

Moreover technical analysis is based not only on scientific theories, but also on empirically- based knowledge which creates a very large number of analytical methods.

3.2.1 Dow Theory

Basic principles of modern technical analysis come from theory of Charles H. Dow. This theory still exists in modified forms and is well known and accepted in field of technical analysis. It‘s based on assumption of 6 following axioms.

 Price evolves in trends with certain inertia. On the basis of this axiom we define three types of trend:

o Primary trend: the broad upward or downward movements known as bull or bear markets, which may be of several years duration. o Secondary trend: an important correction in a primary bull market or a rally in a primary bear market. These reactions usually last from three weeks to as many months. o Tertiary trend: usually unimportant, movement represents the daily fluctuation [Kirkpatrick, Ch.D., Dahlquist, J.R., 2011, p.85].

Nowadays, this classification of trends is in various modified forms considered for a basis of technical analysis.

 We distinguish three phases of primary trend:

o The first phase - the phase of accumulation, when experienced investors trade on the basis that the price reflects all the information and the outlook is optimistic. This phase represents reviving confidence from the prior primary bear market. o The second phase - the phase of participation, when there is a price increase in primary bull trend - 20 -

o The third phase - distribution. Price has reached a peak: a change in trend is occurring [transl. Jílek J., 2009, p.104-105].

 The price reflects all available (knowable) information and the opinions of all market participants regarding that information.

 The averages must support each other Dow built two averages - the Industrials and the Rails. The logic behind the theory is simple: When one average recorded a new secondary or intermediate high, the other average was required to do the same in order for the signal to be considered valid. So averages had to exceed previous secondary peak to confirm the continuation of a bull market (bear respectively) [Murphy, J. J, 1999, p.27].

 Volume must confirm the trend Volume was recognized like a secondary, but also important factor in confirming price signals. Simply stated, volume should increase in the direction of major trend. In a major uptrend, volume should increase with the rally in price and should diminish during correction.

 Trends exist until definitive signals prove they have ended A reversal trend must occur before a new primary trend. The trend normally ends with a change in economic / business conditions strong enough to force the change in trend. A trend will go through a correction into a secondary trend before continuing the primary trend [Murphy, J. J, 1999, p.28].

Looking at Technical analysis will help to establish trend ending indicators. The goal of trend traders is not to mistake a correction with the start of a new primary trend. This is why they wait for the weight of evidence to conclude the trend has definitely ended.

Despite popularity, Dow Theory meets up with different criticism. One of them is delayed signal to buy or sell. The theory does not recognize a turn until long after it has occurred and has been confirmed. On the other hand, the correct interpretation of reversals can avoid big losses. A second criticism of Dow Theory is that the different trends are not strictly defined, which brings difficulty in trend determination in case of price fluctuation. For example, secondary trend beginnings often appear like primary trend beginnings, which creates unclear determination of primary trend over time and can stimulate investments in the wrong direction [Kirkpatrick, Ch.D., Dahlquist, J.R., 2011, p.85].

3.2.2 Elliott waves

R.N. Elliott, a stock market speculator, devised his own theory in the early 1930‘s. Elliott theory is focused on classifying market activity according to a set of cycles and ratios of movements. As with the waves on the ocean, market activity ebbs and flows in cycles that repeat and can be subdivided into smaller cycles [Kahn, M.N., 2010, p.275].

- 21 -

The Elliott wave theory gives an overall perspective to market movement, helping to explain development and meaning of chart patterns. Moreover the theory gives the analyst more advanced warnings than traditional trend following techniques. There are three basic aspects of wave theory.

 Pattern - The wave patterns or formations that formulate the most important aspects of the theory.  Ratio - That measures the relationships between the different waves and determines price objectives and retracement points.  Time - Time relationships to confirm the patterns and ratios [Taylor, F., 2003, p.331].

Basic 8-wave pattern: The basic theory contends that the cycle of a market follows a basic 8-wave pattern, which repeats over and over again. The bull phase has 5 waves, followed by the reversal and the bear phase with 3 waves [Taylor, F., 2003, p.331-332].

Figure 2: Elliott waves

Source: Investopedia 2009

In the bull phase the 5 waves are made up of 3 rising waves, numbers 1, 3 and 5 called impulse waves. Wave numbers 2 and 4 are against the rising trend and are called corrective waves. The 5-wave advance is followed by a 3-wave downward correction, waves lettered A, B and C. The most important waves to trade are the impulse waves numbers 3 and 5. Wave 3 usually has the most powerful up move, while the top of wave 5 calls for a reversal of positions [Taylor, F., 2003, p.332].

3.3 CHART ANALYSIS

Rejnuš (2008) characterizes graphical analysis as the action of:

• Creating different charts based on time series of rates and volumes of trade; • Analysing upward and downward formations; • Analysing graphic formations to forecast future exchange rate changes [transl. Rejnuš, O., 2008, p.288-289].

- 22 -

3.3.1 Types of charts

Numerous approaches to analysing price in order to forecast it have been developed. The most common method used in technical analysis is to divide the price movements into certain slices of time, called bars.

A bar is a visual representation of a block of time or price movement. Bars usually contain information such as open, close, high and low, volume and time to summarize trading activity for each day. Different types of bars exist and are used by chartists, such as candlesticks, OHLC bars, Kagi, Point & Figure, Renko etc.

Line chart Line chart is the simplest form of chart constructed by plotting points between the price on the vertical axis and time on horizontal axis and joining them with a price line. Simple line charts are especially useful when studying long-term trends. Because line charts display summary statistics, they are often used when information about several different variables is being plotted in the same graph. Line charts, however, can be used to present data collected at any time interval. More frequent data collection will lead to a more detailed, but more cluttered, graphical presentation [Kirkpatrick, Ch.D., Dahlquist, J.R., 2011, p.207].

Based on own experience, the line chart is much harder to interpret, especially for beginners, because some chart patterns that may have a significant influence on price level are not as easy to spot. I would recommend other types of charts that can give much stronger signals and indications.

Bar chart The bar chart, also called Hi-Lo chart, is an important market analysis tool and a key component of technical analysis. Every bar uses open, high, low, and close data to summarize trading activity for each time frame [Kahn, M.N., 2010, p.25]. They are plotted together in a vertical line in each bar, as can be seen in Figure 3.

Figure 3: Bar chart

Source: Turek, L., 2008, p.66

The high and low prices are connected to form the body of the bar. The open is the small tick mark on the left side of the bar. The close is the tick mark on the right side of the bar. Vertical - 23 - bar that connects high and low prices represents trading range and visualization of market movements.

The bar chart became very popular, because it offers a fair amount of information about the price movement of the currency pair. You can also see where the price has closed with respect to the opening price and thus predict future price movements [Dicks, J., 2010, p.156].

Candlesticks Beginning with Japanese candlesticks, these signals originate with a Japanese rice merchant, who developed a graphical set of rules to use for trading rice. Japanese candlestick charts monitor price movement during a certain period of time. As the candlesticks form, they begin to tell a story of the activity in the market, as well as reflect market sentiment during that time. Every candlestick represents OPEN, HIGH, LOW and CLOSE value of the market. They are usually coloured to represent the direction. Typically, a higher close relative to the open is white (called bull candlestick), a lower close relative to the open may be black (called bear candlestick) [Burges, G. A., 2009, p.7-8], [Nison, S., 1994, p.13-14].

The is a visual representation of the inner workings of a market. The selling pressure or the buying pressure is displayed visually allowing for immediate insight into the market. The candlestick shadows are useful as indicators of resistance and support, allowing lines to be drawn on the chart with relative ease at these levels. It is, however, in the market sentiment and change in market sentiment that candlesticks charts demonstrate best. Simply compare a bar chart to a candlestick chart and this becomes apparent [Burges, G. A., 2009, p.8].

Figure 4: Candlesticks

Source: Burges, G. A., 2009, p.8

Nowadays, Japanese candlesticks provide a better insight into the actual chart and help us effectively predict market movements. However their application on the chart is not enough to understand the financial markets. Candlesticks can often be interpreted falsely especially as many of them look like reversal signals. Another reason that many professional investors find - 24 - candlesticks difficult is that the daily session may trade at the same level for most of the session only to move higher towards the close of the session, the real body is arguably not representative of the real trading session. Therefore, it is necessary to look at the short-term time frame in order to confirm that this has happened so as to clear up any uncertainty [Burges, G. A., 2009, p.10].

Point and figure Point and figure charting is one of the oldest, yet still widely used, charting techniques. In comparison with other chart techniques, point and figure is unique in that it is constructed in a completely different way but is analysed with the same techniques. Point and figure differs from usual time series charts where the passage of time moves the postings to the chart from left to right. In contrast, Point and Figure Charts move to a new column to the right not by the passage of time but only when price changes direction by some predefined box size times reversal amount. Volume is excluded as well [Kahn, M.N., 2010, p.293], [Dicks, J., 2010, p.160].

Point and figure graph is constructed with rising ―X‖s and falling ―O‖s which represent discrete price intervals. All price movements that are less than the assigned price interval are ignored. This was later refined to plotting price rises as ―X‖s and falling prices as ―O‖s, making the direction of the market easy to read [Kahn, M.N., 2010, p.294].

Figure 5: Point and figure graph

Source: TA-Guru 2010

It seems pretty obvious when describing the past, but not so sure about the future. It has not been used in my trading method, but is recommended for general education purposes.

- 25 -

Kagi The Japanese is a unique kind of line chart designed to filter out minor, short-term market noise. Kagi charts only add a new vertical line when prices have reversed enough to cancel the current uptrend or downtrend, which makes it similar with . Trend continuation is represented by Kagi line, extended in the prevailing trend direction whenever the current closing price continues in the same direction as the latest vertical Kagi line. For a trend reversal, a new Kagi line heading in the opposite direction is drawn in a new column to the right only when the closing price reverses direction by a fixed amount; so called reversal amount. Otherwise, no new lines are drawn on chart. Whenever the current closing price moves beyond the previous high or low, the thickness of the Kagi line is changed. An entry signal is triggered when the vertical line changes from thin to thick and is not reversed until the thick line changes back to thin [Colby, R.W., 2003, p.334], [Nison, S., 1994, p.213-220]

Figure 6: Kagi chart

Source: Investopedia 2014

Renko The Japanese is a unique kind of line chart designed to filter out minor, short- term market noise. Renko is similar to Kagi chart, but instead of vertical lines going up and down, boxes are filled at a 45-degree angle during each uptrend and downtrend. Renko chart uses the close to determine when to lay a new chart entry. The current close is compared with the high and low of the previous ―brick‖. If prices move more than the brick size above the top (or below the bottom) of the last brick on the chart, a new brick is added in the next chart column. Hollow bricks are added if prices are rising. If the uptrend reverses, indicated by the current closing price falling below the bottom of the previous brick by at least the box size, then one or more black bricks are laid below and in the next column to the right. The signals to buy or sell easily appear when the direction of the trend changes and the boxes alternate colours. This type of chart helps traders to identify very efficiently the main support and resistance levels [Dicks, J., 2010, p.159], [Colby, R.W., 2003, p.622].

- 26 -

Figure 7: Renko chart

Source: MarketTide 2002-2014

3.3.2 Support and resistance

At the most basic level, Support and Resistance are previous lows and highs. The lower points are called support (they support price not go lower) and the highs are resistance (price refuses to go any higher). Support and resistance are one of the oldest principals used in technical analysis [Dicks, J., 2004, p.95].

When using support and resistance as a trading tool, profits can be made during breakouts (when price attempts to break through support or resistance line) explains Knight (2007). He also says that the longer the price has been trying to break through the line the stronger the breakout will be. Resistance levels are formed as buyers are unwilling to pay higher prices selling pressure exceeds buying pressure. Support levels occur because sellers are unwilling to accept lower prices and buying pressure exceeds selling pressure [Knight, T., 2007, p.5].

A very useful property of support and resistance is the tendency of these levels to reverse roles once penetrated. Specifically, once a Support level below the current price is broken, that level becomes resistance on future rally attempts, resistance level respectively.

Figure 8: Support and resistance

Source: Víšková, H., 1997, s.45

- 27 -

3.3.3 Trend line and trend channel

Trend lines are very similar to support / resistance levels. The only difference is the angle. It can be also described as a line which connects two or more pivot highs in case of rising market or pivot lows in case of falling market. It works in simple way: when price is low enough, bulls on the market are very aggressive and motivated to speculate for potential profit. Their aggression excess bears aggression, who became worried about price level and leads to rising in price. Therefore it is obvious, that trend lines show the direction of the price movement. It is similar with the pivot highs, when price is high enough to drive bulls away and signalizes potential profit for bears. If aggression stays on bulls side, stimulated supporting level occurs [Kahn, N.M., 2010, p.47].

Figure 9: Trend lines

Source: Víšková, H., 1997, s.39

Trend channel represents parallel strips in which the price fluctuates. When market grows, it is drawn as line parallel with support line. When market declines, it is determined with line parallel to support line. When price reaches the lower line it can be considered as a buy signal. Similarly, reaching the top line is signal to sell [Kahn, N.M., 2010, p.163].

3.3.4 Market patterns

In general, all patterns can be divided into those two groups:

 Reverse formation – e.g. bottom or top; head and shoulders, diamond; etc.  Consolidation formation – e.g. flags, pennants

Both are used to identify trend, however consolidation formations confirm actual trend. On the other side, reverse formations occur when there is a change in trend. Therefore is their occurrence very important for business analytics.

According to Toschakov (2006), most of the traders do not have adequate theoretical knowledge so they are unable to detect correctly certain classical formations or interpret widely known and practically used technical signals. Moreover he says, that probability of functioning of graphical formations has decreased greatly during last periods [Toschakov, I., 2006, p.51-52].

I agree with Toschakov and I see most of them very useless nowadays. To set a good example: reverse formation top and bottom. There are at least 2 problems I see. Due to their frequent occurrence, signals that are generated are not very strong. Another problem can be fact, that this formation is often a part of another formations such as head and shoulders, - 28 - double top, double bottom. On the other side I agree that patterns are very important to understand technical analysis and sometime to understand the cause of changes in trend, but as they don‘t represent core of my thesis, I will not pay more attention to them.

3.4 TECHNICAL INDICATORS

In order to provide accurate buy/sell signals, visual software tools called indicators have been developed and are used in technical analysis. The most basic indicator used in financial applications could be the Simple Moving Average (SMA), simply being the mean of the previous data points, usually bars. Different types of indicators exist and are used for measuring trends, momentum, volume, volatility and other aspects of price. Indicators are normally used by traders to assist in making trading decisions, but indicators can also be used in automated trading strategies.

Víšková (1997) defines indicator as: " is a function (or vector function), which for each trading day t, that is defined on it, assigns a real number (or a vector of real numbers).It is designed on the basis of prices or volumes in a particular asset into trading day t and for the relevant vector π " [transl. Víšková, H., 1997, p.50].

For effective use, is necessary to differentiate indicators according to their behavior in the different market phases. Therefore, I choose dividing by Turek (2008), in which differences can be easily recognized:

 Trend indicators;  Volatility indicators;  Momentum indicators [transl. Turek, L., 2008, p.88].

3.4.1 Trend indicators

Trend-following types that attempt to detect the trend and the strength or weakness of the trend. These indicators include moving averages, parabolic stop and reverse indicator (PSAR) and moving average convergence divergence (MACD), which measures the trendiness of a market. Moving average crossovers can also be very useful in spotting market turns [Mendelsohn, L., 2006, p.41-42]. All indicators mentioned will be described in detail and will be tested, as well.

3.4.1.1 Moving average MA

The moving average is the interpretation of the market price action over a set period of time on any time frame and is used to smooth out the price action for that chosen period in time. The moving average is probably the simplest of systems in both its generation and form and is visually very clear on the chart.

- 29 -

The result, when plotted on a price chart, shows a smooth line representing the successive, average prices. Moving averages de-emphasize the effects of short term exchange rate oscillations. Moving averages are especially useful in markets that have a tendency to trend. On the other hand i tis also very popular on Forex market, however trend is not that significant as in the other markets. Popularity comes from smoothing erratic data and making it easier to view the true underlying trend [Kirkpatrick, Ch.D., Dahlquist, J.R., 2011, p.276].

The average is overlaid on the price chart, and crossovers between the average and the underlying price are observed. When prices are rising, they are usually above the average. This is to be expected because the average includes data from the previous, lower-priced days. [Kahn, M.N., 2010, p.58]

There are several types of moving averages currently in use, however among most basic types belong:

 Simple moving average,  Exponential moving average,  Weighted moving average [Larson, M., 2007, p.11-12].

Simple The Simple Moving Average (SMA) is probably the simplest, oldest, and most widely used statistical method applied to stock price data. The simple moving average sometimes referred to as an arithmetic moving average is the interpretation of price action at current levels based on arbitrary parameters. The simple moving average forms a visual level that supports the current price, confirms the current trend, or establishes a change in the current state of that market. It is calculated for each successive chart period interval. Each day‘s calculation of the SMA represents adding the most recent day‘s price figure and dropping the earliest day‘s price figure [Kirkpatrick, Ch.D., Dahlquist, J.R., 2011, p.276-280].

An SMA is constructed by adding a set of data and then dividing by the number of observations in the period being examined. Following formula can be applied:

When calculating the simple moving average, equal weight is given to each daily observation. That is the only difference between SMA and others moving averages.

Weighted Moving averages are lagging indicators. The potential profit lost by the inability to pick tops and bottoms is offset by the reduction in volatility seen and the reduced risk of making a bad trade. In order to reduce the lag of the simple average, more weight can be assigned to recent data and less to older data [Kahn, M.N., 2010, p.59-60]. Therefore, by calculating a weighted moving average, the most recent day‘s information is weighted more heavily. This weighting - 30 - scheme gives the most recent observation more importance in the moving average calculation [Kirkpatrick, Ch.D., Dahlquist, J.R., 2011, p.280-281].

Exponential Exponential averages are similar to weighted averages, but it weighs more strongly the prices that are more recent. The difference is in how it assigns the weights. EMA represents an excellent compromise between the overly sensitive weighted moving average and the overly sluggish simple moving average. It is not important here to go into details of the formula except to say that a weighted average is an arithmetic weighting, and exponential average is a geometric weighting. This really only means that it reacts even faster to price changes than the other averages [Kahn, M.N., 2010, p.60].

There are two methods how to trade using MA:

 Simple crossing moving average with price level  Double crossover

Simple crossing strategy is quite easy. As long as prices remain above the average, there is strength in the market. Buyers are willing to pay more for the stock or commodity as the market continues to value it higher. In business terms, buy signal is generated. Once the indicator crosses above the price level sell signal is generated [transl. Hartman, O., Turek, L., 2009, p.55].

Another very useful method of averaging the price is to apply two moving averages with different length and watch for a cross over trading signals, either positive or negative. It combines one shorter (fast) and one longer (slow) moving average to generate buy and sell signals. When the shorter moving average crosses above the longer is often taken as a mechanical buy signal, or at least a sign that the price trend is upward. Likewise, it is considered a sell signal when the shorter declines below the longer. In some instances, moving averages are used to determine trend, and then chart patterns are used as entry and exit signals. Figure 10: Preview of Moving average crossover

Source: own illustration using Metatrader, data: MetaQuotes Corp, EUR/USD, H1, 01.12.2010-06.12.2010 - 31 -

3.4.1.2 Moving Average Convergence Divergence

The Moving Average Convergence-Divergence (MACD) is a price momentum oscillator developed by Gerald Appel. MACD is a popular momentum indicator using two exponential moving averages with different time periods to produce a crossover system, used to indicate changing trend direction. Two exponentially smoothed moving averages, called the MACD line and the Trigger or Signal line revolve above and below a zero line [Taylor, F., 2003, p.327-328], [Larson, M., 2007, p.43-45].

There are 3 ways how to trade using MACD:

 The easiest way is to buy and sell signals that are generated by crossing the lines.  A more reliable signal is generated when both lines cross, and then cross the zero line.  The most reliable signals are those coupled with convergence or divergence. Bear divergence occurs when MACD creates new lows meanwhile asset price stays on same level or increase in value. Bull divergence exists in opposite direction. For example, a strong signal would be generated by divergence coupled with a crossover and then a move through the zero line [Taylor, F., 2003, p.328].

A change between two moving averages can be monitored precisely and this identifies early change in market sentiment before the MACD actually produces a cross over signal. The very fact that averages are lagging indicators produces a lagging signal; therefore market buy signals will be more reliable if the market is trending up and market sell signals will be more effective if the market is trending downwards.

Signals are generated from the histogram when it produces divergence or crosses the centre line. This is a very useful indicator for signalling a change in market sentiment by simply observing the histogram in relation to the centre line. This histogram oscillator functions in the following manner. However, measuring the difference between the averages in effect measures the rate of change, the MACD-histogram becomes a leading indicator based on a lagging indicator‘s rate of change [Burges, G. A., 2009, 146].

Figure 11: Preview of MACD

Source: own illustration using Metatrader, data: MetaQuotes Corp, EUR/USD, H1, 01.12.2010-06.12.2010 - 32 -

3.4.1.3 Parabolic stop and reverse

Parabolic SAR was invited by Welles Wilder in 1978 as another trend-following method for setting stop-loss. The whole principle of this indicator is to monitor the trend development and to place the automatic trailing stop at the same time. Indicator use two functions, price and time. Time functions means, that indicator will move, even if the price stays unchanged. On the other side, the price factor depends on size of decrease or growth in price movement [transl. Turek, L., Czechwealth team, 2009, p.112].

This indicator determines not only the direction of a particular currency pair but also its momentum and the location of the points at which it is higher and thus has a greater probability of changing direction [Kirkpatrick, Ch.D., Dahlquist, J.R., 2011, p.267].

Calculation of PSAR use exponential smoothing constants called acceleration factors, which increases as the price moves along trend. It ranges between 0.02 until 0,2. For periods when price does not set a new high within the current long trade time duration, acceleration factor is left unchanged from its previous period‘s level [Dicks, J., 2010, p.168].

As typical trading technique using PSAR can be considered one, when PSAR rides the trend until the SAR is penetrated, then the existing position is closed out, and the opposite position is opened. When the most recent high price has been broken, the PSAR changes its side, and thus the direction is usually reversed, placing itself at the most recent low price.

Colby (2003) defines easy PSAR calculation:

For long: S = P + A* (H - P) For short: S = P – A* (L – P) where,

S = long-side reverse price P = previous period‘s SAR A = acceleration factor H = the highest price counting from buy stop order L = the lowest price [Colby, R.W., 2003, p.495-496].

The popularity of PSAR comes from its differences among others trend indicators. While the most of trend indicators signalize values for past periods, PSAR signalizes values for next periods [transl. Turek, L., Czechwealth team, 2009, p.112].

- 33 -

Figure 12: Preview of Parabolic SAR

Source: own illustration using Metatrader, data: MetaQuotes Corp, EUR/USD, H1, 01.12.2010-06.12.2010

3.4.2 Momentum indicators

These indicators are used to measure momentum. Momentum is a term describing the speed of the movement of prices in a given period. Changes in momentum generally lead to changes in exchange rate. Among representatives of this group belongs: Stochastic, and the Commodity Channel Index [transl. Turek, L., 2008, p.88].

Two terms that are usually associated with momentum are overbought and oversold. What they really mean is that the market has moved too far, too fast. Bullish or bearish activities of the minority have gotten out of line with bullish and bearish perceptions of the majority, so the trend cannot be sustained [Kahn, M.N., 2010, p.32].

Obviously, this very large group of indicators includes many, though less used indicators such as Price Oscillator, Williams % R, Momentum oscillator and others, but for the purpose of thesis only on some selected indicators will be analysed.

3.4.2.1 Relative Strength Index RSI

The Relative Strength Index (RSI) is one of the most popular price momentum indicators. RSI is misnamed, since it has nothing to do with the well-established technical analysis concept of Relative Strength, which compares the price of one financial instrument or index with another. RSI was firstly described by J. W. Wilder, in 1978 in his book. Mathematically, RSI is represented as: RSI = 100 - (100 / (1+RS)) where,

RS is the ratio of the EMA with n-period gains divided by the absolute value of the EMA average of n-period losses. As the formula shows, RSI does not relate any security to any other security. Rather, RSI quantifies price momentum. It depends solely on the changes in closing prices. - 34 -

RSI is actually a front-weighted price velocity ratio for only one item (a stock, a futures contract, or an index). And, in conformity with the standard interpretation of price velocity indicators generally, Wilder places considerable emphasis on confirmations and divergences of RSI compared to the underlying price series. RSI‘s method of calculation, using EMA, correctly avoids the problem of erratic movement caused solely by dropping off old data, that is, the problem of the ―take away‖ number. Exponential smoothing also eliminates the need to work with long columns of historical data each day. Obviously, the smaller ―n‖ is, the shorter the period measured and the more sensitive the indicator, while the larger n is, the longer the period measured and the less sensitive the indicator. Wilder‘s suggested n-period length is 14. The indicator can also be applied to any time frame, from minutes to months. RSI‘s method of calculation, using ratios, tames the indicator‘s y-axis range to limits of 0 to 100. Due to its use of ratios, however, RSI seems to be subject to greater volatility and erratic movement than smoothed indicators that are not dependent on ratios. [Colby, R.W., 2003, p.610-615],

Generally speaking, an RSI value above 75 indicates a possible overbought situation, and a value below 25 indicates a possible oversold situation. In the overbought area indicator signalize entrance to short positions, oversold area signalize long position opportunity. Another way of using RSI is divergence, when the price of an asset and an indicator related asset move in opposite directions. Number referring to oversold and overbought areas may be different according to type of investor.

Figure 13: Preview of Relative strength index

Source: own illustration using Metatrader, data: MetaQuotes Corp, EUR/USD, H1, 01.12.2010-06.12.2010

3.4.2.2 Commodity channel index

The Commodity Channel Index (CCI) was developed by Donald Lambert in 1980. CCI is very similar to the stochastic. Despite its deceptive name, CCI is also used in others, not only commodity markets.

- 35 -

Similarly as in RSI or Stochastic, there are also 2 trading techniques how to trade CCI; divergence and overbought / oversold areas. The overbought / oversold values are +100 for upper line and -100 for lower one. CCI fluctuates between them. The main difference between CCI and stochastic is, that the CCI measures the deviations of a price from a moving average. In some cases, the signals are more reliable, however, the difference between is so diminutive that using both would lead into creation of false signals [Kirkpatrick, Ch.D., Dahlquist, J.R., 2011, p.441].

Buy or sell signal for CCI are simple:

 Buy long when CCI rises above +100% and sell long when CCI falls below +100%  Sell short when CCI falls below -100% and cover short when CCI rises above -100% [Murphy, J. J, 1999, p.237].

Another Colby‘s formula shows calculation of CCI as:

CCI = (M - A) / (0.015 * D) where,

M = simple mean price for a period. A = n-period simple moving average of ―M‖ D = mean deviation of the absolute value of the difference between mean price and simple moving average of mean prices M - A [Colby, R.W., 2003, p.155].

Figure 14: Preview of Commodity channel index

Source: own illustration using Metatrader, data: MetaQuotes Corp, EUR/USD, H1, 01.12.2010-06.12.2010

3.4.2.3 Stochastic

The Stochastic is a very popular oscillator which was developed by George Lane in the late 1950s. The is a technical indicator based on momentum that compares the closing price of a currency pair with its price range over a given time period.

- 36 -

Stochastic is measured and represented by two different lines, %K and %D, and are plotted on a scale ranging from 0 to 100. Readings above 80 represent strong upward movement, while readings below 20 represent strong downward movements. [Cheng, G., 2007, p.116].

However, some experts as Turek (2009) stand the point, that lines should be tighter, e.g. 70 and 30 respectively; others Colby (2003) say, that buy / sell signals are more significant when %K is extremely overbought above 85%

Following formula shows calculation of Stochastic indicator:

%K = 100 * [(C – L14) / (H14 – L14)]

Where number 14 = number of previous trading sessions C = the most recent close price L14 = the low of the 14 preceding trading sessions H14 = the highest price traded during the 14 sessions period %D = three-period moving average of %K [Murphy, J. J, 1999, p.246-247].

Sell signal is recognized, when the faster %K line crosses below the slower %D line from above 80 level. The %K line crossing the %D line below 20 is a buy signal. As I said, overbought and oversold areas may vary according to trader.

Another theory behind this indicator is that prices tend to close near their high when the market is in trending up and that they tend to close near their low when the market is in a down trend. The signal is given when the %K line crosses through the three-period moving average called the %D [Cheng, G., 2007, p.117].

Figure 15: Preview of Stochastic

Source: own illustration using Metatrader, data: MetaQuotes Corp, EUR/USD, H1, 01.12.2010-06.12.2010

- 37 -

3.4.3 Volatility indicators

By volatility I understand fluctuation in the value of a currency pair. The greater the volatility is, the higher is the range in which the exchange rate moves. These indicators track the change in price compared to its historical values. In case that the market price will vary significantly than is appropriate according to average historical volatility, or it gets out of set range, indicators send a signal determining overbought or oversold market. Typical example of volatility indicators are Bollinger Bands [Online Financial Markets 2012].

3.4.3.1 Bollinger bands

Bollinger bands are an indicator developed by John A. Bollinger that allows users to compare the volatility and relative price levels over a time period. This indicator consists of three bands that follow the price action of a given currency pair. [Dicks, J., 2010, p.164].

Bands can be defined with n representing timeframe and D representing as follows:

Lower band is counted as SMA shifted down by the same standard deviation as upper band [transl. Hartman, O., Turek, L., 2009, p.71].

As formula shows, Bollinger plots a resistance line two standard deviations above SMA and a support line (lower band) two standard deviations below a SMA, which is standardly set to 20-periods. The standard deviation is a statistical unit of measure that offers an assessment of the volatility of a certain price. In this way, the bands are designed to react quickly to price movements and reflect periods of volatility. Bands will widen when there is a greater volatility and will stretch when the volatility is lower. The number of periods of the MA, as well as the number of deviations, would have to be adjusted to the usual behaviour of the specific currency pair as well as the time frame that is being used [transl. Hartman, O., Turek, L., 2009, p.72].

Properly set Bollinger bands should hold both support and resistance of the price reversal swings, that is, the higher low in a downward move turning to the upside and the lower high in an upward move turning to the downside. The price of this second low or high should not penetrate the bands. Those higher lows or lower highs are formed as a reaction after a strong fall or rise. The price has corrected, and it rallies again in the former direction, failing to reach the previous bottom or top [Dicks, J., 2010, p.165-166].

- 38 -

Bollinger bands allow traders to identify periods with different volatility. In particular, they help us to measure when prices are reaching unsustainable extremes and reversing to the mean. Low volatility periods with narrow bands, leads to a breakout.

However, the bands do not give us any indication of the future direction of prices. Even more Bollinger does not recommend applying Bands for absolute signals to buy nor to sell. Rather, he uses Bands to provide a framework within which price may be related to other, independent technical indicators.

Only exception for sell/buy signal that could be taken from the configuration of the bands is the double bottom or double top. When prices penetrate below the lower band and remain there, it is a signal for a long position, which will be confirmed when the price rises above the middle band. When prices penetrate above the upper band and a second attempt fails to break through, and the price remains below the band, this is a signal for a short position, which is confirmed when falling in price reach the middle band [Dicks, J., 2010, p.165-166], [Colby, R.W., 2003, p.114].

To sum up, Bollinger bands are volatility indicator, but it is also used for trend following because the price will tend to remain near one of the bands, for straddling breakouts when there is a very tight zone, and also for counter-trending by profiting from trend exhaustion, as in the preceding example of double bottoms and double tops. Just touching the bands is not a signal itself, it only indicates that prices are reaching an extreme with respect to their mean, becoming overbought or oversold. However, when trending, prices can continue the path of one of the bands and fluctuate between the band and the middle line without crossing to the other side [Dicks, J., 2010, p.166].

Figure 16: Preview of Bollinger bands

Source: own illustration using Metatrader, data: MetaQuotes Corp, EUR/USD, H1, 01.12.2010-06.12.2010

- 39 -

4 CREATING AND OPTIMIZATION OF STRATEGIES

According to theoretical part, technical analysis looks like simple way how to trade currency. There are many indicators, which can tell us market sentiment, trend, even exact time when to buy or sell currency. Despite all that, not everyone can do profit on this market. The problem could be in bad money management and unsuitable indicators settings. The overwhelming majority of ATS that can be downloaded from the internet, declaring they are profitable, don‘t work, or work just on specific conditions in specific situations.

The truth is that ATS can be profitable, if good money management and strategy optimization is established. Trading decisions based on well done and optimized strategy have some benefits. One of them is reduction of emotions. Emotions cause opening positions that are in contrary to money management principles and leads to early close of profit positions and staying in loss-making positions. Another can be easy measurability, analysis and comparability with similar trades.

To reach the aim of thesis that is to propose an optimization of selected technical analysis indicators on the Forex market and later recommendations for intraday traders, there is backtest of those indicators necessary. Before that, essential strategy parameters need to be defined to run backtest properly. They are as follows:

 Determination of currency pair –choice of EUR/USD, GBP/USD, USD/JPY, etc.  Determination of timeframe – 1M (1 minute), 5M, 15M, 1H (1 hour), 4H, etc.  Defining of inputs and outputs – Buy, sell, stop loss, take profit, trailing stop, etc.  Defining of position size – lots, minilots, microlots.  Defining of period tested

Every trading strategy has different results in different currency pairs even on same currency but different timeframes. Based on this behaviour it is necessary to specifically set up inputs and outputs. Position size can be adjusted only if strategy is defined and optimized.

4.1 TECHNICAL DESCRIPTION

As I mentioned earlier, strategy testing in this thesis is based on ATS. To run ATS, there is necessary to implement inevitable components described in next four subchapters.

4.1.1 Data and timeframe

All strategies are tested on 1 hour timeframe (H1), which represents day-trading technique. This timeframe includes 31 329 hourly bars representing 5 years backtesting coming from beginning of year 2009 until end of the year 2013. The choice for H1 timeframe is simply

- 40 - because of less random noise that is typical in smaller time frames and leads to creating of false signals.

There could be also higher timeframes used for purpose of this thesis, but numbers of bars and signals generated would be much less and it could lead into insignificant numbers of trade. Moreover, this thesis is aimed at intra-day trading and formulates recommendations for intraday traders.

Extended data used in my thesis, that are not part of Metatrader platform was provided by X- Trade brokers company- Czech branch.

4.1.2 Software

For interpretation and calculation of data collected, trading software is inevitable. Platforms for on-line trading are continually developing and become improved. Traders or brokers use different type of platforms. Some of them support basic graphic tools, which can be useful for beginners or traders without ATS. For the purposes of this thesis there are advanced mathematical calculations and strategy backtest needed, therefore I will use complex trading software. Among most known belong Ninjatrader, Tradestation, Amibroker, Metatrader, etc. Those have similar technical analysis tools and support algorithm trading with implemented function of backtest.

One that I used for a years is said Metatrader developed by MetaQuotes Software Corporation. I choose Metatrader, because of good compatibility with my computer operating system and own experience with this platform.

4.1.3 Backtesting

Backtesting is the process of applying a trading strategy on historical data and its profitability evaluation. Backtesting is a way, how to evaluate and optimize trading strategies and analytical models before implementing them.

Software converts every price movement in given timeframe very fast, so the long trading history can be simulated in seconds. Based on a defined algorithm, position is opened at the same time as it could be in real trading. It is important to note that some differences between the real trading and backtesting exist. One of them is transaction time. While entry into position in real trading take up to 20 seconds, back test copes entry order immediately, what can lead into slippage. Slippage in not a problem, when trader using ATS trading method.

Advantages:  Elimination of human errors and psychological factors  Speed of backtest  Possibility to optimize strategy  Combination of more indicators

- 41 -

Disadvantages:  Backtest doesn‘t include transaction fees1, what can lead in distortion of total profitability  At least basic knowledge of programming language needed

Metatrader allows choosing between three modes to do backtest:

 Control points – a very crude mode based on the nearest less timeframe  Every tick - the most precise mode based on all available least timeframes  Open prices only quick mode on completed bars, only for Expert Advisors that explicitly control bar opening

In this thesis, there is every tick mode used. This mode allows to model price movement within a bar in the most precise way. Unlike "control points", the every-tick method uses for generation not only data of the nearest smaller timeframe, but also those of all available smaller timeframes. At that, if there are data of more than one timeframe for a certain time span available simultaneously, the data of the smaller timeframe are used for generation. Like the preceding method, this method generates control points based on the OHLC data of the smallest available timeframe. To generate price movements between control points, interpolation based on the predefined templates is used, too, so the availability of one-minute data that cover the entire testing range is extremely desirable. It may happen that several identical ticks are generated one after another. In this case, duplicated quotes are filtered out and the volume of the last one of such successive quotes is fixed [MQL4 community 200- 2014]. However this mode is time-consuming, it generates the most accurate results that correspond with objective of thesis the most.

4.1.4 Choice of currency pair and indicators tested

For achieving comparable results, it is necessary to choose one currency pair on which all indicators will be tested. The best choice would be currency pair with high liquidity and small spread. Therefore I decided for EUR/USD as the highest liquidity currency pair and almost one-third share of all currency trades2. High liquidity prevents from gaps occurring, which can lead into losing positions. Next reason for EUR/USD is spread on level of 2 pips. However, depending on financial market situation, this level tends to be higher; i.e. in time of low volatility.

For the purpose of thesis I decided to choose indicators by recommendation of famous Forbes magazine and verify the results presented in this business magazine. Article can be found also at their official webpage under headline: “Technical Analysis Indicator That Works Turns Positive For These Stocks” [Forbes 2013].

1 In case of Forex, transaction fees represent spread. 2 According to BIS, total turnover on EUR/USD pair was 28% of all trades in Forex market in 2010 - 42 -

As a trend indicators representative, simple moving averages and its crossover will be chosen. As the recommendation says, I will backtest MACD, as well. Category of momentum indicators will represent RSI. At the end I will test and optimize Bollinger Bands as volatility indicators.

As I have indicators chosen, I can build trading strategy and run backtest. Detailed sequence of strategy development is as follows:

 Selection of indicator,  Determination of inputs – setting of currency pair, timeframe, indicator period tested, stop-loss or take profit,  Profitability backtesting – using ATS,  Optimization of inputs.

Sequence is better described in figure below:

Figure 17: Sequence of strategy development

Source: Bachraty, M., 2012, p.104

4.2 MONEY MANAGEMENT AND RISK

There has never been a system that was 100% profitable, that never took a loss on any trade. Money management is referred as the risk side of investment, the means of preventing financial ruin. It is principally concerned with how to measure and manage risk of loss and, therefore, how to utilize one‘s capital most efficiently. So I can define the main tasks of money management as prevention from bankruptcy, ensure small losses and ensure big profits.

For the purposes of this thesis, the important risk consideration is loss of capital. This comes from losses on trades, realized or unrealized, so I will use drawdowns as the best definition of risk. Because drawdowns, if not controlled, can lead to ruin, our intention in this chapter is to develop means that will keep out losing all our capital.

- 43 -

4.2.1 Drawdown

Prevent from bankruptcy can be ensured by risking only small amount of capital to prevent from series of loss trades – so called ―drawdown‖. Looking at all the drawdowns over a period, the one that has the highest intrapeak equity percentage loss is called the maximum drawdown. This parameter will be also used in backtesting later.

To set small percentage of loss may be sometimes hard, because literature doesn‘t define the meaning of word small. However according to professional traders e.g. book of Elder, A., 2002), to risk 2 % of capital per one trade should be the upper limit. Two per cent of risk can seem like over-conservative trading technique, but table 4 declares that it is not that conservative. Table 4: Preview of stop-loss risk

Source: own illustration, using tables from Turek, L., 2008, p.45-46

Notice, that risk 10% of account per one trade results in cut in capital by 50 % already after 7th trade. The truth is, I will not trade strategy that can bring us 7 loss-making trades in a row, but one never knows.

Tragedy in loss is not all that is necessary to mention. The problem of loss-making trades consists in rentability necessary to obtain same level of equity as it was at the beginning. This contention confirms table 4. Besides other things, it shows that 50 % loss in equity has to be balanced by 100 % appreciation to reach the same equity level as before losses.

4.2.2 Leverage effect

Due to the high financial cost of trading with a larger quantity of lots leverage is used. Leverage allows traders to enter a position that is even higher than the real deposit on trading account. This option allows opening positions for many traders, which wouldn‘t have sufficient capital for such trading.

- 44 -

Mostly used and for many trader mostly suitable way, which can describe leverage is called margin. The whole deal is mediated by margin account, in which the broker agrees to lend the full amount required for the deal and that requires a security guarantee called margin. This ranges generally about 0.5 % to 5 %, depending on the traded currency, the number of units and the amount of leverage. The following formula can be used to evaluate margin:

 Base - first quoted currency  Home - currency of trading account  Units - quantity, also lots  Margin ratio - leverage [Forex Magnates 2012].

For example: Broker offers leverage 100:1. Position of 1 lot (100 000 units) of EUR/USD currency pair. A current rate of EUR/USD 1.3421 means, that $1,342.1 are needed to open position with the said leverage instead of $134.210 without any leverage (1:1).

To find the most suitable leverage is not easy. Leverage level depends on time interval, account balance and degree of risk that traders are willing to undergo.

Leverage is actually customizable, which means that the more risk-averse investor can elect lower level of leverage. However, leverage is really a double-edged sword. Highly-leveraged accounts may allow control of greater amounts of money in the market with fewer margin, but this also can be dangerous when losses are experienced, so without a proper risk management a high degree of leverage can lead to large losses as well.

4.2.3 Stop-loss

One of the basic rules of any successful trading system is defining stop-loss level. Stop-loss orders allow traders to set an exit point for a losing trade. So it is kind of a safety net, which limits the damage from any unprofitable trade. Although I would have trading structure without single bad loss, nasty series of losses, can damage account totally. Therefore stops are essential for success, but many traders shun them.

Stop-loss is the best tool against emotional trading, as well. Personally, I recommend placing a stop-loss order at the time of placing their entry order. However mental stops may also be used – but only by traders who are more disciplined.

Opinions of professional traders are not identical. One says that stop-loss orders should not be so tight that normal market volatility triggers the order. Other says: ―A stop loss should never expose more than 2 % of equity to the risk of loss” [Elder, A., 2002, p.136]. From own

- 45 - experience, it is much wiser to have a wider but reasonable stop than to have an unreasonably tight stop. Despite contradictions, thesis will follow the rule set by Elder (2002).

4.3 TRADING STRATEGY BASED ON MA

Due to simplicity and easy results interpretation, MA is generally the most used technical indicator. It is trend indicator, so there is relevant presumption, that indicator will work in trend period. However, in other periods there will be many false signals generated. Therefore combination of MA with other (non-trend) indicator could be useful to prevent from those signals and give the opportunity to profitable trading.

Another option is combination of two or more MAs to get more accurate trade signals. There is one disadvantage of this technique. However it reduces false signals, it also reduces signals that are appropriate, so numbers of trade are much less. All the methods said will be tested in this thesis.

4.3.1 Simple MA strategy

Firstly simple MA strategy will be tested. Strategy is based on crossover price level with MA period. I choose MA period 12 as a period predefined by Metatrader.

Input values:  MA period – 12  Buy signal is generated when the MA crosses below the price level of EUR/USD  Sell signal is generated when the MA crosses above the price level  Sell/Buy stop when a new signal is generated or when it reaches stop-loss  01/2009 – 12/2013; H1 timeframe; 0.1 lot; capital: 10,000 USD  Stop-loss – 2 % of capital

Figure 18: Simple moving average – equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

- 46 -

Table 5: Simple moving average - strategy report

Source: own illustration using output data from Metatrader

Strategy based on simple MA price crossover slightly ends in positive numbers. However, based on volatility, that can be seen from Figure 18, it could easily ends in loss. As I expected, trend Moving average strategy turned into positive as a result of long-term significant downtrend during from December 2009 until June 2010 representing by trades number 36-55. On the other hand, periods without any trend were generating false signals that led into loss-making trades. That is also result; why there was almost 50 % loss trades. If I could eliminate trades made during non-trend period, strategy would probably become even more profitable. With those parameters strategy made only 1.86 % capital appreciation in five years period, that it less than less-risky financial instruments; therefore I don‘t suggest using it for future trading. More information and values described are shown in MA_initial.pdf document attached.

Optimization of MA period with fixed stop-loss

Because 12-period MA strategy generates too small profit to be suitable for trading, I will try to optimize that period. I will find the best solution, which will use better timing to enter the positions. So I am optimizing strategy starting from period 8, using 2 steps until it will reach period 50. So totally I will test [(50-8)/2+1] = 21 strategies. Stop-loss level will stay unchanged at value of 2 %.

The best result testing under those conditions is depicted on Figure below:  MA period – 22  Other parameters unchanged.

Figure 19: Optimized MA period - equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

- 47 -

Table 6: Optimized MA period - strategy report

Source: own illustration using output data from Metatrader

Change in MA period to 22 resulted in more profitable strategy, which could bring 5,052.99 USD profit that represents 50.53 % return in 5 years period (approx. 10.11 % p.a.). Judging by shape in Figure 19, development in total capital value was more constant than in previous strategy tested. Logic sequence should be optimization stop-loss level, as the only input that wasn‘t optimized yet (excluding timeframe and time period, which will stay unchanged for all strategy tested to reach relevant comparison).

Optimization of all inputs/optimization of SL

Figure 20: Final MA optimization - equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 7: Final moving average optimization – strategy report

Source: own illustration using output data from Metatrader

 Optimized values: MA period 22; SL 180

- 48 -

Optimized strategy results didn‘t change a lot, because only change was setting stop-loss limit by 20 points less on level 180. This parameter is still in agreement with Elder, who said: “A stop may never expose MORE than 2 % of your equity to the risk of Loss” [Elder, A., 2002, p.136]. Comparing both tables I can see that optimization doesn‘t bring us better results in all relevant areas. Although net profit is higher by approx. 6.4 % than previous profit, maximal drawdown that should be one of leading factors is higher, as well. Strategy reflects also better proportion between profit and loss trades. Largest profit trade stayed unchanged at level 822.63 USD, however largest loss trade felt down by 20 USD as a result of tighter stop loss level. Even if there is a little bit higher drawdown, strategy has a better results enough to consider it as more stable and profitable. But, the question remains, does 10.75 % p.a. profit worth enough to trade strategy on this risky and volatile market?

Optimized Moving average + Parabolic SAR strategy

A huge advantage of the PSAR indicator is the simplicity in use and implementation into any strategy as stop trigger, entry or exit signal. In relation with the most trend-following indicators, PSAR reduces lag. It is doing so because of acceleration factors, which increase the speed of the system whenever the trend accelerates, thus ―locking-in‖ profits with considerable success. PSAR should only be used in combination with other indicators capable of determining market conditions, because PSAR produces too many false signals during sideways market. Therefore in my opinion, combination of PSAR with MA could bring very positive results.

Input parameters:  Open long, when the MA crosses the price level from the top and PSAR dots appear underneath the currency price  Sell short, when MA crosses the price level from the bottom and PSAR dots appear above the currency price  Sell/ stop when a new signal is generated or when it reaches stop-loss  01/2009 – 12/2013; H1 timeframe; 0.1 lot; capital: 10,000 USD

Figure 21: Optimization of Moving average + Parabolic SAR equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

- 49 -

Table 8: Optimized Moving average + Parabolic SAR – strategy report

Source: own illustration using output data from Metatrader Optimized values:  MA line – 22  Min. PSAR acceleration factor – min 0.02  Max. PSAR acceleration factor – max 0.20  Stop-loss – 200 USD

It turns out, that strategy based on moving average accompanied by parabolic SAR was extremely profitable. It reached profit of 8,639.81 USD that represents annual profitability of 17.28 % p.a. However, not only profitability showed positive results. There was 3 times more profit trades comparing with loss trades. Even though average profit trade was around 100 USD and average loss 202 USD, profit/loss ratio led to high profitability of this strategy. So as I expected, additional indicator totally changed strategy. In this case, PSAR leading attribute caused better entry and exit timing, which on the one side led to rise in total trades by 50 %, on the other side, profit/loss trade proportion changed positively. Therefore rise in total trades is not significant factor, quite the opposite; it could lead into higher gross profit.

4.3.2 MA crossover

Using crossover of 2 Moving averages should bring better results than simple MA strategy. Decision to trade MA crossover under MA lines stated below, comes from literature: Nesnídal & Podhájsky (2008). In my opinion, slow MA line might be too small and it could generate too many false trading opportunities. However I will test it as default settings, than I can optimize it.

Input values:  Fast MA period – 5; Slow MA period – 25  Buy signal is generated when the short-term average crosses above the long-term average  Sell signal is triggered by a short-term average crossover below a long-term average  Sell/Buy stop when a new signal is generated or when it reaches stop-loss  01/2009 – 12/2013; H1 timeframe; 0.1 lot; capital: 10,000 USD  Stop-loss – 2 % of capital

- 50 -

Figure 22: MA crossover equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 9: MA crossover strategy report

Source: own illustration using output data from Metatrader

Strategy shows up surprisingly unprofitable. Despite loss -1,686.74 USD (3.37 % p.a.), I see potential in this strategy. My conviction follows logically from percentage of profit trades comparing to loss trades. There is twice as much profit trades as loss ones. The problem that resulted in total loss could be eliminated by setting higher MA slow period. As I mentioned earlier, too small MA line results in generating more signals that are mostly false. The only thing why I wouldn‘t use that strategy is incredibly huge drawdown at level 46.8 %. Even if it was extremely profitable strategy, it shouldn‘t be trade with drawdown at this level. I will try to find better input parameters using optimization of MA lines. I assume that drawdown will drop down by some percentage; otherwise any better results in output wouldn‘t be taken into consideration.

Optimization of MA lines

Figure 23: Optimized MA crossover inputs - equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

- 51 -

Table 10: Optimized MA crossover inputs - strategy report

Source: own illustration using output data from Metatrader

 Optimized values: MA slow period - 35; MA fast period - 19

Optimization of MA lines turned strategy into profitable. Metatrader backtesting suggested us 19 period for fast MA and 35 period for slow MA. This combination along with fixed 200 points stop-loss resulted in net profit of 653.19USD. However, 1.31 % p.a. profit is not enough to consider strategy as a ―good‖. Strategy still signs volatility marks as it can be seen from Figure 23. Despite reduction of drawdown by 10 %, it still pose a huge level. In last step in optimization process of MA crossover strategy will be stop-loss optimized.

Optimization of MA stop-loss

Figure 24: Final MA crossover optimization - equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 11: Final MA crossover optimization – strategy report

Source: own illustration using output data from Metatrader

 Optimized values: MA slow period - 35; MA fast period - 19; Stop-loss - 70 - 52 -

Outputs showed after last optimization seems like from totally different strategy. Not only strategy became substantially profitable, but there was also noticeable drop in drawdown level. Metatrader generated 70 points stop-loss level and 35 and 19 periods as the best result using double MA crossover. Detailed results can be seen in attached file MAcross_final.pdf.

Although drawdown is not that huge as it was before optimization process, in my opinion it worth to trade using simple MA strategy instead of MA crossover. Net profit and drawdown proved to be better using only one MA indicator period.

Optimized Moving average crossover + Parabolic SAR strategy

No wonder that Parabolic SAR works very good with moving averages. Moving average describes very solid. It also generates very strong buy/sell signals. Only one problem using MA is that signals come too late. PSAR acceleration factor seemed as a good tool to eliminate delaying of MA signals. As saw before, combination of those 2 mentioned indicators worked, now I will try to combine parabolic SAR with moving average crossing. I expect less amount of signals generated, however signals could be more reliable, so strategy should bring even more positive results. Table 12 shows the final optimization of strategy mentioned.

Input parameters:  Open long, when PSAR dots appear below the currency price while the fast MA crosses above the slow MA  Sell short, when PSAR dots appear above the currency price while the fast MA crosses below the slow MA  Sell/ stop when a new signal is generated or when it reaches stop-loss  01/2009 – 12/2013; H1 timeframe; 0.1 lot; capital: 10,000 USD

Figure 25: Moving average crossover + PSAR – equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 12: Moving average crossover + PSAR – strategy report

Source: own illustration using output data from Metatrader - 53 -

Optimized values:  Fast MA line – 4  Slow MA line – 8  Min. PSAR acceleration factor – min 0.02  Max. PSAR acceleration factor – max 0.20  Stop-loss – 50 pips in form of trailing stop

Strategy seems very interesting. On the one side, drawdown doesn‘t even reaches 10 % and profit is creditable 16.13 % p.a. However, on the other side ratio between profit and loss trades is very negative. Despite the fact that strategy is profitable in the end, I would prefer simple moving average combined with PSAR. Simple MA combined with parabolic SAR was even more profitable and number of trades dropped substantially, so it is obvious that entry signals was much more reliable. Anyway, the aim was to show, that rational implementing of another indicator could make strategy more profitable.

4.4 TRADING STRATEGY BASED ON RSI

As it was written in theoretical part, there are two general ways how to trade RSI indicator – divergence and crossover. I will follow recommendation of Forbes magazine and I will test crossover strategy method. In the case of the RSI, the indicator uses crossovers of its overbought, oversold and central line. RSI indicator is best used as a valuable complementary tool for trading trend indicators (e.g. MACD), but as my thesis is grounded on article from Forbes magazine, I will test strategy based exclusively on RSI indicator.

Decision to trade RSI with parameters stated below comes from InlineForex website [InlineForex 2014]. Web page recommends using 7-period signal line and overbought and oversold line at level 80 and 20 respectively.

Input parameters:

 RSI line / signal line period - 7  Overbought level – 80; oversold level – 20  Buy signal is generated when the RSI breaks oversold line in an upward direction  Sell signal is formed when the RSI breaks the overbought line in a downward direction crossing from above the line to below the line  Sell/Buy stop when a new signal is generated or when it reaches stop-loss level  01/2009 – 12/2013; H1 timeframe; 0.1 lot; capital: 10,000 USD  Stop-loss – 2 % of capital

- 54 -

Figure 26: RSI equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 13: RSI strategy report

Source: own illustration using output data from Metatrader

As I expected, following recommended rules would results in loss-making strategy. Moreover there was almost 50 % drawdown, which in my opinion makes strategy unattractive.

Normally I don‘t optimize strategy with such a huge drawdown, but for the purposes of this work, I will optimize it anyway. First step will be optimization of RSI line and overbought and oversold lines, as well.

 RSI line starting from period 6 until period 40 with 2 point step  Oversold line starting from period 15 until period 35 with 5 points step  Overbought line starting from period 65 until period 85 with 5 points step

So totally there will be [(40-6)/2+1] * [(35-15)/5+1] * [(85-65)/5+1] = 450 strategies optimized.

Optimization of RSI period and lines

The best result testing under those conditions is depicted on Figure below:  RSI period – 14;  Overbought line – 70; oversold line – 30;  Other parameters unchanged.

- 55 -

Figure 27: Optimized RSI inputs - equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 14: Optimized RSI inputs – strategy report

Source: own illustration using output data from Metatrader

 Optimized values: RSI line 14; Overbought line 70; Oversold line 30

After optimization strategy became profitable. It could be strict money management in form of tighter overbought and oversold lines. Drawdown slashed at level 30 %. Strategy seems to have some potential now. Ratio between gross loss and loss trades indicate, that most of positions held that were loss-making, also hit the stop-loss. Knowing that fact, there is possibility, that setting stop-loss on lower level could bring more positive results. Therefore next step will be another backtest including stop-loss optimization. There will be totally 186 strategies tested as initial stop-loss values starts from 30 and it goes to 400 points with 10 point step. Very curious can be optimized line RSI = 14, which is also value suggested by J. W. Wilder, developer of RSI indicator.

Optimization of RSI stop-loss

Figure 28: Final RSI optimization – equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

- 56 -

Table 15: Final RSI optimization – strategy report

Source: own illustration using output data from Metatrader

 Optimized values: RSI line 14; Overbought line 70; Oversold line 30; Stop-loss 50

Results of strategy testing are surprisingly positive. Strategy based on those parameters could make 9312.25 USD net profit that represents in average 18.62 % profit per annum. Another big number is drawdown, which was cut in third. Only number I worry about is ratio between profit and lost trades, but average profit per trade shows me, that it can‘t be leading value. So there is more than 2 times bigger average profit than the average loss.

Equity curve seems to have constant profit during whole period tested. Despite volatility in exchange rate evolution, equity curve volatility makes strategy very interesting for traders. Commonly with annual profit and tolerable drawdown, strategy proved suitability of optimization, even if strategy was unprofitable at the very beginning.

Optimized RSI + Stochastic strategy

To combine RSI with stochastic indicator wasn‘t really revolutionary discovery. Combination of those two is called Stoch RSI and it is here for a long time.

StochRSI was found by applying the Stochastics formula to RSI readings. It measures the value of RSI relative to its high/low range over a set number of periods. When there is new low in RSI for the set period, StochRSI will be equal zero. When RSI records a new high for the set period, StochRSI will be at level 100.

One negative fact when using Stoch RSI is that adding the stochastic calculation to RSI, speed will be greatly increased. This will generate too many false, but also good signals. One more special thing about Stoch RSI is, that instead of more traditional 70 and 30 lines it uses 80 and 20 overbought and oversold lines.

Input parameters:  Open long, when the Stoch RSI crosses above the oversold line (20)  Sell short, when the Stoch RSI crosses below the overbought line (80)

- 57 -

 Sell/ stop when a new signal is generated or when it reaches stop-loss  01/2009 – 12/2013; H1 timeframe; 0.1 lot; capital: 10,000 USD

Figure 29: Stoch RSI - equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 16: Stoch RSI – strategy report

Source: own illustration using output data from Metatrader

Optimized values:  RSI period – 10  RSI level – 50  %K – 10  %D – 3  Overbought / oversold – 80 / 20  Stop-loss – 100 pips

As I expected, number of trades is astonishing. Almost 3,000 trades represent very negative fact, because profitability would be much lower due to spread and slippage that could occur. However 19.17 % profit per annum is wonderful. Drawdown at 4.42 is amazing, as well. Another black number is profit / loss ratio that seem very negative. So small profit trades comes from tightly optimized stop-loss that closed positions very early. On the one side, position could turn into profit-making, on the other side, Metatrader found the best option so tight stop-loss, therefore I kept it unchanged.

- 58 -

4.5 TRADING STRATEGY BASED ON MACD

As I mentioned in theoretical part, MACD is lagging indicator, therefore signals produced will not be that reliable. Especially, when market is not trending up nor down.

Sometimes and also in this case, the MACD open level parameter is set in pips. Moreover, Metatrader has already predefined MACD strategy with parameters said below, therefore I chose this variant. However, in the code it is converted as follows:

MACD open level * pip size

The parameter is interpreted as a negative value for signals to buy. Way to calculate has no impact on final results, so they will be same.

Because of first sight complexity, I put MACD histogram and lines to describe trading techniques on it. Note, that MACD line (the blue line) is created from the slow and fast EMA by their subtraction:

Figure 30: MACD trading technique

Source: Littlefishfx 2014

Input parameters:

 MACD open level – 3  MACD close level – 2  MA trend period – 24  Buy signal is generated when the MACD (blue line) crosses above the zero line OR when the MACD (blue line) crosses above the MACD signal line (red line).  Sell signal is formed when MACD crosses below the zero line OR similarly, when the MACD crosses below the MACD signal line.  Sell/Buy stop when a new signal is generated or when it reaches stop-loss level  01/2009 – 12/2013; H1 timeframe; 0.1 lot; capital: 10,000 USD  Stop-loss – 2 % of capital

- 59 -

Figure 31: MACD equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 17: MACD strategy report

Source: own illustration using output data from Metatrader

Strategy resulted in slightly positive numbers. Net profit 632 USD representing 1.26 % p.a. yield cannot be understand as solid. Profit and loss ratio is relatively same. Drawdown is not small to be consider good, but is not that high, as well. Equity yield indicate to be volatile, however attempt to trend can be seen over there.

One thing is certain, positive results before optimization indicate that strategy could be even more profitable after optimization. So next step is a strategy optimization and backtest following. There will be 3 input parameters tested:

 MACD open level from period 2 to period 6 with step 1  MACD close level from period 2 to period 6 with step 1  MA trend period starting at level 8 going to 40 with step 2

Totally 425 different strategy combinations will be tested.

- 60 -

Figure 32: Optimized MACD inputs - equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 18: Optimized MACD inputs – strategy report

Source: own illustration using output data from Metatrader

 Optimized values: MA period 17 MACD open level 3 MACD close level 6

As I expected, after optimization strategy become more profitable. Profitability reached 4.3 % p.a. However profit is more than 3 times as much as it was before optimization, it is not enough to consider investing money to such risky market. Comparing to previous results, all values have improved, excluding drawdown that kept down on the same level. Change in MA period value led to rise in total trades. Profit and loss ratio seems very positive; therefore in my opinion stop-loss optimization will bring even better results. Next step will be stop-loss optimization. There will be totally 186 strategies tested as initial stop-loss values starts from 30 and it goes up to 400 points with 10 point step.

Optimization of MACD stop-loss

Figure 33: Final MACD optimization – equity curve

Source: Metatrader illustration; x-number of trades, y-total capital - 61 -

Table 19: Final MACD optimization – strategy report

Source: own illustration using output data from Metatrader

 Optimized values: Stop-loss 250 MA period 17 MACD open level 3 MACD close level 6

Strategy didn‘t come up to expectations. Although net profit has risen to 4.95 % per annum, I expected opposite direction of change in stop-loss. Stop-loss became wider by 50 points, that is according to Elder (2002) unsuitable input of this parameter. His recommendation, that stop-loss should never expose more than 2 % of equity to the risk of loss would be broken. Anyway, breaking that rule has brought better results so it can‘t be understand in bad way.

Optimized MACD + CCI strategy

I decided to combine MACD as trend indicator with momentum indicator. I choose CCI as a typical momentum representative. According to theory this combination should perfectly work also in practice. MACD will find trend on the market and CCI will signalize exact time to enter the trade. However in practice combination of trend and momentum indicator is not very popular. The reason is that it doesn‘t work well, even more, not all of them can be logically combined. However I decided to combine MACD with CCI. Sometimes, those two are used, especially with scalping techniques. Therefore, I expect more trading signals will be generated.

Input parameters:  Open long, when CCI tries to move from its bottom toward -100 i.e. upward direction to 0 line and at the same time MACD is below zero line  Sell short, when CCI tries to move from its top toward +100 i.e. downward direction to 0 line and at the same time MACD is above zero line  Sell/ stop when a new signal is generated or when it reaches stop-loss  01/2009 – 12/2013; H1 timeframe; 0.1 lot; capital: 10,000 USD

- 62 -

Figure 34: MACD + CCI - equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 20: MACD + CCI – strategy report

Source: own illustration using output data from Metatrader

Optimized values:  CCI period – 10  CCI up and bottom – ±100  Fast EMA – 12  Slow EMA – 26  Signal EMA line – 9  Stop-loss – 200 pips

Again, strategy consisted of 2 indicators turned into positive numbers. Although it is not more profitable than previous indicator combinations, it still generates profit of 13 % that is much more than just simple MACD trading strategy. Similarly with Stoch RSI, strategy would generate entry signal too often. The one reason can be closely set CCI period and signal EMA line.

Drawdown is again at very tiny level as a result of tight stop-loss. Despite not very positive profit / loss ratio, strategy seems very remarkable to me. However, the use of strategy could be better in short term trading e.g. scalping. Comparing with others, double indicator strategies; me, as a day-trader I prefer moving average combined with parabolic.

4.6 TRADING STRATEGY BASED ON BOLLINGER BANDS

As I mentioned in theoretical part, Bollinger bands are mostly used to identify market volatility. They do not give us indication about future price movement; therefore they shouldn‘t be used as absolute buy/sell signal. Following Forbes magazine, I will test this - 63 - strategy based on Bollinger bands indicator, but I will add one more indicator that will generate signals to entry or leaving the position. I decided for MACD as indicator that can measure current trend's strength and detect the trend change points.

Input parameters:

 MACD periods - EMA 12 and EMA 26  Bollinger bands period – 20  Standard deviation determining upper and lower band - 2  Buy signal happens when the MACD Average goes above the band.  Sell signal is generated when the MACD Average goes below the band.  Sell/Buy stop when a new signal is generated or when it reaches stop-loss level  01/2009 – 12/2013; H1 timeframe; 0.1 lot; capital: 10,000 USD  Stop-loss – 2 % of capital

Figure 35: Bollinger bands + MACD equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 21: Bollinger bands + MACD – strategy report

Source: own illustration using output data from Metatrader

Strategy made surprisingly high loss, but speaks from own experience, strategy based only on Bollinger‘s indicator could bring even worse results. Unpleasant number of drawdown makes strategy rubbish, however as it was proven in last chapter, optimization process can turn strategy into positive numbers and also reduce drawdown to desired level.

- 64 -

Optimization of periods with fixed stop-loss

There is too many inputs in this strategy needed to be optimized. I choose EMA slow optimization from initial value of 8 until value of 30 with step 2; EMA fast with same parameters. Then I set Bollinger bands values starting from 8 with step 3, until it will reach level 38 and lastly standard deviation values from 1 until 4 with step 1. Totally 6,336 strategies combination will be tested.

After long-lasting testing, software found best results depicted on Figure below:  MACD slow line – EMA 14  MACD fast line – EMA 12  Bollinger bands – 14  Other parameters including standard deviation stayed unchanged

Figure 36: Optimized BB + MACD inputs - equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 22: Optimized BB + MACD inputs – strategy report

Source: own illustration using output data from Metatrader

Although strategy is still loss making, I can see improvement in optimized one. Net profit, however is still in red, it is not that high as it was before. Moreover proportion between protif and loss trades became a little bit better. Drawdown felt down more than half of previous level. Strategy seems to be better on it, but there is still one indicator that I worry about – huge volatility in equity curve. Judging by volatility in equity curve, strategy doesn‘t have stable development, therefore I cant recommend it for future trading.

- 65 -

Last optimization will be aimed at stop loss. Due to high ratio between profit and loss trades, I suppose, strategy could reach better results, if stop-loss woulnd‘t be that high. My surmise will be tested under those conditions:

 Stop-loss with initial value starting from 50 going until 600 with step 10, So totally 55 strategies with different stop-loss will be tested.

Optimization of stop-loss

Figure 37: Final BB + MACD optimization – equity curve

Source: Metatrader illustration; x-number of trades, y-total capital

Table 23: Final BB + MACD optimization – strategy report

Source: own illustration using output data from Metatrader

 Optimized value – stop-loss change to 70 USD

Last optimization brought unexpectedly positive results. There was 11.63 % yearly yield that could be reached. According to loss that was before optimization process, 11.63 % seems entirely apropos. However considering high risky market that Forex is, this yield may not be enough for everyone.

Not only profit shot into plus, but also drawdown shows acceptable numbers. Profit vs. loss ratio changed negatively. It can be result of tighter stop-loss, which turned some potentially profitable trades into loss by not giving them enough space. Tighter stop-loss also caused huge number of trades, because positions were closed earlier with small stop-loss so there was an opportunity for another trade. Strategy made almost perfect development in equity curve, therefore it can interest somebody. However, comparing risk and profit that could be made, I personally wouldn‘t apply my mind to this strategy.

- 66 -

5 COMPARISON AND RECOMMENDATIONS

In this chapter, I will compare particular strategies. Later I will formulate recommendations for intraday traders, based on those comparisons.

In table below, strategies are sorted according to profitability divided into indicators group.

Table 24: Comparison of strategies

Source: own illustration

Table clearly shows that among strategies tested, there are much better results according to profitability in strategies that consist of two indicators. Despite good results in all strategies tested, rule can‘t be applied on all strategies in general. As I mentioned earlier, some combinations of indicators are irrational and leads to many loss-making positions even more to destroying of trading account. However, there is huge probability that most of them, especially good matched indicators will work same way and will bring some profit.

The main point of optimization is to find best combination of input and output parameters of the strategy in given time period. Therefore, based on results I have, I can confirm legitimacy of strategy optimization.

The best results among all strategies reached combination of Stochastic and RSI. Strategy also hit the lowest drawdown what makes it even more interesting. Unfortunately, huge amount of trades and potential expenses in form of spread or slippage can cause, that final profitability will be better using moving average with parabolic SAR strategy. However, taking into consideration so slow drawdown and so tight stop-loss, Stoch RSI can still be very interesting for more conservative currency trader.

- 67 -

Moreover I see that all simple strategies were loss-making or there was small annual profit that was ridiculous comparing with risky Forex market. In my opinion, the reason was bad timing in case of simple MA and MA crossover or bad trend determination in case of RSI and simple MACD strategy. Another reason could be too many false signals, especially in MA cross or RSI.

Despite all those statements about profitable trading by combination of indicators, one combination was highly loss-making until I optimized it. It was combination of Bollinger bands and MACD. However, as it was written earlier. Bollinger bands are used to identify volatility, so they do not give us very reliable trade signals as they do not know what trend is on the market or timing in position. Adding MACD as trend-following indicator I get rid of one shortage, but combination MACD+BB still miss the information: when to enter the trade. Therefore the strategy makes so huge loss even if it was combination of 2 indicators. Anyway, final optimization led to brilliant profitability by setting tighter stop-loss.

It is very important to say, that all results and calculations are based only on 5 year period tested. Although it is normal method on Forex market, it is necessary to understand, that other period even other currency pair could bring totally different results. Therefore I decided for 5 years period, that can be understand as very good market situation representative, especially by using H1 timeframe.

Despite small doubts, backtest give us a perfect view about successfulness of strategies tested. In spite of not reaching 19 % p.a. profitability using Stoch RSI, I can say, there is huge potential in this strategy and also huge probability, that strategy will bring us some profit. However in can be less or also more than 19 %. The aim of trader should be to find strategy, which is profitable over a long period.

Another recommendation for traders is already mention combination of indicators. You can combine from 2 until thousands of indicators together. However too elaborated strategies based on more and more indicators generate less entry signals and expose traders to danger of inactivity. That often leads to manual changes in ATS and opening more often loss-making positions. In this case money management can be understand as very important and recommended trading process. Anyway, as it can be seen from comparing table, using simple strategy based on one indicator is very risky and non-profitable. The best option for traders could be to try as many strategies as they can, optimize them, and doing backtest to find out how it works on different timeframes and different time periods.

- 68 -

CONCLUSION

The primary purpose of this thesis was to propose an optimization of selected technical analysis indicators on the Forex market. In order to accomplish the aim of the study thesis was structured into chapters that represent different partial goals. The most important one was to create,and optimize strategy defined, because all recommendations and conclusion are based on those findings.

The indicators were selected based on recommendation of Forbes web-magazine. Trading strategies were tested using automated backtesting software Metatrader version 4 on the EUR/USD currency pair for the period of 1 January 2009 to 31 December 2013. All strategies had the same input rules determined in order to perform their comparison.

The results have been compared in terms of profitability, stability and crash risk to determine whether given strategy and its optimization will improve technical trading on the Forex market.

This hesis demonstrates that rely on signals generated by the only one indicator may not lead to the most successful strategy. So the general conclusion of work could be fact that any trading strategy based on a selection of simple indicator will bring same or worse results than its combination with other indicator or group of indicators. Moreover, another fact is, that any strategy based either on simple indicator or based on group of indicators will bring better results when is in optimized form.

From the final comparison I can conclude, that applying optimization when using strategies based on indicators, increases overall profitability of capital invested. Moreover in some cases also decreases risk in form of drawdown and increases stability in form of profit and loss ratio, as well. Although it is never obvious that strategy will be profitable after optimizing, I can declare, that optimization will bring improvement in results.

All together I can conclude that using backtest of strategy before implementation itself with optimization following will create a higher and more stable return on capital invested. As it was confirmed, finding suitable input parameters of indicators can increase the success of the trading system. Moreover, a very important role for long-term profitable trading is a strong money management.

As the character of markets is changing and results from my master thesis may not be valid forever, the study can be improved upon in the future. The strategies could be adapted to other markets, such as commodity or stock markets. Different, more advanced methods, such as neural networks and genetic algorithms could be implemented or other analysis, e.g. fundamental, could be taken into account.

- 69 -

BIBLIOGRAPHY

1 BACHRATÝ, Milan. Forex: dobrodružstvo vývoja stratégie. Slovensko: Fxmprofit, c2012, 190 p. ISBN 9788097092603.

2 BARNES, Paul. Stock market efficiency, insider dealing and market abuse. Farnham, England: Gower, c2009, x, 209 p. ISBN 978-0-566-08849-0

3 BRADA, Jaroslav. Technická analýza. Vyd. 1. v Praze : Vysoká škola ekonomická v Praze, 2000. 171 p. ISBN 8024500965.

4 CHENG, Grace. 7 winning strategies for trading forex: Real and actionable techniques for profiting from the currency markets. Hampshire: Harriman House Ltd, 2007. 260 p. ISBN 978-1-905461-19-2.

5 COLBY, Robert W. The Encyclopedia of Technical Market Indicators. 2nd ed. Boston: McGraw-Hill, 2003. 820 p. ISBN 978-0-07-012057-0.

6 DICKS, James. Forex made easy: 6 Ways to Trade the Dollar. New York: The McGraw-Hill Companies, 2004. 216 p. ISBN 0-07-143894-7.

7 DICKS, James. FOREX TRADING SECRETS: TRADING STRATEGIES FOR THE FOREX MARKET. New York: The McGraw-Hill Companies, 2010. 318 p. ISBN 978- 0-07-174709-7.

8 GREENE, GERALD E. Turning Losing Forex Trades into Winners: Proven Techniques to Reverse Your Losses. New Jersey: John Wiley & Sons, Inc., 2008. 224 p. ISBN 978-0-470-18769-2.

9 HARTMAN, Ondřej a Ludvík TUREK. První kroky na FOREXu. Vyd. 1. Brno: Computer Press, 2009. 120 p. ISBN 978-80-251-2006.

10 JÍLEK, Josef. Akciové trhy a investování. 1. ed. Praha : Grada, 2009. 656 p. ISBN 9788024729633.

11 KAHN, Michael N. Technical analysis plain and simple : Charting the markets in your language. 3rd ed. New Jersey : FT Press, 2010. 318 p. ISBN 978-0-13-704201-2.

12 KIRKPATRICK, Charles D.; DAHLQUIST, Julie. Technical Analysis: The Complete Resource for Financial Market Technicians. 2nd ed. New Jersey : FT Press, 2011. 671 p. ISBN 978-0-13-705944-7.

- 70 -

13 KNIGHT, TIM. Chart Your Way to Profits: The Online Trader’s Guide to Technical Analysis with ProphetCharts. New Jersey: John Wiley & Sons, Inc., 2010. 519 p. ISBN 978-0-470-62002-1.

14 LARSON, Mark. 12 Simple Technical Indicators that Really Work. 1st ed. Maryland : Marketplace Books, 2007. 119 p. ISBN 978-1-59280-290-6.

15 LEVINSON, Marc. Guide to financial markets. 4th ed. London: Profile books, 2006. 250 p. ISBN 978-1-86197-956-8.

16 LIEN, Kathy. Forex: ziskové intradenní a swingové obchodní strategie : jak na technickou a fundamentální analýzu pro úspěch na finančních trzích. 2., extend. edition. Prague: FXstreet.cz, c2013, 263 p. ISBN 9788090441828.

17 MARTINEZ, Jared F. The 10 essentials of forex tranding. 1st ed. The McGraw-Hill Companies, New York, 2007. 218 p. ISBN 0-07-150873-2.

18 MENDELSOHN, Louis B. Beyond Candlesticks: New Japanese Charting Techniques Revealed. New York: JOHN WILEY & SONS, INC., 1994, 296 p. ISBN 978-0-471- 00720-3.

19 MURPHY, John J. Technical Analysis of the financial markets: A Comprehensive Guide To Trading Methods And Applications. 1st ed. New York: NYIF, 1999. 542 p. ISBN 0-7352-0066-1.

20 NEELY, Christopher J., 1997. Technical Analysis in the Foreign Exchange Market: A Layman’s Guide. Federal Reserve Bank of St. Louis Review, 79(5), 23–38.

21 NESNÍDAL, Tomáš a Petr PODHAJSKÝ. Jak se stát intradenním finančníkem. Praha: Centrum finančního vzdělávání, 2008, 283 p. Finančník. ISBN 978-80-903874- 4-7.

22 NISON, Steve. Beyond Forex trading using intermarket analysis: Discovering hidden market relationships that provide early clues for price direction. Columbia, Maryland: MARKETPLACE BOOKS, 2006, 108 p. ISBN 1-59280-295-8.

23 O'KEEFE, Ryan. Making Money in Forex: Trade Like a Pro Without Giving Up Your Day Job. 2nd ed. New York : John Wiley and Sons, 2010. 222 p. ISBN 0-470-48728- 3.

24 PARK, Cheol-Ho, and Scott H. IRWIN, 2004. The Profitability of Technical Analysis: A Review. AgMAS Project Research Report 2004-04, University of Illinois at Urbana-Champaign, Urbana. (Manuscript)

- 71 -

25 REJNUŠ, Oldřich. Finanční trhy. 1st ed.. Ostrava : Key Publishing, 2008. 559 p. ISBN 9788087071878.

26 TAYLOR, Francesca. Mastering foreign exchange & currency options: A practical guide to the new marketplace. 2nd ed. Glasgow : Bell & Bain, 2003. 399 p. ISBN 0- 273-66295-3.

27 TOSCHAKOV, Igor. Beat the odds in Forex trading: How to identify and profit from high-percentage market patterns. New Jersey : John Wiley & Sons, Inc., 2006. 216 p. ISBN 978-0-471-93331-1.

28 BURGES, Gareth A. Trading and investing in the Forex market using chart techniques. Hoboken: Wiley, 2009. xiii, 211. ISBN 9780470745274

29 TUREK, Ludvík. První kroky na burze. 1st ed. Brno : Computer Press, 2008. 154 p. ISBN 9788025119150.

30 VESELÁ, Jitka. Investování na kapitálových trzích. 2.edition. Prague: Wolters Kluwer Czech republic, 2011, 789 p. ISBN 9788073576479.

Electronic sources

31 Bank for international settlements: Triennial Central Bank Survey [online]. 5.9.2013 [ref. 2014-01-28]. Available at: http://www.bis.org/publ/rpfx13fx.pdf

32 BIS. Triennial Central Bank Survey of foreign exchange turnover in April 2013 [online]. 5 September 2013 [Referred 2013-11-10]. Available at: https://www.bis.org/press/p130905.htm

33 Forex Magnates: Calculating margin by Interbank FX [online]. 12.02.2010 [ref. 2014- 01-28]. Available at: http://forexmagnates.com/calculating-margin-by-interbank-fx/

34 Forex Market Hours: Forex trading hours, Forex trading time [online]. © 2006 — 2013 [ref. 28.1.2014]. Available at: http://www.forexmarkethours.com/

35 Forexmagnates. Calculating margin by Interbank FX [online]. 12.2.2010 [ref. 2013- 11-24]. Available at: http://forexmagnates.com/calculating-margin-by-interbank-fx/.

36 Frankel, Jeffrey A. 2008. Foreign Exchange. The Concise Encyclopedia of Economics. 2008. Library of Economics and Liberty. [Ref. 19.2.2014]. Available in www-format: .

- 72 -

37 Inlineforex: How to Use the RSI for Intraday Trading [online]. © 2014 [ref. 22.3.2014]. Available at: http://inlineforex.com/how-to-use-the-rsi-for-intraday- trading/

38 Investopedia: Elliot Wave Theory [online]. © 2009 [ref. 28.3.2014]. Available at: http:// http://www.investopedia.com/articles/technical/111401.asp

39 Investopedia: Kagi Chart [online]. © 2014 [ref. 28.1.2014]. Available at: http://www.investopedia.com/terms/k/kagichart.asp

40 IŢIP, Ronald. Krátka história forexu [online]. [2010] [ref. 2011-12-14]. Available at:

41 LitthefishFX: Trading with MACD [online]. 4.3.2014 [ref. 19.4.2014]. Available at: http:// http://www.littlefishfx.com/trading-macd/

42 MarketTide: The Japanese Renko chart & trading system [online]. 2002-2014. [ref. 28.1.2014]. Available at: http://www.markettide.com/html/renko.html

43 MQL4 community: Strategy Tester: Modes of Modeling during Testing [online]. Copyright 2000-2014 [ref. 2014-03-16]. Available at: http://articles.mql4.com/70

44 Oanda: Forex Market Hours [online]. © 1996 - 2014 [ref. 28.1.2014]. Available at: http://fxtrade.oanda.com/analysis/market-hours obchodujem-historia-forexu>.

45 Online Financial Markets: Volatility Indicators [online]. © 2012 [reff. 2014-04-08]. Available at: http:// http://www.onlinefinancialmarkets.com/best-forex-trading- system.html

46 Online Trading Concepts: line Trading Concepts HomeTechnical IndicatorsCandlestick PatternsChart PatternsOptions MACD Moving Average Crossovers [online]. © 2007-2012 [reff. 2014-04-04]. Available at: http://www.onlinetradingconcepts.com/TechnicalAnalysis/MACD2.html

47 TA-Guru: Point and figure chart [online]. © 2010 [ref. 28.1.2014]. Available at: http://www.ta-guru.com/Book/Charts/PointAndFigureChart.php5

48 WHITE, Rocky. Forbes: Technical Analysis Indicator That Works Turns Positive For These Stocks [online]. 15.4.2013 [ref. 22.3.2014]. Available at: http://www.forbes.com/sites/greatspeculations/2013/04/15/technical-analysis- indicator-that-works-turns-positive-for-these-stocks/

- 73 -

LIST OF TABLES

TABLE 1: TRADING SESSIONS ...... - 14 - TABLE 2: AVERAGE PIP RANGE ...... - 14 - TABLE 3: CURRENCY DISTRIBUTION OF GLOBAL FOREIGN EXCHANGE MARKET TURNOVER ...... - 15 - TABLE 4: PREVIEW OF STOP-LOSS RISK ...... - 44 - TABLE 5: SIMPLE MOVING AVERAGE - STRATEGY REPORT ...... - 47 - TABLE 6: OPTIMIZED MA PERIOD - STRATEGY REPORT ...... - 48 - TABLE 7: FINAL MOVING AVERAGE OPTIMIZATION – STRATEGY REPORT ...... - 48 - TABLE 8: OPTIMIZED MOVING AVERAGE + PARABOLIC SAR – STRATEGY REPORT ...... - 50 - TABLE 9: MA CROSSOVER STRATEGY REPORT ...... - 51 - TABLE 10: OPTIMIZED MA CROSSOVER INPUTS - STRATEGY REPORT ...... - 52 - TABLE 11: FINAL MA CROSSOVER OPTIMIZATION – STRATEGY REPORT ...... - 52 - TABLE 12: MOVING AVERAGE CROSSOVER + PSAR – STRATEGY REPORT ...... - 53 - TABLE 13: RSI STRATEGY REPORT ...... - 55 - TABLE 14: OPTIMIZED RSI INPUTS – STRATEGY REPORT ...... - 56 - TABLE 15: FINAL RSI OPTIMIZATION – STRATEGY REPORT ...... - 57 - TABLE 16: STOCH RSI – STRATEGY REPORT ...... - 58 - TABLE 17: MACD STRATEGY REPORT ...... - 60 - TABLE 18: OPTIMIZED MACD INPUTS – STRATEGY REPORT ...... - 61 - TABLE 19: FINAL MACD OPTIMIZATION – STRATEGY REPORT ...... - 62 - TABLE 20: MACD + CCI – STRATEGY REPORT ...... - 63 - TABLE 21: BOLLINGER BANDS + MACD – STRATEGY REPORT ...... - 64 - TABLE 22: OPTIMIZED BB + MACD INPUTS – STRATEGY REPORT ...... - 65 - TABLE 23: FINAL BB + MACD OPTIMIZATION – STRATEGY REPORT ...... - 66 - TABLE 24: COMPARISON OF STRATEGIES ...... - 67 -

LIST OF FIGURES

FIGURE 1: HISTORICAL HOURLY TRADE ACTIVITY ...... - 14 - FIGURE 2: ELLIOTT WAVES ...... - 22 - FIGURE 3: BAR CHART ...... - 23 - FIGURE 4: CANDLESTICKS ...... - 24 - FIGURE 5: POINT AND FIGURE GRAPH ...... - 25 - FIGURE 6: KAGI CHART ...... - 26 - FIGURE 7: RENKO CHART ...... - 27 - FIGURE 8: SUPPORT AND RESISTANCE ...... - 27 - FIGURE 9: TREND LINES ...... - 28 - FIGURE 10: PREVIEW OF MOVING AVERAGE CROSSOVER ...... - 31 - FIGURE 11: PREVIEW OF MACD ...... - 32 - FIGURE 12: PREVIEW OF PARABOLIC SAR ...... - 34 - FIGURE 13: PREVIEW OF RELATIVE STRENGTH INDEX ...... - 35 - FIGURE 14: PREVIEW OF COMMODITY CHANNEL INDEX ...... - 36 - FIGURE 15: PREVIEW OF STOCHASTIC ...... - 37 - FIGURE 16: PREVIEW OF BOLLINGER BANDS ...... - 39 - FIGURE 17: SEQUENCE OF STRATEGY DEVELOPMENT ...... - 43 - FIGURE 18: SIMPLE MOVING AVERAGE – EQUITY CURVE ...... - 46 - FIGURE 19: OPTIMIZED MA PERIOD - EQUITY CURVE ...... - 47 - FIGURE 20: FINAL MA OPTIMIZATION - EQUITY CURVE ...... - 48 - FIGURE 21: OPTIMIZATION OF MOVING AVERAGE + PARABOLIC SAR EQUITY CURVE ...... - 49 - FIGURE 22: MA CROSSOVER EQUITY CURVE ...... - 51 - FIGURE 23: OPTIMIZED MA CROSSOVER INPUTS - EQUITY CURVE ...... - 51 - - 74 -

FIGURE 24: FINAL MA CROSSOVER OPTIMIZATION - EQUITY CURVE ...... - 52 - FIGURE 25: MOVING AVERAGE CROSSOVER + PSAR – EQUITY CURVE ...... - 53 - FIGURE 26: RSI EQUITY CURVE ...... - 55 - FIGURE 27: OPTIMIZED RSI INPUTS - EQUITY CURVE ...... - 56 - FIGURE 28: FINAL RSI OPTIMIZATION – EQUITY CURVE ...... - 56 - FIGURE 29: STOCH RSI - EQUITY CURVE ...... - 58 - FIGURE 30: MACD TRADING TECHNIQUE ...... - 59 - FIGURE 31: MACD EQUITY CURVE ...... - 60 - FIGURE 32: OPTIMIZED MACD INPUTS - EQUITY CURVE...... - 61 - FIGURE 33: FINAL MACD OPTIMIZATION – EQUITY CURVE ...... - 61 - FIGURE 34: MACD + CCI - EQUITY CURVE ...... - 63 - FIGURE 35: BOLLINGER BANDS + MACD EQUITY CURVE ...... - 64 - FIGURE 36: OPTIMIZED BB + MACD INPUTS - EQUITY CURVE ...... - 65 - FIGURE 37: FINAL BB + MACD OPTIMIZATION – EQUITY CURVE ...... - 66 -

- 75 -

LIST OF ABBREVIATIONS

ATS – Automated trading system

BB – Bollinger bands

BIS – Bank for international settlements

CCI – Commodity channel index

EURUSD – Euro and US dollar currency pair

Forex – Foreign exchange

MA – Moving average

MACD – Moving average convergence and divergence

MQL4 – MetaQuotes Language

OHLC – Open, high, low, close

OTC – Over the counter

PSAR – Parabolic stop and reverse

RSI – Relative strength index

SMA – Simple moving average

Stoch – Stochastic

TA – Technical analysis

- 76 -

APPENDIX: GLOSSARY3

ATS (also robot) Computer trading program that automatically submits trades to an exchange. appreciation A currency is said to appreciate when it strengthens in price in response to market demand arbitrage Taking advantage of prices in different – but related – markets by the purchase or sale of an instrument and the simultaneous taking of an equal and opposite position in a related market to profit from small price differentials. broker An individual or firm that acts as an intermediary, putting together buyers and sellers for a fee or commission. In contrast, a dealer commits capital and takes one side of a position, hoping to earn a spread (profit) by closing out the position in a subsequent trade with another party. bull market A market distinguished by a prolonged period of rising prices. Opposite of bear market. currency Any form of money issued by a government or central bank and used as legal tender and a basis for trade. currency pair The two currencies that make up a foreign exchange rate. For example, USD/CHF. day trading Opening and closing positions within the same trading session. depreciation A fall in the value of a currency due to market forces. drawdown The magnitude of a decline in account value, either in percentage or dollar terms, as measured from peak to subsequent trough. For example, if a trader‘s account increased in value from $10,000 to $20,000, then dropped to $15,000, then increased again to $25,000, that trader would have had a maximum drawdown of $5,000 (incurred when the account declined from $20,000 to $15,000) even though that trader‘s account was never in a loss position from inception.

3 This chapter is compiled on the basis of glossary of Grace Cheng (2007), Jared Martinez (2007) and James Dicks (2004) going long The purchase of a stock, commodity, or currency for investment or speculation. going short The selling of a currency or instrument not owned by the seller. hedge A position or combination of positions that reduces the risk of your primary position. initial margin The initial deposit of collateral required to enter into a position as a guarantee on future performance. leverage (also margin) The ratio of the amount used in a transaction to the required security deposit. liquidity The ability of a market to accept large transaction with minimal to no impact on price stability. long position A position that appreciates in value if market prices increase. When the base currency in the pair is bought, the position is said to be long. lot A unit to measure the size of the deal. margin The required equity that an investor must deposit to collateralise a position. margin call A requirement from a broker or dealer for additional funds or other collateral to bring the margin up to a required level to guarantee performance on a position that has moved against the customer. open position An active trade with corresponding unrealised profit or loss, which has not been offset by an equal and opposite deal. over the counter (OTC) Used to describe any transaction that is not conducted over an exchange. pip (point) The smallest increment of change in a foreign currency price, either up or down. The last digit in the rate (e.g., for EUR/USD, 1 point _0.0001).

profit taking The unwinding of a position to realise profits. range The difference between the highest and lowest price of a currency recorded during a given trading session. rate The price of one currency in terms of another currency. resistance A term used in technical analysis indicating a specific price level at which analysis concludes people will sell. short position An investment position that benefits from a decline in market price.When the base currency in the pair is sold, the position is said to be short. slippage The difference in price between what the screen quote indicates and the actual price that gets executed on the trading platform. For example, if the quote shows a bid price of 1.2400 and the trading platform actually executes the trade at 1.2402, there would be 2 pips of slippage – the difference between the signal price and actual execution price. spread The difference between the bid and offer prices. stop loss order An order to automatically liquidate an open position when a particular price isreached, either above or below the price that prevailed when the order was given. Often used to minimise exposure to losses if the market moves against a trader‘s position. tick A minimum change in price, up or down. trader A merchant involved in cash commodities or a professional speculator who trades for his own account. transaction The entry or liquidation of a trade. trend The general direction, either upward or downward, in which prices have been moving.

trendline In charting, a line drawn across the bottom or top of a price chart indicating the direction or trend of price movement. If up, the trendline is bullish; if down, it is bearish. volatility A statistical measure of a market‘s price fluctuations over time.