Foreign Currency Exchange is concerned with the exchange rates of foreign currencies compared to one another. These rates provide significant data necessary for currency trading in the international monetary markets. This project shows an evolutionary algorithm application to generate profitable strategies to trade future contracts on foreign exchange market (FOREX). The modeled strategy is based on two decision trees, responsible for taking decisions of opening long and short positions on any currency pair. This strategy use technical indicators, which are connected by logic operators to identify border values in making profitable decision(s). 20 trades were taken from 9 different currency pairs between October 17 and December 4, 2017. The results show that 15 out of the 20 trades representing 75% are profitable, while 5 representing 25% are not profitable.

Keyword: Foreign exchange, prediction, decision tree



The foreign exchange market, called FOREX (FX) or the currency market, is a decentralized market where currencies are traded. This includes all aspects of buying, selling and exchanging currencies at current or determined prices. In terms of trading volume, it is by far the largest market in the world, followed by the Credit market (Record N.,2014)

The main participants in this market are the larger international banks. Financial centers around the world function as anchors of trading between a wide range of multiple types of buyers and sellers around the clock, with the exception of weekends.

The foreign exchange market works through financial institutions, and operates on several levels. Behind the scenes, banks turn to a smaller number of financial firms known as “dealers”, who are involved in large quantities of foreign exchange trading. Most foreign exchange dealers are banks, so this behind-the- scenes market is sometimes called the “interbank market” (although a few insurance companies and other kinds of financial firms are involved). Trades between foreign exchange dealers can be very large, involving hundreds of millions of dollars. Because of the sovereignty issue when involving two currencies, FOREX has little (if any) supervisory entity regulating its actions.

The foreign exchange market assists international trade and investments by enabling currency conversion. For example, it permits a business in the United States to import goods from European Union member states, especially Eurozone members, and pay Euros, even though its income is in United States dollars. It also supports direct speculation and evaluation relative to the value of currencies and the carry trade speculation, based on the differential interest rate between two currencies (Heiner Flassbeck and Massimiliano La Marca, 2007). The mere pursuit of profit through financial speculation is a bad activity in the moral context even if made within legal limits that are different in each country.

Financial forecasting is truly a challenging task and remains a very active research area. Many researchers have proposed many methodologies in helping prospective traders analyze market situation with a view of making trading decision. Despite these, greater percentage of both new traders and experience traders sometimes run into loss.

Many algorithms were designed for effective prediction and profit making. Most of these algorithms are only suitable on paper but failed during implementation. In this thesis, we want to use machine learning and decision tree algorithm in particular for effective FOREX market movement prediction.

Decision tree learning uses a decision tree (as a predictive model) to go from observations about an item (represented in the branches) to conclusions about the item’s target value (represented in the leaves). It is one of the predictive modeling approaches used in statistics, data mining and machine learning. Tree models where the target variable can take a discrete set of values are called classification trees; in these tree structures, leaves represent class labels and branches represent conjunctions of features that lead to those class labels. Decision trees where the target variable can take continuous values (typically real numbers) are called regression trees (Rokach, Lior; Maimon, O., 2008).

Decision tree is a type of supervised learning algorithm (having a pre-defined target variable) that is mostly used in classification problems. It works for both categorical and continuous input and output variables. In this technique, we split the population or sample into two or more homogeneous sets (or sub- populations) based on most significant splitter / differentiator in input variables.

Tree based learning algorithms are considered to be one of the best and mostly used supervised learning methods. Tree based methods empower predictive models with high accuracy, stability and ease of interpretation.


FOREX market is the largest and most accessible financial market in the world, but although there are many FOREX investors, few are truly successful ones. Many traders fail for the same reasons that investors fail in other asset classes. In addition, the extreme amount of leverage – the use of borrowed capital to increase the potential return of investments – provided by the market, and the relatively small amounts of margin required when trading currencies, deny traders the opportunity to make numerous low-risk mistakes. Factors specific to trading currencies can cause some traders to expect greater investment returns than the market can consistently offer, or to take more risk than they would when trading in other markets (Investorpedia, 2017).


The economics of supply and demand largely determine the exchange rate fluctuations. Calculating the supply and demand curves to determine the exchange rate has shown to be unfeasible (Alamili, M., 2011). Therefore, one needs to rely on various forecasting methods. The traditional linear forecasting methods suffer from their linear nature, since empirical evidence has demonstrated the existence of nonlinearities in exchange rates. In addition, the usefulness of the parametric and nonparametric, nonlinear models, has shown to be restricted (Mohamad Alamili, 2011).


For these reasons, the use of computational intelligence in predicting the foreign exchange rate is investigated, in which these previously mentioned limitations may be overcome. The method used here is decision tree machine learning algorithm.



The main aim of the research work is to develop and implement a Foreign Exchange forecasting tool using machine learning.

The specific objectives of the study are:

  1. To develop a FOREX Advisor tools that guides FOREX traders in trading decision
  2. To evaluate the efficacy of the FOREX Advisor tools developed



This research work was carried out using Machine Learning method with emphasis on decision tree Algorithm. A review of available literature in the area of machine learning for currency forecasting was carried out.


This research work designed a tool that will take trades on its own without traders spending time in analyzing the market condition.