Skip to content

Forex Trading

  • by

Mixed integer programming methods for the optimization of Forex trading strategies • Global methods for black-box problems

The Project

Forex derives from the English FOReign EXchange market, and is the market in which currency pairs are traded such as EUR / USD, USD / JPY, and EUR / GBP, … It is the most liquid market in the world, with about 6000 billion dollars a day. The market operates through a global interbank network, covering all global time zones, across four major trading centers (London, New York, Sydney, and Tokyo).

Each transaction on always involves the contextual sale of one currency and the purchase of another. For this reason we speak of “currency pairs”. For example, in the EUR / USD pair, the currency on the left (EUR) is referred to as the primary currency, while the currency on the right (USD) is the secondary currency. For which the euro (EUR) is bought or sold by obtaining a certain amount of secondary currency in exchange, depending on the applicable exchange rate.

Each pair is quoted with two reference rates, for example 1.1530 / 1.1533. The left price is called the “bid” and is the ask price at which you are willing to buy a currency pair. The price on the right is called the “ask” or offer, which is the price at which you want to sell a currency pair. 

The cost of the transaction is given by the spread, i.e. the difference between the ask and bid prices. In the case indicated, a transaction would cost 0.0003, which is commonly referred to as 3 pips (point in price).

A trading strategy consists of a set of rules that allow you to execute transactions on currencies, in order to generate profit. The rules are based on information deduced from the closing prices of the currency on each time bar. The rules thus depend on characteristic parameters (some discrete, others continuous) whose value must be defined to increase performance. Generally the trader assigns the values ​​of these parameters in a heuristic way, based on his own experience.

We propose a FOREX trading strategy optimization technique based on an adjacent training & trading window method: once the optimization strategy is chosen, it is optimized with a mixed /integer optimization method over a time interval of appropriate duration; then you trade on the time window contiguous to the first, using the strategy with the optimal value of the parameters previously determined. After the trading interval, the time window just passed becomes the new trading window, and the cycle repeats. 

The procedure was applied to some simple trading strategies, obtaining a performance improvement between 2% and 5%.


A derivative-free optimization approach for the autotuning of a Forex trading strategy.