+7 906 906 18 20 Envelop 5927e2bc4f7195a77dda21f7859ed9d3bf9c3c724f49439b85f191cfc618519c info@megatrader.org
en

Pair CFD trading on Forex

Lots of Forex brokers providing CFDs lets even traders with a small deposit use pair trading strategy. While trading real instruments on a real exchange (like stocks, futures, ETFs) requires many thousands of dollars, on Forex you can pair trade those instruments with a couple hundred of dollars. Here is a real example pair trading CFD contracts using Megatrader.

Pair trading - a market-neutral strategy based on correlation of interdependent securities. The basics are to find pair of instruments with high correlation, one of which has increased or decreased greatly in price relative to the other, after that - buying the undervalued instrument and selling the overvalued one. Thus, a market-neutral position is opened, which does not depend on market’s direction, only on instruments’ movement relative to each other.

For pair trading, one would want to pick instruments from one sector of the economy. They need to be highly correlated (best values from practice are 0.75-0.9) with each other and depend on same factors. For example, if oil prices rise, most oil-producing companies’s stocks will climb higher. However, each of these stocks will rise or fall on their own, some of them more, some less, depending on volatility, current price, trade volume etc.

Here is a real example of CFD pair trading using Corn and Oats contracts.

A few days of accumulating data and we get this chart:

We can buy at red line’s price and sell at green one.

Below is the same chart with increased scale:

There we have two moving averages with period of 7 applied to both Offer(red) and Bid (green) prices (To do this, select the menu item "Chart" - "Add indicator" - "MovingAverage". In “Source” choose "Bid / Offer" - it will be the data source for MA calculation). These average lines are used in trading strategy itself to filter out non-market price spikes (you may see them and think “Hey, that was a HUGE opportunity to profit!”, but in reality they are almost impossible to get into due to slippage). The blue line is the average between Bid and Offer (To do this, select "Chart” - "Add indicator" - "Mean Price"). Almost straight line is a 500 MA.

Next, write a script (an algorithm for MegaTrader to run and trade automatically). Script below does buy/sell spread when both the Offer/Bid and average Offer/Bid (MAs charted) go below/above the blue line by 2.0 or more. Close the position withTakeProfit = 2.2 or StopLoss = 10.0.

Then we should test our new strategy. To do this, first tester parameters are set: testing period, broker commission besides markup (you should input half the roundtrip commission); step (with a large amount of data backtesting can take a long time, so tester can “skip” a little bit to reduce backtesting time), delay, which simulates real market conditions - it should be set to the approximate real time of order executing.

Click "Test", then "Report" tab to see backtesting results:

“Transactions” tab shows all the orders backfilled on historical data:

“Chart” tab shows changes in account balance:

As it can be seen, the strategy is rather profitable even without optimization (out of the box)!

It should be mentioned that now, with almost every broker providing opportunity to trade CFD contracts on stocks, futures or goods, it is pretty much possible to find profitable pair trading opportunities which can be automated using MegaTrader software.