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

 
Maxim Dmitrievsky:

I do not understand what it is at all, in wikipedia is so written that without a cryptograph you can not understand. Multidimensional distributions, and how to build them is not clear, if only the code in python unscramble

And to hell with them. Just a picture of the backtest is beautiful, compared with cointegration

here's a prufhttps://www.quantconnect.com/tutorials/strategy-library/pairs-trading-copula-vs-cointegration

Copula is a function of joint density of distribution, of several random variables. Conceptually it's simple enough mathematical structure, to understand it take for example two random processes and build 2D chart of probability dependence of one from another, get a field of points, if processes are independent will be uniform square field, but if dependents then will be different patterns, compaction of points in some places and rarefaction in other, here local density of points and is copula, it shows dependence, linear or non-linear.

 
Igor Makanu:

imho, you need to understand the difference between prediction and real life, the task of the trading system is to make a prediction, the task of risk and money management is to ensure the viability of the system

and what are the copulas or homunculi, how was the TS obtained or with the help of MO or with the help of the optimizer.... - it's a prediction, but it can't control the real situation - the price

I'm not against of copulas, in fact I'm even for them, thanks to Max for reminding about them, maybe they may be adapted to risk management and forecasting with the help of MO.

 

typedef struct

{

double dist;

double* vector;

} distvect;


int distvectcomp(distvect *v1, distvect *v2)

{

if (v1->dist == v2->dist) return 0;

double sub = v1->dist - v2->dist;

return sub / fabs(sub);

}


double* parsen(dataset inputs, dataset outputs, int k, double kernel(double), double vector[])

{

distvect* dvarr = malloc(inputs.length * sizeof(distvect));


for (int i = 0; i < inputs.length; ++i)

{

double dist = 0;

for (int j = 0; j < inputs.dimentions; ++j) dist += pow(vector[j] - inputs.data[i][j], 2);

distvect dv = { dist, outputs.data[i] };

dvarr[i] = dv;

}

qsort(dvarr, inputs.length, sizeof(distvect), distvectcomp);


double *res = calloc(outputs.dimentions, sizeof(double));

double W = 0;


for (int i = 0; i < k; ++i)

{

if (dvarr[i].dist == 0) continue;

double w = kernel(dvarr[i].dist);

W += w;

for (int d = 0; d < outputs.dimentions; ++d)

res[d] += dvarr[i].vector[d] * w;

}


for (int d = 0; d < outputs.dimentions; ++d) res[d] /= W;


free(dvarr);

return res;


}

The "quasi-optimal" MO algorithm is considered to be
 
What do you mean? What kind of SVM wisp is it?
 
Maxim Dmitrievsky:
What do you mean? What kind of SVM wisp is it?

No, what kind of svm is this "Parzen window", kernel smoothing, and"quasi-optimal" in the sense that almost perfect (Mitchell had it somewhere), but only very slow, each iteration - sorting the entire dataset to a new point and convolution with the kernel

 

I do not understand why there are no algorithms for building a tree that would take into account the uniformity of signal distribution over the entire sample when building the tree?

Can we implement it somehow, because it is critically important for trading.

I estimate leaves with this distribution in mind, but if the tree were built with it in mind, there would be much more effective leaves/trees.
 
Aleksey Vyazmikin:
I will not claim, but I do not exclude that you torture the trees with pruning for nothing.
This is so, from general considerations and personal experience.
 
Aleksey Vyazmikin:

I do not understand why there are no algorithms for building a tree that would take into account the uniformity of signal distribution over the entire sample when building a tree?

Maybe we can realize it, because it is critically important for trading.

I estimate leaves with this distribution in mind, but if the tree were built with it in mind, there would be much more effective leaves/trees.
There, before each division, the data is sorted by fiche (which shuffles them by time), divided (by the middle or by quartiles), error reduction remembered, repeated for all fiches. The best division becomes a node.

Suggest a better algorithm.

 
Yuriy Asaulenko:
I will not claim, but I do not exclude that you torture trees with pruning for nothing.
This is so, from general considerations and personal experience.

In my youth I thought bonsai was a mockery of nature, but when I became a parent - I realized the depth of the idea.

 
elibrarius:
There before each division, the data is sorted by fiche (which shuffles them by time), divided (by the middle or by quartiles), error reduction remembered, repeated for all fiches. The best division becomes a node.

Suggest a better algorithm.

So we need to give an estimate at the moment of sorting the predictors and their values and not take those predictors with values (ranges) that are very crowded, but give preference to those that are distributed over the whole sample.

I.e., we need to estimate the frequency of repetition of the split over the sample, not just its absolute repeatability.
Reason: