Spread trading in Meta Trader - page 149

 
hrenfx:
... Don't get hung up on finding two FIs. The whole world is doing that. Treasure pores in the search for 'return' patterns that form many FIs at once.
hrenfx, could you please tell me what are "returnable" patterns and how can they be exploited? Could you give a practical example like you demonstrated in your previous posts? :)
 

Imagine that you are trading the Dow Jones index. Such indices are synthetic financial instruments whose prices are formed by the stock exchange according to a certain algorithm. These synthetic financial instruments are a set of real financial instruments with different numbers of each.

You can trade indices or you can trade the set of symbols, making calculation of indices by yourself instead of the stock exchange.

Exchange allows you to trade only several indices, and you can create as many indices as you want with the same principle. Further such an index will be called a portfolio.

Portfolio example:

A portfolio contains +100,000 EURUSD, -200,000 GBPUSD and +500,000 AUDUSD. How do you view the price movements of such a portfolio? Simple:

Buy 100,000 EURUSD, sell 200,000 GBPUSD and buy 500,000 AUDUSD. Now the BP (time series) corresponding Equity (current profit) is the price BP of our portfolio.

What is spread trading (paired trading)?

We construct a portfolio of two financial instruments, with different amounts of each. The financial instruments and the amount of each are selected in such a way that the portfolio price always "fluctuates" around zero - co-integration. Trading such a portfolio is extremely simple. If the price is always near zero, the portfolio should be traded in the channel from its limits, for example from the RMS (Standard Deviation).

To achieve cointegration, they usually take highly correlated financial instruments. The higher the correlation, the better the cointegration (not a numerical measure).

For example, if EURUSD and GBPUSD were always highly correlated, EURGBP would be in a flat all the time. Which could be traded from the border of the channel to the inside. But there is no high stable correlation between EURUSD and GBPUSD. Moreover, there is very poor cointegration. This can be seen in the EURGBP price chart, which has trends.

"Retraceability" is what cointegration is all about.

A common case of paired trading is statistical arbitrage. You must put together a portfolio that has a high price "return".

Such a portfolio does not necessarily have to consist of two financial instruments, it can consist of any number of financial instruments. Moreover, the entering quantity of each financial instrument can be different and vary over time. Such a portfolio is called market-neutral. It is traded exactly as I wrote above.

To create a market-neutral portfolio one should study all available financial instruments for interrelations and analyse their (links') properties.

I have stated it briefly, I can't go into more detail. There is some more information here.

 
Aleksander:

Leonid, try to make a small block of virtual deals in *Ind_2 indicator - so that it counts points, like earned on divergence and convergence...

It would be interesting to see the result in 15 minutes, for 13000 bars for example :) and a histogram of outcomes of each convergence ... to calculate the MM :)


Unfortunately, I am not a professional programmer. And such a task is beyond me.

If I'm not mistaken, something similar was demonstrated somewhere in the middle of this thread.

 
hrenfx:

....... that the price of the portfolio is always "walking" around zero - cointegration. Trading such a portfolio is extremely easy. Since the price always stays around zero, the portfolio should trade inside the channel from its limits, e.g. from the RMS (standard deviation).

In order to get a cointegration, it is more common to take highly correlated financial instruments. The higher the correlation, the better the cointegration (not a numerical measure) ... .

I should add that on the well-known MRCI English website - at

http://www.mrci.com/special/correl.htm in free access there is a useful table of current correlations of practical all traded instruments of the world market! A small part of this "matrix" is shown in the figure below. Correlations of instruments with values equal to or greater than 90% are highlighted in green.

However, the choice of correlated instrument pairs should be based on common sense. For example, we should be very cautious about current high correlation (93%) of December contracts of completely "unrelated" instruments of cotton CTZ10 and silver SIZ10. Perhaps there is some fundamental connection, but I would not risk combining these instruments in a "tandem" for pair trading! Similarly, look at December contracts coffee KCZ10 - American securities TYZ10 - 90% correlation. There is clearly no visible correlation here either and this "tandem" is hardly suitable for arbitrage!

 

A tool that builds such tables and sorts the results in ascending order of QC exists. In doing so, you can set your own CK calculation period and not be tied to the rest.

The issue of adequate treatment of QC readings and methods of analysis is summarised here.

 
leonid553:

I would like to add that the famous English-language MSRI website - at

http://www.mrci.com/special/correl.htm in free access there is a useful table of current correlations of practical all traded instruments of the world market! A small part of this "matrix" is shown in the figure below. Correlations of instruments with values equal or greater than 90% are highlighted in green.

It is not the correlation but the cointegration that is important for statarbitrage. Co-integrated instruments must also be filtered by Kalman and then the constructed spread-process must be checked for stationarity. This table is just for fun.
 
goldtrader:
It is not correlation but cointegration that is important for statarbitrage. Co-integrated instruments need more filtering ....

This is well known and has been repeated here many times.

If you don't mind, you'd better give a concrete example and a graph to illustrate what you are saying.

 
leonid553:

This is well known and has been repeated here many times.

If you don't mind, you'd better give a concrete example and a graph to illustrate what you are saying.

This is a very serious work and an example with a graph would not even fit into an article. The implementation of statarbitrage is described in books of 300-500 pages. Your approach is very simplistic.
 
hrenfx:

... Briefly outlined, I can't go into more detail.


hrenfx, thank you for your attention :)

"A brief outline" is quite enough to understand the process. Although the details and subtleties are room for the inquisitive and seekers to explore on their own, I still can't refrain from addressing another question to you :)

Suppose,

hrenfx:

A
portfolio is made up of several financial instruments with different amounts of each. The number of financial instruments and the number of each are chosen so that the price of the portfolio always "fluctuates" around zero...


How do you think these very "different numbers" of instruments are selected (calculated) and which time series statistics will be determinative?
 
KpucmuHa:
How do you think these very "different quantities" of instruments are selected (calculated) and which time series statistics would be determinative?

The "different number" of instruments is the number of instruments with a non-zero weighting factor in the portfolio.

Initially, all financial instruments in the portfolio are taken. And a search for patterns among them is conducted. As a result, some financial instruments are "discarded" - a zero weighting factor is assigned.

A portfolio is only as good as it retains its "recoverability" properties beyond the interval of its construction.

A primitive view of the construction of such a portfolio was given in one of the works in CodeBase. It completely ignores the properties of options.

From my point of view, it is very damaging to become acquainted with known portfolio theories, because they subconsciously impose the wrong approaches.

Reason: