Trading the spread of multiple symbols

Avatar
  • updated
  • Under review

Hi, from my initial research I think it might work very well to define a custom price as

p1 - x * p2

where p1 is the price of e.g. EURUSD

and p2 is the price of EURGBP


Basically, we are trading the spread here.


The main advantage of this approach is that the spread is always reverting. So If situations like covid as in march 2020 occur, the spread reverts because all assets went down.


If you are new to this concept, I can recommend this book: https://b-ok.cc/book/667720/3ffe3a?dsource=recommend

Image 1694


When the EA triggers an order to the custom symbol, there must be some specific logic which implemntes:

Going long of 1 lot with the custom asset, means:

going long of 1 lot of EURUSD and 1.3 short of EURGBP.

Vice versa for closing a position.



Avatar
0
Hannes Waser

I did some more trials and this time I got the custom symbol data to work - at least partially.

- Creating a custom symbol worked after I added spaces into the formula: "GBPCHF - 1.38 * USDCHF" instead of "GBPUSD-1.38*USDCHF"

- The data is available as 1M candles after June. Dont know why I can't run the backtest on older data - even if use the "request" button inside the custom symbol properties...

- When running the backtest the position sizes are always super small. The final equity is not really changing. However I can at least generate some trades and see them on the chart.

Here is the set file I created to obtain the results:

statarb_v0.set

I am afraid I won't be of any further help here tuning the internals of MT5. Andrey, I hope these first insights are of some help for you.

In summary, The spread has much less power runs, which break the martingale EAs. Due to this property, the spread can already be traded with a very simple CP-configuration like the provided above using actually StochasticK + TrendFilter.

I think having the possibility within CP to trade symbol spreads or maybe one day also a symbol "package", would bring us here to a new robustness level where rather larger hedge funds operate.


Avatar
0
Hannes Waser

corrected pdf (less typos and fixed the sign on the position explanation).

Tutorial Spread Trading

Avatar
0
Hannes Waser
Quote from Andrey Khatimlianskyi

How it goes? Have you tried to test on synthetic symbol

all right,  finally found time to do it. With little success.

Here is the spread analyzed within jupyter:

Initial look on USDCHF and GBPCHF

When I however try to import the data to my custom symbol, the importis colored in read but I dont see any error message:

However, when I try to run a backtest on the new SUSDGBP symbol, I always get the error in the journal that the symbol has not data for that period:

Here is the csv file for reference:

spread USDCHF-GBPCHF

Would be great if anyone can provide further insights.


Thanks in advance!


Avatar
0
Andrey Khatimlianskyi
Quote from Hannes Waser

Thanks Andrey, I will try to do so this weekend. Exciting! :)

How it goes? Have you tried to test on synthetic symbol

Avatar
0
Hannes Waser
Quote from Andrey Khatimlianskyi

Hannes, have you tried to generate such symbol in MT5 and to backtest the EA on it?

Thanks Andrey, I will try to do so this weekend. Exciting! :)

Avatar
0
Andrey Khatimlianskyi
  • Under review

Hannes, have you tried to generate such symbol in MT5 and to backtest the EA on it?