The Forex Market in Practice: A Computing Approach for Automated Trading Strategies
4 stars based on
June 11, ; Accepted Date: July 10, ; Published Date: Int J Econ and Manage Sci 3: This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Prediction of various market indicators is an important issue in finance. This can be accomplished through computer models and related applications. It turned out that artificial models have both great advantages and some limitations for learning the data patterns and predicting future values of the financial phenomenon under analysis.
In this paper we analyze the particular financial market called Forex and the way computing models are used to automate trading strategies by making affordable predictions on the evolution of exchange rates between currencies. The Foreign Currency Exchange Market Forex, FX, or currency market is a decentralized financial exchange market, distributed worldwide and deregulated, for trading spot currencies. It is open from The exchange rates [ 2 ] are all included in a table with three columns Figure 1: This table is updated about each second.
The time base of the Forex is in fact the tick, which usually corresponds to a second; but in case of crowding of trading, for which brokers are unable to synchronize quickly between them, this time interval is lengthened [ 3 ].
The major currencies are USD U. A typical operation on these cross-currencies can be made for purchase or sale regardless of the base currency of the trading account. So it is important to have in mind from the outset that in Forex you can work at any time, provided you know what do. This is to emphasize the basic difference compared to the best known stock market financial field where you can sell only after buying and you can plan a successful transition only if a stock can be bought cheaply and then resold after its value has increased.
Transactions has no minimum or maximum duration. The minimum duration for certain revaluations is fixed for example by some brokers to 3 minutes. There is no official exchange rate, also because it would be impossible to have it synchronized in an identical manner in all parts of the world over a period of one second. So this table is in principle and by contract free to vary tick by tick for each broker, although the variations from broker to broker are very small. They are mostly national banks and large private banks.
The interbank market is deregulated and decentralized and is the core level of Forex. Such platforms are the two major competitors in this sector and together realize a circuit of about a thousand of banks.
You can make an analogy between the Internet and Forex. The Internet has no central core, although it finds its cultural and technology base in the U. Like the Internet, which is not the only way to exchange data and information but has had the upper hand on proprietary protocols, there are several trading markets alternative to Forex, although not very widespread.
Trade is an essential activity in social and productive life and has existed since man was able to find an alternative to bartering. But the introduction of technological means of money, through its expression in coin or currency has obviously led to other problems, such as the need of exchange between currencies.
The same coins or currency are the subject of considerable trade. And so was born the finance. In the modern world, the birth of the currency market is identified with the definition of the Gold Exchange Standard in In fact, there have been several such standards over millennia, including those of bimetallic type silver and gold. They have been repeatedly taken up and abandoned according to the looming liquidity needs, in particular at economic cycles and war, but the agreement began in the late 19th century is one that has started to actually put a little order among the various modes of exchange between the currencies and coins of modern countries.
After the two Great World Wars, the new stability has idealized the possibility of creating a strong agreement between the convertibility of currencies and gold held.
According to such agreements a U. Within a few years, however, this system proved too hard to meet U. So goes the value quoted. From day to day. Every second, from tick to tick. It is very important to consider that the very next year, inProfessor Tobin at Princeton University in his memorable reading notes that the vast majority of money flows across borders of different countries are not related to the purchase of goods, but to pure speculation.
These large capital movements cause large fluctuations in exchange rates, for which the value of a currency, or the wealth of a nation, is no more tied to its ability to produce quality and quantity of goods. Tobin also considers that such speculation is profitable even for very small percentage of profit, which assumes that a slight tax on financial transactions does not penalize trade, which normally has a much greater percentage of profit, but only financial transactions.
In fact, the foreign exchange market exists and the technology has other solutions and other problems [ 4 ]. In particular, in started marketing to great audience of the first desktop personal computer by IBM and modem to connect to computer networks via the telephone line from the company Hayes. In this way anyone from any part of the modern world can technically have instant access not only to data conversion, but also can operate in buying and selling. Sinceversion 4 of the transaction software Meta-trader established a standard also as regards the programmability in an automatic way by the end user.
The actual exchange values between international currencies are determined by national central banks in compliance with the various agreements made from time to time at meetings of representatives of major international economies G8, G10, etc. Consequently, the Forex periodically aligns with the above said actual trading values. It also allowed the fluctuation of exchange rates, used for devalue the dollar and stem the gold needed until then for the expenses related primarily to the conflict between the U.
The institutions created at Bretton Woods survived the fall of the gold standard, while reviewing their objectives. From the assumptions made, it appears that in the first Forex moves a high amount of money. The amount of money exchanged in a single day in the Forex 3, billion dollars in is equivalent to twice the GDP of a full year of an economic power like Italy or Canada, or equal to twenty times the volume of trade the daily NYSE New York Stock Exchange. Another aspect of Forex that at first glance may not have been considered by the reader is that the Forex trading regards immediate liquid assets, i.
In theory even basic commodities such as gold or oil have a so immediate convertibility. The Forex is then shown as the market closest to the ideal of perfect competition inasmuch the big movements at stake make impossible its manipulation by any entity or large national bank, nor is it equally easy to anticipate the trends in the basis of undisclosed information insider trading.
You can access Forex by opening an account from a broker. This operation is typically done online and you have to present a special documentation which must match the collection and withdrawal banking data in compliance with anti-money laundering regulations. Less evolved brokers present exchange rates with an accuracy of 4 decimal places, while it is now standard to operate with 5-digit rates.
This numbering as regards cross currency with the Yen becomes respectively of 2 and 3 decimal places. Many automated trading programs, while working on the platform of common terminal, can not take into account this difference and should be adapted to the specific broker. Pip is still of 4 digits for the official conversion rates. Operating on an ECN account can cause malfunctions to automatic programs that does not allow for this.
As part of the Forex brokers offer investors an instrument called leverage or margin. This lever amplifies further the volatility and liquidity features of the Forex allowing small amounts to have consistent results in a very short time [ 8 ]. Forex can be approached for various degrees of risk attitude. Many brokers offer different types of account. Accounts dedicated to customers who want little risk or are just beginners allow mini or micro lots, but they can hide operating limits such as maximum number of lots open, or a limit on the volume of each transaction.
It should be noted that the cash actually available in a given instant corresponds to Equity and not to the recorded Balance.
Clearly we are confident that the market will be benevolent and that this position will turn in our favor by making a profit. It corresponds to the Equivalent less the Margin which corresponds to the amount of committed capital for ongoing operations including results of current open operations and represents the cash available for opening new positions. Normally, a pip is one ten-thousandth of an exchange rate.
Such a fluctuation in the ordinary moments takes a few hours. In times of maximum turbulence fluctuations can also have hundreds of pips in a few minutes. In fact, the broker charges a fork between the buy and sell rates, the so-called spread, expressed in pips. In some cases it also adds a swap cost if the operation lasts more than 24 hours and is renewed at The swap is an interest cost, and is related to the need for the broker to make the rollover, i.
This is done to prevent the physical transfer of paper money corresponding to the currencies bought or sold, but the Inland Revenue in Italy considers this loophole of no value, thus considering taxable the Forex operations. Note that the example shown expresses a genuine opportunity to multiply by 10 a fraction of the capital over a few hours.
Obviously it can also happen in reverse, i. In certain situations you can have more liquidity than prepaid. It is generally known that in the Forex there are no commissions. In fact, brokers are appearing that offer even spread of 0. Many brokers offer included with the account, under certain conditions at very low cost or even free of chargethe VPS Virtual Private Server service that allows users to access the terminal program via a remote protocol, i.
After selecting a broker and opening an account, it is important to know the operating interface of the program and control its functions. The information previously provided allows you to correctly interpret the pane that shows the accounting data, and the one presenting the tick-to-tick performance of cross-currency conversion rates. For each time interval are reported in a very intuitive way the values:.
Normally we use H1 charts, but also M30 and M On the chart it is possible to draw indicators Figure 7 or mathematical formulas that represent an interpretation of the past exchange rate for the foreseeable future and suggest whether it is appropriate to buy rather than sell depending on the intersection between the current signal and the indicator. The Stop Loss is the value of the exchange rate at which you consider the order should be terminated automatically by the broker.
Normally the closure should be performed manually, or should be made by automatic trading program. But it is always a good practice to define a value of Stop Loss, as for example an Internet connection could be no longer available at a market turbulence and a single operation could drain the entire value of the account if no longer monitored. It is always a good standard to define also the Take Profit from the outset, as it is very important to know at what point to consider sufficient the fluctuation in our favor.
Too low a value corresponds to a loss of income, a too high value may actually correspond to a loss as if it is not reached, the value could reverse direction. As we anticipated, with ECN type broker it is necessary to define these two values after the opening. One should not forget that Forex is a real market, so for example to the opening of a selling order the broker matches one or more purchase orders. It is true that automation and sophistication of computer tools show it as a form of gambling, but in fact an order must be drawn from the underlying platform, and this may take some time.
It is thus in this way that the Slippage should be defined, that is the acceptable deviation in pips between we place the order and the listing of the cross when the order is executed. The Magic Number is instead a unique number arbitrarily chosen by the programmer to identify the order made by the program itself, as it should operate alternately on manual orders or on orders from other programs.