Machine learning in trading: theory, models, practice and algo-trading - page 2311

 
Maxim Dmitrievsky:

Then their presence here is strange, since they all learned the Tao a long time ago.

I do not see a strong difference between csos, matstat econometrics and any other metrics))) everything starts with averaging))))
 
Valeriy Yastremskiy:
I do not see a strong difference between csos, matstat econometrics and any other metrics))) everything starts with averaging))))

Then there is no point in swapping the shoe for a shoe

 
Maxim Dmitrievsky:

Then there is no point in swapping the shill for the soap.

There may be a point, but it is random and expensive). In the sense of solving this range of problems is to identify something or to simplify calculations. Decomposition into stationary functions, for the sake of identifying cycles makes sense if these cycles exist.) In nature they definitely exist, and of course in the results of vital activity they are simply obligatory)))). But to compare these stationary functions with the phenomena that generated them... well that's probably not today....

 

Thoughts about 2 ways. 1 - look for the characteristics of the rows on which you can earn. It turned out to be not so easy, you look at the plot where people were able to earn, and the statistics do not show anything.

2 - Fitting the system to the series. The simplest case is multiplication of the original series by +-1 on some condition. If we still cannot detect regularities, why bother, take random parameters as a condition or change the direction of the deal at some time interval. As an example of owls in the trailer.

Files:
RndIn.mq5  3 kb
 
Experiments to normalize the distribution. Two files with euro and 2 with different psc.
Files:
ed1.png  550 kb
ed2.png  515 kb
rnd1.png  564 kb
rnd2.png  481 kb
 
Maxim Dmitrievsky:

Then there's no point in swapping the shoe for a shoe.

Maxim, you seem to have figured out the alglib MGC https://www.mql5.com/ru/forum/36408/page17#comment_9620369

pcabuildbasis(
double[,] x,       // матрица цен инструментов 
int npoints,       // количество цен для каждого инструмента
int nvars,         // количество инструментов
out int info,      // результат операции, любое положительное число - все ок
out double[] s2,   // массив разбросов / дисперсий для всех найденных векторов
out double[,] v)   // массив векторов, каждый вектор и есть искомые весы для выравнивая наборов вокруг нуля 

How to get e.g. 2 columns of principal components from s2 and v.
I assume x has to be multiplied/divided with these coefficients?
Do you have a formula?

The s2 and v arrays seem to be sorted, are the main ones at the beginning or at the end?
Индикаторы: Portfolio Optimizer
Индикаторы: Portfolio Optimizer
  • 2018.12.01
  • www.mql5.com
Portfolio Optimizer: Автор: transcendreamer...
 
elibrarius:

Maxim, you seem to have figured out the Alglib MGC https://www.mql5.com/ru/forum/36408/page17#comment_9620369

How to get e.g. 2 columns of principal components from s2 and v.
I assume that x has to be multiplied/divided with these coefficients?
Is there a formula?

Arrays s2 and v seem to be sorted, are the main ones at the beginning or at the end?

Did pca and lda, but I don't remember anymore, unfortunately it was a long time ago. Didn't get anything useful, so it's forgotten

 

Maybe someone else knows?

Here step 4, there is this code to create component columns, but so far I don't understand how to cycle and (*/+-) repeat this.

_, vecs = np.linalg.eig(covmat)
v = -vecs[:,1])
Xnew = dot(v,Xcentered)
print Xnew

OUT: [ -9.56404107 -9.02021624 -5.52974822 -2.96481262 0.68933859 0.74406645 2.33433492 7.39307974 5.3212742 10.59672425]


dot(X,Y) - Product of Honor (this is how we multiply vectors and matrices in Python)
Как работает метод главных компонент (PCA) на простом примере
Как работает метод главных компонент (PCA) на простом примере
  • habr.com
В этой статье я бы хотел рассказать о том, как именно работает метод анализа главных компонент (PCA – principal component analysis) с точки зрения интуиции, стоящей за ее математическим аппаратом. Максимально просто, но подробно. Математика вообще очень красивая и изящная наука, но порой ее красота скрывается за кучей слоев абстракции. Показать...
 
elibrarius:

Maybe someone else knows?

Here step 4, there is this code to create component columns, but so far I don't understand how to cycle and (*/+-) repeat this.

_, vecs = np.linalg.eig(covmat)
v = -vecs[:,1])
Xnew = dot(v,Xcentered)
print Xnew

OUT: [ -9.56404107 -9.02021624 -5.52974822 -2.96481262 0.68933859 0.74406645 2.33433492 7.39307974 5.3212742 10.59672425]


dot(X,Y) - Product of Honor (this is how we multiply vectors and matrices in Python)

https://gist.github.com/freemancw/2981258

Alglib PCA Example
Alglib PCA Example
  • gist.github.com
Alglib PCA Example. GitHub Gist: instantly share code, notes, and snippets.
 
Seen it. This is not it. It just rewrote the 3x3 matrix into variables. But the new component vectors are not calculated.
The result is to get 6 rows for each component (based on this example).
Reason: