Forex Analysis And Money Management

5m ago
1.32 MB
135 Pages

Forex Analysis and Money ManagementInteractive Qualifying ProjectSubmitted to the Facultyof theWORCESTER POLYTECHNIC INSTITUTEin partial fulfillment of the requirements for theDegree of Bachelor of ScienceSubmitted by:Kimberly MaciejczykXianjing HuAdvisor:Professor Hossein HakimMarch 8, 2012

AbstractIn this paper we cover the technical and fundamental aspects of Forex analysis and thedevelopment of our own money management and risk assessment system. We also show theinner aspects of a money management company including the legal structure, licenses needed,performance measurement and marketing aspects. Finally, we explored possibilities of autotrading and provided documentation for an indicator and an expert adviser developed in MQL4.ii

Table of ContentsAbstract. iiTable of Figures . vii1. Introduction . 11.1 Introduction . 11.2 Project Description. 32. Background . 52.1 Different Markets . 52.2 History of the Forex Market . 82.3 Understanding the Forex Market . 93. Methodology . 113.1 Background Research . 113.2 Fundamental Analysis . 113.3 Technical Analysis . 113.4 Practical Trading in MT4 . 123.5 Learning and Writing MQL4 Indicators and Robots . 123.6 Money / Risk Management . 123.7 Researching the Launch of a Money Management Company . 134. Project Execution . 144.1 Learning to Trade . 144.1.1 Fundamental Analysis . The Gartman Letter . Important Websites . Interest Rates . GDP . Unemployment . Inflation . 204.1.2 Technical Indicators . Forex Support and Resistance Indicators. Fibonacci Indicator . Forex Pivot Point . 24iii Bollinger Bands Indicator. Three Popular Indicators . 200 Day Exponential Moving Average . Stochastic Oscillator . MACD. 314.1.3 Lessons Learned . 344.1.4 Psychology of Trading . 354.2 Implementing our Trading Plan . 364.2.1 Selecting a Platform . 364.2.2 Trading Resources . 374.2.3 Risk Management . 384.3 Trading Summary and Results . 394.3.1 Kimberly‘s Trading Summary and Results . 394.3.2 Xianjing‘s Trading Summary and Results . 394.4 Money / Risk Management . 404.4.1 Account Information: . 404.4.2 Trading Information: . 404.4.3 Trading Time Frame: . 414.4.4 Risk Management . 414.5 Launching a Money Management Company. 424.5.1 Legal Structure . 424.5.2 Off-Shore or On-Shore Accounts . 454.5.2.1 Advantages for Investment Off-Shore . 454.5.2.2 Disadvantages of Off-Shore Investment . 464.5.3 Money Management . 474.5.3.1 General money management options . 474.5.3.2 Money and Risk Management of our Forex Money Management Company . 484.5.4 Licensing. 504.5.4.1 FSB Licensing - Forex Broker License . 504.5.4.4 Series 3 License . 504.5.4.5 Series 65 License . 514.5.4.4 Series 34 License . 51iv

4.5.5 Regulations and Organizations . 514.5.5.1 Commodities Futures Trading Commission – CFTC . 514.5.5.2 National Futures Association – NFA . 524.5.5.3 FAIS Act . 544.5.5.4 FIA Act . 554.5.6 Performance Measurement . 554.5.6.1 Alpha. 564.5.6.2 Beta . 564.5.6.3 R-Squared . 574.5.6.4 Standard Deviation . 574.5.6.5 Sharpe Ratio . 574.5.7 Marketing . 584.5.7.1 Build a Website . 584.5.7.2 Forex Advertising Agency . 594.5.7.3 Reputation and Reviews: Serve the Current Customer Well! . 595. Programming Project . 605.1 The Automation of the Silver Trend Indicator . 605.1.1 Initial Idea . 605.1.2 Implementation and Back Testing . 615.1.3 First Improvement: Adding Trend Condition . 635.1.4 Second Improvement: Adding RSI Condition . 645.1.5 Third Improvement: Stop Trading When Losing Consecutively . 645.1.5.1 Motivation . 645.1.5.2 Hand-Analysis of the Algorithm . 655.1.5.3 Implementation of the Algorithm . 665.1.6 Final Improvement . 665.1.7 Analysis of Silver Trend Indicator Code . 675.2 Spread Indicator . 705.2.1 How to Use It . 705.2.2 Code Analysis and Explanation . 726. Conclusions and Recommendations . 736.1 Conclusions . 73v

6.2 Recommendations for Professor Hakim . 746.3 Recommendations for New Traders . 74Bibliography . 76Appendixes . 85Gartman Letter Reviews . 85Overview of Macroeconomic Issues during the Project . 99Our Trades . 104Kimberly‘s Trades . 104Xianjing‘s Trades . 107Silver Trend Indicator Code . 122Spread Indicator Code. 127vi

Table of FiguresFigure 1. Demonstrating Fibonacci Indicator (September 28, 2011, MT4, EURUSD, M5) . 22Figure 2. Demonstrating Forex Pivot Point Indicator (September 28, 2011, MT4, EURUSD, H1) . 25Figure 3. Demonstrating Bollinger Bands Indicator (September 28, 2011, MT4, EURUSD, H1) . 26Figure 4. EMA Demonstration (September 28, 2011, MT4, EURUSD, H1) . 27Figure 5. EMA Demonstration: Inaccurate Application (September 28, 2011, MT4, EURUSD, H4) . 28Figure 6. Stochastic Indicator Demonstration (September 28, 2011, MT4, EURUSD, M1) . 29Figure 7. MACD Demonstration. 34Figure 8. Silver Trend Robot Backtest Result . 40Figure 9. Silver Trend Auto Trading Program Back Test 1 . 62Figure 10. Silver Trend Auto Trading Program Back Test 2 . 62Figure 11. Consecutive Losses in Back Test . 65Figure 12. Back Test Result With and Without the Consecutive Loss Algorithm . 65vii

1. Introduction1.1 IntroductionIn this paper we cover the technical and fundamental aspects of Forex analysis and thedevelopment of our own money management and risk assessment system. We briefly describe asocial economic system, different markets, and money management principles. We alsoillustrate the inner aspects of a money management company including the legal structure,licenses needed, performance measurement and marketing aspects. Finally, we exploredpossibilities of auto-trading and provided documentation for an indicator and an expert adviserdeveloped in MQL4.We briefly cover social economic systems which make up all the different trader marketswe use today. An economic system is the combination of the various agencies, or entities thatprovide the economic structure that defines a social community. These agencies are joined bylines of trade and exchange along which goods, money etc. are continuously flowing ("EconomicSystem.", 2012). The markets we use today are a specific type of economic system in whichgoods and currency are traded worldwide. The different markets we use trade different thingsbut are all part of the social economic system that structures our economy.We discuss the different markets, what they trade, and their benefits. We discuss thestock market, how it works, and what the purpose of it is. The stock market is used bycompanies to gain start up funding in exchange for a percentage of the company itself andwhatever the company could stand to make. We discuss that the stock market is a low risk andlow reward endeavor that is mostly used for long term investment. The commodities market isused for buying, selling, and trading raw or primary materials. It trades oil, gold, and corn. The

purpose of the commodities market is to allow businesses to plan ahead by setting the price ofcommodities in advance. This means that farmers will know the price their goods will go forwhen they bring them to market. It also means that other businesses, like airlines, will knowhow much gas will cost before they sell tickets to passengers. We also discuss how to trade inthe commodities market, and how it works. We go into further depth with the forex market, asthis was the market we chose to trade in. We discuss how to trade in the forex market, all of thecurrencies that make up the forex market, and how volatile the forex market can be. Weemphasize that this market is very difficult to make a profit in, but can be the most rewarding.We cover the benefits and pitfalls of each market, and why we chose the forex market over theothers.We also researched money and risk management principles and worked out our ownmoney management plan. We modified our plan during the whole process of this project so thatthe plan could become more and more comprehensive and less prone to large risks. We followedour plan while we were trading to test its validity, and made improvements when necessary. Thefinal plan includes the details of account information, trading information, trading time frame,risk management, and rules to follow. The important principles that we have always beenfollowing include, always risk 2% or less of our total account, calculating risk/reward ratiobefore entering a trade, always put a stop loss, etc.During the last term of the project we investigated the details of launching a moneymanagement company. We researched possible legal structure of the company. We had fouroptions. We could structure our company to be a sole-proprietorship, partnership, corporation orLimited Liabilities Company. After comparing the benefits and drawbacks of each we decidedon a Limited Liability Company. We also analyzed the options about whether to start our2

company off-shore or on-shore. Money management is another aspect we looked into. Importantparameters that are related to the money management of the company include accounting,balance sheet, cash flow, financing, managing vision, and crisis/disaster management. We alsolooked at licenses required for starting the company. We mainly researched the FinancialServices Board – (FSB) licensing, Series 3 license, and Series 4 license which are all required forbecoming a financial advisor ("Financial Advisor Is FSB Licensed", 2012). We also investigateddifferent ways of doing performance measurement. Existing parameters include Alpha index,beta coefficient, R-squared, Standard deviation, and Sharpe Ratio. At last, we thought aboutpossible ways of marketing our company. Although there are very strict regulations as to howand if we can advertise a money management company, we still came up with a few ways tomarket our company, including building a website, seeking a forex advertising agency, and mostimportantly, building a good reputation among customers.Another important part of our project is the development of the customized indicators andexpert advisors in MT4 using MQL4. We learned the language from scratch, and at the end ofthe project we completed one indicator and one robot. The spread indicator displays the spread ofa currency pair at the current time in the corner of the chart. The Silver Trend robot uses theSilver Trend indicator to automatically carry out trades that when back-tested, proved to beprofitable. The development process of the indicator and the robot is documented in this report.1.2 Project DescriptionDuring this three-term project we investigated different aspects of forex trading,investment, money and business management. During A term we focused on researching thebackground of forex market, forex terminologies, fundamental and technical analysis and begansimulation trading in MT4. In B term we continued practicing trading using the techniques we3

learned, and we also began learning MQL4 programming to create indicators and robotsourselves. We also sharpened our money and risk management skills. In C term we exploreddifferent aspects of launching our own money management company. This includes theinvestigation of the required licenses, performance measurement, legal structure, marketing, etc.4

2. Background2.1 Different MarketsThe stock market is a market of stock. Stock is divided into shares which are literallysmall shares in the ownership of a company (Ross, 2012). So the stock market is a marketcomprised of companies that want to sell off portions of their company for money. Companiescan sell stock to help cover the start up costs of opening a business. It could also borrow moneywhich is known as ‗debt financing‘ but then the company has to pay back the money withinterest. However, if a company chooses to sell stock there is no interest to pay and norequirement to even pay the money back at all. There is the added benefit that if the companyfails, it isn‘t money out of the company‘s pocket, but out of several thousand other people‘spockets (Ross, 2012). Once someone buys a stock they are entitled to a small fraction of theassets and earnings of that company. The assets of a company include everything the companyowns including buildings equipment and trademarks (Ross, 2012). Earnings are all of the moneythe company brings in from selling its products and services (Ross, 2012). So when someoneinvests in a company and the profits of that company rise, the stock goes up and the buyer of thestock makes a profit. The stock market is a very long term investment, with a small profitmargin. However, a small profit margin means that there is less risk. While it is possible to loseall your money in the stock market, it is significantly less likely than other forms of investment,such as the Forex market.There are other forms of investing as well. The commodities market is a virtualmarketplace for buying, selling, and trading raw or primary products ("Commodity Market",2012). This means the commodities market sells anything from corn to oil to gold. The purpose5

of the commodities market is so that farmers and other businesses can know the price of acommodity beforehand so they can plan ahead. For farmers, they need to know what their goodswill sell for before they are produced as they need to take out money to produce that product.Airlines likewise need to know the price of oil ahead of time so they can set the rates for flights.There are many ways to invest in commodities. An investor can purchase stock in corporationswhose business relies on commodities prices, or purchase mutual funds, index funds orexchange-traded funds (ETFs) that have a focus on commodities-related companies("Commodity Market", 2012). The most direct way of investing in commodities is by buyinginto a futures contract. Mutual funds are an investment vehicle that is made up of a pool of fundscollected from many investors for the purpose of investing in securities such as stocks, bonds,money market instruments and similar assets ("Mutual Fund", 2012). Index funds are a type ofmutual fund with a portfolio constructed to match or track the components of a market index,such as the Standard & Poor's 500 Index (S&P 500). An index mutual fund is said to providebroad market exposure, low operating expenses and low portfolio turnover ("Index Fund", 2012).ETFs are a security that tracks an index, a commodity or a basket of assets like an index fund,but trades like a stock on an exchange. ETFs experience price changes throughout the day asthey are bought and sold ("Exchange-Traded Fund - ETF", 2012). Futures are a financialcontract obligating the buyer to purchase an asset and the seller to sell an asset, such as aphysical commodity, at a predetermined future date and price. Futures contracts detail the qualityand quantity of the underlying asset; they are standardized to facilitate trading on a futuresexchange. Some futures contracts may call for physical delivery of the asset, while others aresettled in cash. The futures markets are characterized by the ability to use very high leveragerelative to stock markets ("Futures" 2012). Futures can be used either to hedge or to speculate on6

the price movement of the underlying asset. For example, a producer of corn could use futures tolock in a certain price and reduce risk (hedge). On the other hand, anybody could speculate onthe price movement of corn by going long or short using futures ("Futures" 2012). Futures arenot as reliable as stock but some feel it is easier to predict the movement of commodities asopposed to businesses.The forex market is the most volatile of all the markets. Forex is an abbreviation offoreign exchange, so the forex market is actually the foreign exchange market. It is the market inwhich participants are able to buy, sell, exchange and speculate on currencies. The forexmarkets is made up of banks, commercial companies, central banks, investment managementfirms, hedge funds, and retail forex brokers and investors. The currency market is considered tobe the largest financial market in the world, processing trillions of dollars worth of transactionseach day ("Forex Market", 2012). This market is vitally important to any economy as it providesthe liquidity to process transactions and support currencies. This means that the thousands orpossibly millions of investors in the forex market are providing an invaluable service by allowingeconomies to function. The foreign exchange market isn't dominated by a single marketexchange, but involves a global network of computers and brokers from around theworld. Central banks use their massive buying and selling capabilities to alter exchange ratesthrough their open market activities and in many cases will do so not with profit in mind, butrather for any number of policy reasons. Forex brokers act as market makers as well, and maypost bid and ask prices for a currency pair that differs from the most competitive bid in themarket ("Forex Market", 2012).7

2.2 History of the Forex MarketThe foreign exchange market has existed as long as currencies have. In 1875 the birth ofthe gold standard monetary came, with it came currencies. Prior to 1875, countries primarilyused gold and silver as a form of international payment. Payment using gold and silver werehampered by their depreciation according to external factors such as an increase in the discoveryof new deposits, which would lead to a change in supply and demand. This factor would changethe Forex trading history forever ("Forex History", 2012). The aim was to standardize theamount of gold that was allotted to a currency. Currency was now backed by gold, measured inounces. Countries needed large gold reserves to back the demand for currency. The pricedifference of an ounce of gold between two different currencies now became the foreignexchange rate for those two currencies. This History of Forex was changed by the birth of aninternational standard by which foreign exchange could take place between countries ("ForexHistory", 2012).The gold standard monetary broke down during the start of the First World War politicalturmoil with Germany forced the larger European powe