Not the Grail, just a regular one - Bablokos!!! - page 236

 
<br / translate="no">
kot287:

Not 16 is a bit much!

For 4 pairs only 8:

1 ++++ ++-- +++- ++-+

1 +-++ +--- +-+- +--+

the other 8 are a stupid mirror:

2 ---- --++ ---+ --+-

2 -+-- -+++ -+-+ -++-

Correctly understood to build 8 spreads of 4 pairs

1 2 3 4
1 2 -3 -4 -4
1 2 3 -4 2
1 2 -3 4 4
1 -2 3 4 6
1 -2 -3 -4 -8
1 -2 3 -4 -2
1 -2 -3 4 0
1 2 3 4 10

And so lay out 35 combinations of 7 by 4

 
sbmill:

Correctly understand building 8 spreads out of 4 pairs

1234
12-3-4-4
123-42
12-344
1-2346
1-2-3-4-8
1-23-4-2
1-2-340
123410

And so lay out 35 combinations of 7 by 4

No, I meant the theoretical number of variants for a search of directions. In practice it is a little different,from 7 to 4 = 105 and if themathematical methoddoes not depend onan order of setting of input FI- from three: EGAN, EAGN, ENGA it is possible to take any one. The result on all 35!
 
 

Hello all!

Joker, can I ask you a general question?

Do you first select the instruments and use them to build and analyse spread and its equity (I think you used this variant) or do you build a lot of spreads and then analyse their equity, and the fit ones go into work?

 
Talex:

Do you first select an instrument and use it to build and analyse the spread and its equity (I think you are using this option) or do you build lots of spreads and then analyse their equity, and then use the appropriate ones in your work?

What is the difference between these methods?
 
lob32371:
What is the difference between these methods?

In the first case, the spread consists of instruments with "required" conditions, while in the second, this is not checked, but only the "characteristics" of the spread itself are checked.

 
Talex:

Hello all!

Joker, can I ask you a general question?

Do you first select an instrument and use it to build and analyze spread and its equity (I think you used this variant) or do you build a lot of spreads and then analyze their equity, and suitable ones are used in your work?


Numerous spreads are built and the entire set is analyzed. The best ones in the system are used.


A couple of comments to the image:

All spreads after rationing will be placed in one half-plane (positive). Those which are normalized in the negative zone are reversed:

The point at which spreads begin to move is the same for all ( i.e. zero ). No matter how hard you try to get market-neutral spreads, you won't succeed. The market is always moving. Spreads only allow you to remove unpredictable market fluctuations and decrease the drawdown of trade operations.

I - The height of the middle of the normalization channel relative to zero characterizes the power of spread movement (weaker spreads are discarded). We want to earn, not smoke bamboo for months, don't we? ))

II - the width of the normalized spread channel describes the strength of cointegration of the instruments (narrow - strongly cointegrated, wide - poorly cointegrated). Weakly cointegrated ones are naturally rejected (random walks are not for us).

III - decision-making zone (I'm not going to tell you about it intentionally).


I've told and shown you everything possible.

(I have, by the way, promoted the system of Alexander, but I will not use it under any circumstances. He works inside the channel and it is a bomb ... )

Anyone who has theoretical questions, please study first the huge contribution to the theory of Mr. hrenfx, namely his achievements in recycle2


Go for it...

 

Joker, thanks for the reply.

P.S. There really is a lot laid out in the thread, all that's left to do is to think/verify/understand it for yourself, I think only the lazy one won't find something for himself here.

 
kot287:
No, I meant a theoretical quantity of variants for enumeration of directions. In practice it is a little bit different,from 7 to 4 = 105 and if themathematical methoddoes not depend onan order of setting of input FI- from three: EGAN, EAGN, ENGA it is possible to take any one. The result on all 35!

... You gentlemen are at the beginning of the theory. Take the lib:

GetSpreadsCount - returns the number of possible spreads for the spread of a specified length ( number of symbols )

GetSpreadByIndex ( string Symbols, int SpreadLength, int SpreadIndex ) - returns spread by its index ( where index lies in range 1 to GetSpreadsCount )

Going through the GetSpreadByIndex loop you will get all possible spreads without repeats.

So as not to blow your mind, the combinatorics of spreads are calculated through a binary number system.

Good luck...

Files:
 

And I did a brute force one, not as pretty, but it works...

struct smassiv2 {
   string m[];           // обертка для 2-х мерного массива
};

//+----------------------------------------------------------------------------------+
//| GetAllCombinationsSpread                                                         |
//| Функция находит все сочетания спредов                                            |
//| (in) instr[] - массив инструментов из которых составляем спред                   |
//| (in) ns - число инструментов в спреде                                            |
//| (in/out) spread[] - массив спредов                                               |
//| (out) - количество найденных спредов                                             |
//+----------------------------------------------------------------------------------+
int GetAllCombinationsSpread(string &instr[],int ns,smassiv2 &spread[]) {
   int i,j,g,k,ncomb,count,n[];
//+------------------------------------
   count=ArraySize(instr);
   ncomb=Combination(count,ns);
   ArrayResize(spread,ncomb);
   for(i=0;i<ncomb;i++) {
      ArrayResize(spread[i].m,ns);
   }
   ns=ArraySize(spread[0].m);
   ArrayResize(n,ns);
   ArrayInitialize(n,(count-1));
   for(i=1;i<ns;i++) {
      n[i]=n[i-1]-1;
   }
   for(i=0;i<ncomb;i++) {
      if(n[ns-1]<0) {
         k=1;
         for(j=(ns-2);j>=0;j--) {
            n[j]--;
            if(n[j]>=k) {
               for(g=(j+1);g<ns;g++) {
                  n[g]=n[g-1]-1;
               }
               break;
            }
            k++;
         }
      } 
      for(j=0;j<ns;j++) {
         spread[i].m[j]=instr[n[j]];
      }
      n[ns-1]--;
   }
   return(ncomb);
}
//+----------------------------------------------------------------------------------+
//+----------------------------------------------------------------------------------+
//| Combination(int m,int n)                                                         |
//| Функция находит количество сочетаний, составленные из m элементов по n элементов |
//| (in) m - число элементов всего                                                   |
//| (in) n - число элементов в сочетании                                             |
//| (out) - число комбинаций                                                         |
//+----------------------------------------------------------------------------------+
int Combination(int m,int n) {
//Print(__FUNCTION__);
   if(m<n) return(0);
   if((n==0)||(n==m))
      return(1);
   else
      return(Combination(m-1,n-1)+Combination(m-1,n));
}
//+----------------------------------------------------------------------------------+
Reason: