Heuristic Based Trading System On Forex Data Using Technical Indicator .

1y ago
12 Views
2 Downloads
1.03 MB
135 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Roy Essex
Transcription

HEURISTIC BASED TRADING SYSTEM ON FOREX DATA USINGTECHNICAL INDICATOR RULESA THESIS SUBMITTED TOTHE GRADUATE SCHOOL OF NATURAL AND APPLIED SCIENCESOFMIDDLE EAST TECHNICAL UNIVERSITYBYMURAT ÖZTÜRKIN PARTIAL FULFILLMENT OF THE REQUIREMENTSFORTHE DEGREE OF MASTER OF SCIENCEINCOMPUTER ENGINEERINGFEBRUARY 2015

Approval of the thesis:HEURISTIC BASED TRADING SYSTEM ON FOREX DATA USINGTECHNICAL INDICATOR RULESsubmitted by MURAT ÖZTÜRK in partial fulfillment of the requirements for thedegree of Master of Science in Computer Engineering Department, Middle EastTechnical University by,Prof. Dr. Gülbin Dural ÜnverDean, Graduate School of Natural and Applied SciencesProf. Dr. Adnan YazıcıHead of Department, Computer EngineeringProf. Dr. İsmail Hakkı TorosluSupervisor, Computer Engineering Department, METUDr. Güven FidanCo-supervisor, Argedor Information TechnologiesExamining Committee Members:Prof. Dr. Göktürk ÜçolukComputer Engineering Department, METUProf. Dr. İsmail Hakkı TorosluComputer Engineering Department, METUDr. Güven FidanArgedor Information TechnologiesDr. Onur Tolga ŞehitoğluComputer Engineering Department, METUMustafa Onur Özorhan, M.Sc.Central Bank of the Republic of TurkeyDate:

I hereby declare that all information in this document has been obtained andpresented in accordance with academic rules and ethical conduct. I also declarethat, as required by these rules and conduct, I have fully cited and referenced allmaterial and results that are not original to this work.Name, Last Name:Signatureiv:MURAT ÖZTÜRK

ABSTRACTHEURISTIC BASED TRADING SYSTEM ON FOREX DATA USINGTECHNICAL INDICATOR RULESÖztürk, MuratM.S., Department of Computer EngineeringSupervisor: Prof. Dr. İsmail Hakkı TorosluCo-Supervisor: Dr. Güven FidanFebruary 2015, 115 pagesThe foreign exchange market, which is widely known as Forex or FX, is the largestfinancial market with a daily transactional volume of 5 trillion. Due to the hugestructure of the market, price analysis on FX market draws attention of many scientistsand practitioners. There are 2 main analysis approaches: Fundamental and technicalanalysis. Fundamental analysis focuses on the macroeconomic factors such as interestrate to explain the market movements. Technical analysis deals with past market pricedata to forecast the future prices. Technical analysis involves two main approaches:Chart analysis and technical indicator based price analysis. Chart analysis deals withdetection of patterns in price charts. Technical indicators transform the price timeseries data into another time series data to explore patterns. Technical indicators arewidely used in FX and other financial markets which are the building blocks of manytrading systems. A trading system is based on technical indicators or pattern-basedapproaches which produces buy/sell signals to trade in the market.In this thesis, a heuristic based trading system on Forex data is developed using popular technical indicators. The system grounds on selecting and combining the tradingrules based on indicators using heuristic methods. The selection of the trading rules isrealized by using Genetic Algorithm and a local search method. A weighted majorityvoting method is proposed to combine the technical indicator based trading rules toform a single trading rule. The experiments are conducted on 2 major currency pairsv

in 3 different time frames where promising results are achieved.Keywords: Forex, Technical Analysis, Technical Indicator, Trading Rule, HeuristicMethods, Genetic Algorithm, Time Series Analysisvi

ÖZFOREX VERİSİ ÜZERİNDE TEKNİK GÖSTERGE KURALLARINA DAYALIKEŞİFSEL YÖNTEM TABANLI ALIM-SATIM SİSTEMİÖztürk, MuratYüksek Lisans, Bilgisayar Mühendisliği BölümüTez Yöneticisi: Prof. Dr. İsmail Hakkı TorosluOrtak Tez Yöneticisi: Dr. Güven FidanŞubat 2015 , 115 sayfaDöviz alım-satım piyasası, yaygın olarak bilinen ismiyle Forex veya FX, günlük 5trilyon ’lık işlem hacmiyle dünyanın en büyük finansal piyasasıdır. Piyasanın devasayapısından dolayı, FX piyasasında fiyat analizi birçok bilim adamı ve piyasa oyuncusunun dikkatini çekmektedir. Başlıca 2 analiz yaklaşımı bulunmaktadır: Temel veTeknik Analiz. Temel analiz, piyasa hareketlerini açıklamak amacıyla faiz oranı gibimakroekonomik unsurlara odaklanır. Teknik analiz, gelecekteki fiyatları tahmin etmek amacıyla geçmiş piyasa fiyat verileriyle ilgilenir. Teknik analiz 2 temel yaklaşımiçermektedir: Grafik analizi ve teknik gösterge tabanlı fiyat analizi. Grafik analizi, fiyat grafiklerinde örüntülerin tespitiyle ilgilenir. Teknik göstergeler, örüntü keşfetmekamacıyla fiyat zaman serisi verisini farklı bir zaman serisi verisine dönüştürür. Birçokalım-satım sisteminin yapıtaşı olan teknik göstergeler, FX ve diğer finansal piyasalarda yaygın olarak kullanılmaktadır. Bir alım-satım sistemi, piyasada işlem yapmakamacıyla alım/satım sinyalleri üreten, teknik gösterge veya örüntü temelli yaklaşımlara dayalı bir sistemdir.Bu tezde, teknik göstergeler kullanılarak, Forex verisi üzerinde keşifsel yöntem tabanlı bir alım sistemi geliştirilmiştir. Sistem, keşifsel yöntemleri kullanarak, teknikgösterge tabanlı alım-satım kurallarının seçimine ve birleştirilmesine dayanır. Alımsatım kurallarının seçimi, Genetik Algoritma ve yerel arama yöntemleri kullanılarakgerçekleştirilmiştir. Tek bir alım-satım kuralı oluşturmak amacıyla, teknik göstergevii

tabanlı alım-satım kurallarını birleştiren bir ağırlıklı çoğunluk oylama yöntemi önerilmiştir. Deneyler 3 farklı zaman dilimindeki 2 ana döviz çifti ile yapılmış ve gelecekvadeden sonuçlar elde edilmiştir.Anahtar Kelimeler: Forex, Teknik Analiz, Teknik Gösterge, Alım-Satım Kuralı, Keşifsel Yöntemler, Genetik Algoritma, Zaman Serisi Analiziviii

To my dear mother and father (rest in peace)Emel, Hayrettinix

ACKNOWLEDGMENTSFirstly, I am grateful and would like to thank my supervisor Professor İsmail HakkıToroslu for giving me the opportunity to work with him. I would like to express mysincere gratitude for his encouragement, guidance, support and friendship throughoutmy thesis study.I would also like to thank my co-supervisor Dr. Güven Fidan for his support andguidance during this study.I would like to thank Professor Göktürk Üçoluk, Dr. Onur Tolga Şehitoğlu and M.Sc.Mustafa Onur Özorhan for accepting to be members of my examining committe.I am grateful to all my friends. I would like to acknowledge my friends Ömer, Ahmet,Abdullah and Aybike for their friendship. I owe much to Ömer and Ahmet for theirconstant support on resolving problems I have encountered during my thesis study.I am deeply grateful to my mother for her tolerance, patience and love. I would nothave completed this study without her support.x

TABLE OF CONTENTSABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .vÖZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiACKNOWLEDGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xTABLE OF CONTENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiLIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviiLIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xixLIST OF ABBREVIATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . xxCHAPTERS1INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . .12BACKGROUND ON FOREX AND TECHNICAL ANALYSIS . . .32.1Brief History of Forex . . . . . . . . . . . . . . . . . . . . .32.2Participants of Forex Market . . . . . . . . . . . . . . . . .42.3Mechanics of Currency Trading and Trading Terminology . .42.3.1Traded Currencies in Forex . . . . . . . . . . . . .42.3.2How To Trade in Forex and Trading Terminology .5Forecasting Future Prices: Fundamental and Technical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72.4xi

3RELATED WORK . . . . . . . . . . . . . . . . . . . . . . . . . . . 114TECHNICAL INDICATORS . . . . . . . . . . . . . . . . . . . . . . 154.1Moving Average . . . . . . . . . . . . . . . . . . . . . . . . 164.2Moving Average Envelopes . . . . . . . . . . . . . . . . . . 164.3TEMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.4Bollinger Bands . . . . . . . . . . . . . . . . . . . . . . . . 184.5% b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.6Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.7MACD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.8RSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.8.1Figurelli RSI . . . . . . . . . . . . . . . . . . . . 214.9ATR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.10Chandelier Exit . . . . . . . . . . . . . . . . . . . . . . . . 234.11Psychological Line . . . . . . . . . . . . . . . . . . . . . . . 244.12RVI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.13Stochastic Oscillator . . . . . . . . . . . . . . . . . . . . . . 254.14Ultimate Oscillator . . . . . . . . . . . . . . . . . . . . . . . 264.15Rate of Change . . . . . . . . . . . . . . . . . . . . . . . . 264.16DeMarker . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.17Relative Vigor Index . . . . . . . . . . . . . . . . . . . . . . 284.18MFI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29xii

54.19OBV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.20ADL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.21Chaikin Oscillator . . . . . . . . . . . . . . . . . . . . . . . 314.22CMF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324.23EMV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33TRADING RULES BASED ON TECHNICAL INDICATORS . . . . 355.1Crossover Rules . . . . . . . . . . . . . . . . . . . . . . . . 365.1.1Moving Average Price Crossover . . . . . . . . . . 365.1.2Double Moving Average Crossover . . . . . . . . 375.1.3Triple Moving Average Crossover . . . . . . . . . 385.1.4Moving Average Envelopes Crossover . . . . . . . 395.1.5TEMA Crossover . . . . . . . . . . . . . . . . . . 405.1.6MACD Crossover . . . . . . . . . . . . . . . . . . 405.1.7RSI Crossover . . . . . . . . . . . . . . . . . . . . 405.1.8Figurelli RSI Crossover . . . . . . . . . . . . . . . 415.1.9Chandelier Exit Crossover . . . . . . . . . . . . . 415.1.10Psychological Line Crossover . . . . . . . . . . . 425.1.11RVI Crossover . . . . . . . . . . . . . . . . . . . 425.1.12Stochastics Oscillator Crossover . . . . . . . . . . 435.1.13Ultimate Oscillator Crossover . . . . . . . . . . . 435.1.14Rate of Change Crossover . . . . . . . . . . . . . 43xiii

5.25.365.1.15DeMarker Crossover . . . . . . . . . . . . . . . . 445.1.16Relative Vigor Index Crossover . . . . . . . . . . 445.1.17MFI Crossover . . . . . . . . . . . . . . . . . . . 455.1.18OBV Crossover . . . . . . . . . . . . . . . . . . . 455.1.19ADL Crossover . . . . . . . . . . . . . . . . . . . 465.1.20Chaikin Oscillator Crossover . . . . . . . . . . . . 465.1.21CMF Crossover . . . . . . . . . . . . . . . . . . . 475.1.22EMV Crossover . . . . . . . . . . . . . . . . . . . 47Rules Based on Bollinger Bands, %b and Bandwidth Indicators 475.2.1W-Type Bottom Pattern . . . . . . . . . . . . . . . 485.2.2M-Type Top Pattern . . . . . . . . . . . . . . . . . 495.2.3Method III-Reversals . . . . . . . . . . . . . . . . 505.2.4%b-MFI . . . . . . . . . . . . . . . . . . . . . . . 515.2.5%b(CMF) Crossover . . . . . . . . . . . . . . . . 515.2.6The Squeeze and Expansion . . . . . . . . . . . . 52Divergence Rules . . . . . . . . . . . . . . . . . . . . . . . 535.3.1Rules Based on Bullish Divergences . . . . . . . . 545.3.2Rules Based on Bearish Divergences . . . . . . . . 54TRADING SYSTEM . . . . . . . . . . . . . . . . . . . . . . . . . . 596.1The Framework of The Proposed Trading System . . . . . . 596.2Testing Each Trading Rule For Qualification . . . . . . . . . 60xiv

6.376.2.1Trading Simulation Module . . . . . . . . . . . . 616.2.2GA Module . . . . . . . . . . . . . . . . . . . . . 63Combining The Qualified Rules . . . . . . . . . . . . . . . . 646.3.1Genetic Algorithm Module . . . . . . . . . . . . . 666.3.2Local Search Module . . . . . . . . . . . . . . . . 686.3.3Weighting Module . . . . . . . . . . . . . . . . . 686.3.4Combination Module . . . . . . . . . . . . . . . . 696.4Testing The Performance Of The Combined Trading System . 696.5A Sample Run of The Trading System . . . . . . . . . . . . 71EXPERIMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757.1Experimental Environment . . . . . . . . . . . . . . . . . . 757.2Investment Conditions . . . . . . . . . . . . . . . . . . . . . 757.3Evaluation Metrics . . . . . . . . . . . . . . . . . . . . . . . 767.4Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767.5Results and Discussion . . . . . . . . . . . . . . . . . . . . 777.5.17.5.2Experiments on EUR/USD: 1 Year Data . . . . . . 787.5.1.1Results . . . . . . . . . . . . . . . . . 787.5.1.2Discussion . . . . . . . . . . . . . . . 79Experiments on EUR/USD: 6 Months Data . . . . 817.5.2.1Results . . . . . . . . . . . . . . . . . 817.5.2.2Discussion . . . . . . . . . . . . . . . 81xv

7.5.38Experiments on GBP/USD: 6 Months Data . . . . 837.5.3.1Results . . . . . . . . . . . . . . . . . 847.5.3.2Discussion . . . . . . . . . . . . . . . 85CONCLUSION AND FUTURE WORK . . . . . . . . . . . . . . . . 87REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89APPENDICESAEXPERIMENTS ON EUR/USD DATA BETWEEN 01.01.2013-31.12.2013(1 YEAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93BEXPERIMENTS ON EUR/USD DATA BETWEEN 01.01.2013-30.06.2013(6 MONTHS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101CEXPERIMENTS ON GBP/USD DATA BETWEEN 01.01.2014-30.06.2014(6 MONTHS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109xvi

LIST OF TABLESTABLESTable 2.1 ISO codes for major and exotic currencies [6] . . . . . . . . . . . .5Table 2.2 Most actively traded major and cross currency pairs [7] . . . . . . .5Table 6.1 Results of phase 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 71Table 6.2 Results of combining rules using GA . . . . . . . . . . . . . . . . . 72Table 6.3 Results of combining rules using local search . . . . . . . . . . . . 73Table 7.1 Qualified and unqualified rules . . . . . . . . . . . . . . . . . . . . 79Table 7.2 Experiment results using net profit . . . . . . . . . . . . . . . . . . 80Table 7.3 Experiment results using average profit per trade . . . . . . . . . . . 80Table 7.4 Qualified and unqualified rules . . . . . . . . . . . . . . . . . . . . 82Table 7.5 Experiment results using net profit . . . . . . . . . . . . . . . . . . 83Table 7.6 Experiment results using average profit per trade . . . . . . . . . . . 83Table 7.7 Qualified and unqualified rules . . . . . . . . . . . . . . . . . . . . 84Table 7.8 Experiment results using net profit . . . . . . . . . . . . . . . . . . 85Table 7.9 Experiment results using average profit per trade . . . . . . . . . . . 85Table A.1 Experiment results using net profit (threshold 25) . . . . . . . . . . 94Table A.2 Experiment results using net profit (threshold 50) . . . . . . . . . . 95Table A.3 Experiment results using net profit (threshold 75) . . . . . . . . . . 96Table A.4 Experiment results using average profit per trade (threshold 25) . . 97Table A.5 Experiment results using average profit per trade (threshold 50) . . 98xvii

Table A.6 Experiment results using average profit per trade (threshold 75) . . 99Table B.1 Experiment results using net profit (threshold 25) . . . . . . . . . . 102Table B.2 Experiment results using net profit (threshold 50) . . . . . . . . . . 103Table B.3 Experiment results using net profit (threshold 75) . . . . . . . . . . 104Table B.4 Experiment results using average profit per trade (threshold 25) . . 105Table B.5 Experiment results using average profit per trade (threshold 50) . . 106Table B.6 Experiment results using average profit per trade (threshold 75) . . 107Table C.1 Experiment results using net profit (threshold 25) . . . . . . . . . . 110Table C.2 Experiment results using net profit (threshold 50) . . . . . . . . . . 111Table C.3 Experiment results using net profit (threshold 75) . . . . . . . . . . 112Table C.4 Experiment results using average profit per trade (threshold 25) . . 113Table C.5 Experiment results using average profit per trade (threshold 50) . . 114Table C.6 Experiment results using average profit per trade (threshold 75) . . 115xviii

LIST OF FIGURESFIGURESFigure 2.1 EUR/USD Exchange Rate Between 2002-2005 [8] . . . . . . . . .6Figure 2.2 EUR/USD Bid and Ask Prices [7] . . . . . . . . . . . . . . . . . .6Figure 2.3 Examples of 4 Types of Charts . . . . . . . . . . . . . . . . . . . .9Figure 4.1 MACD, Signal Line and MACD Histogram [11] . . . . . . . . . . 20Figure 4.2 True Range (TR) [11] . . . . . . . . . . . . . . . . . . . . . . . . 23Figure 5.1 Moving Average Price Crossover [11] . . . . . . . . . . . . . . . . 37Figure 5.2 Double Moving Average Crossover [11] . . . . . . . . . . . . . . . 38Figure 5.3 Triple Moving Average Crossover [51] . . . . . . . . . . . . . . . 39Figure 5.4 W-Type Bottom Pattern [34] . . . . . . . . . . . . . . . . . . . . . 49Figure 5.5 M-Type Top Pattern [34] . . . . . . . . . . . . . . . . . . . . . . . 50Figure 5.6 Regular and Hidden Bullish Divergences [9] . . . . . . . . . . . . 54Figure 6.1 The Framework Of The Overall Trading System . . . . . . . . . . 60Figure 6.2 Testing Each Trading Rule For Qualification . . . . . . . . . . . . 61Figure 6.3 Chromosome Representation of RSI Crossover Rule . . . . . . . . 64Figure 6.4 Combining Rules Using Genetic Algorithm As The Selection Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Figure 6.5 Combining Rules Using Local Search As The Selection Approach . 66Figure 6.6 Chromosome Representation of A Candidate Combined Rule . . . 67Figure 6.7 Selection of Trading Rules with Local Search . . . . . . . . . . . . 68xix

LIST OF ABBREVIATIONSADLAccumulation Distribution LineATRAverage True RangeBPBuying PressureCMFChaikin Money FlowEMAExponential Moving AverageEMVEase Of MovementEUREuroFXForex, Foreign ExchangeGAGenetic AlgorithmGBPGreat British PoundLWMALinear Weighted Moving AverageMACDMoving Average Convergence DivergenceMFIMoney Flow IndexOBVOn-Balance VolumeROCRate Of ChangeRSRelative StrengthRSIRelative Strength IndexRVIRelative Volatility IndexSMASimple Moving AverageSMMASmoothed Moving AverageTEMATriple Exponential Moving AverageTRTrue RangeUSDUnited States Dollarxx

CHAPTER 1INTRODUCTIONForex (FX in short) which stands for foreign exchange is the biggest financial marketin the world with a daily transaction exceeding 5 trillion. The transactions in Forexare based on exchanging currencies between parties. The participants in Forex arewidespread including banks, corporations, brokers-dealers, individuals etc. EUR/USD is the most traded currency pair in Forex market.Many practitioners and scientists are closely interested in price forecasting in Forex.In this context, the analysis approaches are divided into two groups: fundamental andtechnical analysis. Fundamental analysis deals with the macroeconomic factors toexplain and forecast the changes in price. Technical analysis aims to forecast the pricechanges using historical market data. Technical analysis approaches can be groupedas chart analysis and technical indicator based price analysis. Chart analysis focuseson the price charts with the aim of finding recurrent patterns in price. Technicalindicators transform the historical time series price data to another time series data todetect patterns, identify trends, measure volatility in price and define the relationshipbetween price and volume.The unstable and chaotic structure of price in Forex market complicates forecast analysis. This leads to the usage of optimization methods. Genetic algorithm and heuristicmethods are among the most remarkable of these methods. Genetic algorithm is anoptimization method that generates solutions which evolve by time [1, 2]. Geneticalgorithm is based on evolution and genetics. Heuristic methods yields nearly but notnecessarily optimal solution with reasonable computational effort and time. Heuristicmethods can be categorized as decomposition, inductive, reduction, constructive and1

local search methods [3].In this thesis, a heuristic based trading system is developed using trading rules basedon technical indicators. The system is based on testing the technical indicator basedtrading rules for qualification, selection among these qualified rules and combiningthe selected rules. Genetic algorithm is used in the qualification test of the tradingrules. The selection of the qualified rules are realized using both genetic algorithmand a local search method. A weighted majority voting method is proposed to combine the trading rules. Training data is used in all these phases and the system istested using test data. The experiments are conducted on 2 major currency pairs in 3different time frames and the experimental results are promising which are discussedin detail.The rest of the thesis is composed of seven chapters. Chapter 2 introduces the fundamentals of Forex and technical analysis. Chapter 3 presents the related studies onusing technical indicators to forecast in Forex market. Technical indicators are introduced and the indicators used in the thesis are elaborated in Chapter 4. Chapter 5gives detailed explanation of the trading rules based on technical indicators discussedin Chapter 4. Chapter 6 presents and elaborates on the proposed trading system.Chapter 7 presents the results of the experiments conducted on 2 currencies in 3 timeframes. Chapter 8 gives a summary of the thesis, discusses the results and concludeswith the future directions.2

CHAPTER 2BACKGROUND ON FOREX AND TECHNICAL ANALYSISForex (or FX in short) which stands for Foreign Exchange simply is a financial marketwhere the currencies are exchanged simultaneously between 2 parties [4]. It is thebiggest financial market with a daily transactional volume of more than 5 trillion[5]. Forex is a decentralized market unlike other markets such as stock market. Itsdecentralized structure makes it available to trade in a 24 hours basis which differsfrom the other financial markets [4].2.1Brief History of ForexModern structure of foreign exchange history is rather new compared with old fashioned exchanging currencies. The Forex history starts in 1944 with the acceptanceof Bretton Woods Accord signed by all member countries of all Allied Nations ofWorld War II. The motivation behind this agreement was to create a stable economicand financial system. The agreement brought remarkable changes in the financialsystem: US Dollar became the backbone of the currency trading where it was fixedto gold price and the other currencies fixed to US Dollar. As a result, the US Dollar had the ability to be convertible to all the currencies and gold price, thus becamethe popular currency throughout the world. This agreement stayed in charge since1973. In 1973, the old agreement was officially terminated and the Bretton WoodsII was accepted. The new system was not fixing the US Dollar to the gold and othercurrencies; instead the currency prices can fluctuate freely against each other drivenwith the market forces. Since then, Forex market grew up by time and had its recent3

widespread and enormous structure [6].2.2Participants of Forex MarketForex is the biggest and most widespread financial market in the world therefore ithas plenty of participants. The participants can be grouped as corporations, banks(specially central banks), brokers-dealers, other financial institutions such as hedgefunds, retail brokers and traders such as small non-bank institutions and individuals.The participants may trade in forex market for various reasons: while an individualwants to make money in the short term, a corporation which imports/exports goodsoverseas wants to mitigate the exchange risk [6].2.3Mechanics of Currency Trading and Trading TerminologyForex market has its own characteristics which differ from other markets. First andremarkably, there is no centralized structure that the currencies are exchanged; insteadcurrencies are exchanged directly between two parties (over-the-counter) [6]. Second,Forex is a spot market which deals in the current price where a futures contract dealsin the future price of a financial instrument [4]. Third, exchanging currencies come inpairs: therefore buying a currency means selling the counter currency simultaneously.Finally, a trader may use leverage in his/her trading which increases the risk/rewardof the transaction.2.3.1Traded Currencies in ForexIn Forex market, various currencies are traded (exchanged) in pairs between eachother. The currencies can be grouped in two: Major and exotic currencies. The listof these currencies are given in table 2.1. The currency pairs can be grouped in two:Major currency pairs and cross currency pairs. The list of the most actively tradedcurrency pairs of both groups are given in table 2.2. Among the currency pairs inboth groups, the most actively traded are EUR/USD which is followed by USD/JPY4

and GBP/USD [5]. The EUR/USD exchange rate between 2002 and 2005 is given infigure 2.1.Table 2.1: ISO codes for major and exotic currencies [6](b) Exotic Currencies(a) Major CurrenciesUS dollarEuroJapanese yenBritish poundAustralian dollarSwiss francCanadian dollarHong Kong dollarUSDEURJPYGBPAUDCHFCADHKDPolish zlotyTurkish liraSouth African randBrazilian realDanish kroneNew Taiwan dollarHungarian forintChinese yuan renminbiPLNTLRZARBRLDKKTWDHUFCNYTable 2.2: Most actively traded major and cross currency pairs [7](a) Major currency pairsISO Currency U.S.U.S./JapanUnited Kingdom/U.S.U.S./SwitzerlandLong ss(b) Cross currency pairsISO Currency zone/SwitzerlandEurozone/United KingdomEurozone/JapanUnited Kingdom/JapanLong NameEuro-SwissEuro-SterlingEuro-YenSterling-YenHow To Trade in Forex and Trading TerminologyThere are various participants in Forex market as pointed out in 2.2. Individuals cantrade in Forex market by means of broker firms. After opening an account in a broker,an individual can start to trade in Forex market. Broker firms supply trading softwarewhich allows individual traders to trade online in Forex market.When an individual decides to trade a currency pair using the broker’s software,he/she sees two prices for each currency. The price on the left is called the bid and5

Figure 2.1: EUR/USD Exchange Rate Between 2002-2005 [8]Figure 2.2: EUR/USD Bid and Ask Prices [7]the price on the right is called the ask price. The bid price is the price which youcan sell the base currency whereas the ask price is the price which you can buy thebase currency [7]. The bid and ask prices are illustrated in figure 2.2. The differencebetween the ask and bid prices is called spread. The smallest unit of price in anycurrency pair is called pip. For example in EUR/USD, the value of 1 pip is 0.0001[4]. Some brokers/dealer also use fractional pips called pipette where 1 pip equals 10pipettes [9].After selecting a currency pair for trading, one should place an order to initiate atrade. An order is an instruction to the broker to take a specific transaction [4]. Thereare 3 primary order types: Market order, take-profit order and stop loss order. Amarket order is an order which is executed immediately with the current price. Takeprofit and stop-loss orders are pending orders executed after a specified price level isreached which gains profit and stops loss, respectively [7].In order to start a trade in FX, one should open a position. There are two optionsto open a position: either buying the base currency and selling quote currency (going long) or selling the base currency and buying the quote currency (going short)6

[8]. The base and quote currencies are the first and second currencies in a currencypair, respectively. For example, EUR is the base and USD is the quote currencies inEUR/USD currency pair [4]. After a trade is initiated, it can be closed by makinga counter trade. As an example, if a trader goes long in EUR/USD (buy EUR andsell USD), he/she should sell EUR and buy USD to close the trade. A trader can useleverage in the trading. Leverage is the ratio which allows to trade large amount witha small amount of money [4]. For example, if one trades 1000 with a leverage 1:100in EUR/USD, the amount of trading transaction will be 100000 instead of 1000.The profit/loss of a trading transaction is calculated by subtracting the final valuefrom the initial value of the currency pair. Suppose the trader goes long 100000 inEUR/USD with a buying price of 1.2850 and closes his position with a selling price of1.2870. The difference is 0.0020 which is 20 pips. Because the initial position is longand price increased, the transaction is profitable and the profit is 100000 0.0020 200. Therefore the trader wants the price of the currency pair to increase whenhe/she is long and decrease when he is short in order to get profit.2.4Forecasting Future Prices: Fundamental and Technical AnalysisThere are two main types of analysis used to forecast future prices in Forex and similar financial instruments (such as stock market, gold and valuables market etc.): Fundamental Analysis and Technical Analysis. Fundamental Analysis deals with thecause of market movement [10] by focusing on the macroeconomic factors that affects the prices to move higher or lower. These fundamental factors can be listed asfollows [7]: Economic data reports

In this thesis, a heuristic based trading system on Forex data is developed using pop-ular technical indicators. The system grounds on selecting and combining the trading rules based on indicators using heuristic methods. The selection of the trading rules is realized by using Genetic Algorithm and a local search method. A weighted majority

Related Documents:

heuristic functions and not all of them are useful during the search, we propose a Topology-based Multi-Heuristic A*, which starts as a normal weighted A* [18] but shifts to Multi-Heuristic A* by adding new heuristic functions to escape from local minima. II. R ELATED W ORK There has been active research on path planning for tethered mobile robots.

heuristic relies on familiarity. Based on these results, we created a new theoretical framework that explains decisions attributed to both heuristics based on the underlying memory associated with the choice options. Keywords: recognition heuristic, fluency heuristic, familiarity, recollection, ERPs The study of how people make judgments has .

Strips track, IPP [19], STAN [27], and BLACKBOX [25], were based on these ideas. The fourth planner, HSP [4], was based on the ideas of heuristic search [35,39]. In HSP,the search is assumed to be similar to the search in problems like the 8-Puzzle, the main difference being in the heuristic: while in problems like the 8-Puzzle the heuristic is

A Planning Heuristic Based on Subgoal Ordering and Helpful Value Weisheng Li1, Peng Tu1 and Junqing Liu2 . a subgoal ordering method is first used to guide the heuristic search in a more reasonable way. The idea of helpful value in a goal is then introduced. A more accurate heuristic cost can be achieved by using the helpful value when

A heuristic based planner for high-dimensional state-space planning has a potential drawback of the user having to define good heuristic functions that guide the search. This can become a very tedious task for a system as complex as the humanoid. In this thesis, we address the issue of automatically deriving heuristic functions by learn-

need heuristic reasoning when we construct a strict proof as we need scaffolding when we erect a building. . . . Heuristic reasoning is often based on induction, or on analogy. [pp. 112, 1131 Provisional, merely plausible HEURISTIC REASONING is important in discovering the solution, but you should not take it

Trading system 7: Donchian style breakout Trading system 8: Breakout with EMA confirmation Trading system 9: Trend following with the TEMA Trading system 10: Bull/Bear fear Trading system 11: Simple RSI with equity curve filter Trading system 12: The range indicator (TRI) Trading system 13: Volatility

Electromagnetics and Applications - MIT OpenCourseWare . Preface - ix -