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

 
elibrarius:

I find out how each network works separately. And what to get from their outputs is a matter of taste.)

By the way, looking at the code from your file - there is a different formula, not as in the article, i.e. n

Apparently the author has modified the formula

So maybe not 3 inputs (as in the original formula), but still 8... I don't understand the essence of the new formula yet.


You're reading the wrong article :) here
 

These are different jobs. There is no need to combine them.

into a variable

v0=blah blah blah blah

v1=blah blah blah blah

v2=blah blah blah blah

v3=blah blah blah blah

v4=blah blah blah blah

v5=blah blah blah blah

v6=blah blah blah blah

v7=blah blah blah blah

the values of the inputs are recorded. then the whole thing is fed into the function

double getBinaryClassificator1(double v0, double v1, double v2, double v3, double v4, double v5, double v6, double v7) {

//нормализация данных
   double x0 = 2.0 * (v0 + 1189.0) / 2047.0 - 1.0;
   double x1 = 2.0 * (v1 + 810.0) / 2247.0 - 1.0;
   double x2 = 2.0 * (v2 + 1636.0) / 2155.0 - 1.0;
   double x3 = 2.0 * (v3 + 558.0) / 1252.0 - 1.0;
   double x4 = 2.0 * (v4 + 139.0) / 494.0 - 1.0;
   double x5 = 2.0 * (v5 + 74.97643) / 144.15451 - 1.0;
   double x6 = 2.0 * (v6 + 1026.56016) / 1938.48639 - 1.0;
   double x7 = 2.0 * (v7 + 4167.0) / 7074.0 - 1.0;
   
//полином он же сеть он же ИИ он же ГУРу и т.д. Но данные уже нормализованны.


double decision = 3.162907268170426 * sigmoid(x0)
  -1.0554004772410066 * sigmoid(x1 + x2 + x3)
  + 3.8921930574940347 * sigmoid(x0 + x1 + x4)
  -1.3775531643479957 * sigmoid(x1 + x2 + x3 + x4)
  -0.44704575810784447 * sigmoid(x0 + x5)
  -0.012703915477316044 * sigmoid(x0 + x1 + x5)
  -7.231026668467576 * sigmoid(x2 + x5)
  -0.059339966683175004 * sigmoid(x2 + x4 + x5)
  -2.786314588867378 * sigmoid(x0 + x1 + x2 + x4 + x5)
  + 2.1339726561913768 * sigmoid(x0 + x1 + x6)
  -0.49562529077183975 * sigmoid(x0 + x4 + x6)
  + 5.2147434454399475 * sigmoid(x0 + x3 + x4 + x6)
  -2.890797352663095 * sigmoid(x5 + x6)
  + 0.10933021175693726 * sigmoid(x0 + x5 + x6)
  -1.6844056248405446 * sigmoid(x1 + x2 + x5 + x6)
  -0.18093137034202272 * sigmoid(x1 + x3 + x5 + x6)
  + 0.6607987033451893 * sigmoid(x1 + x7)
  -1.8854921735476415 * sigmoid(x0 + x1 + x3 + x7)
  -1.1169615655906233 * sigmoid(x2 + x5 + x7)
  -0.6844731589452674 * sigmoid(x4 + x6 + x7)
  -0.4231236774571158 * sigmoid(x1 + x2 + x3 + x4 + x6 + x7)
  + 5.763615625891075 * sigmoid(1.0 + x1 + x2 + x3 + x5)
  -0.3138985187519697 * sigmoid(1.0 + x0 + x1 + x4 + x5)
  -1.8910224663455044 * sigmoid(1.0 + x1 + x3 + x4 + x5)
  + 2.1204658352467995 * sigmoid(1.0 + x2 + x3 + x4 + x5)
  + 6.219005597826903 * sigmoid(1.0 + x2 + x3 + x4 + x6)
  -3.740916662914772 * sigmoid(1.0 + x0 + x1 + x3 + x4 + x5 + x6);
   return decision;
}
 

Reshetov:

VS Two-class decision forest & logistic regression:

Well, Reshetov wins by a landslide

Files:
HARD.txt  7 kb
 
Maxim Dmitrievsky:

Reshetov:

VS Two-class decision forest & logistic regression

Well, Reshetov wins this one by a landslide.


If you ran dataset Hard, then the result is not very good - I have 72% of generalization, by the way take the model, which I have already calculated from the HARD.mql file and compare it. And what does it mean to win in the dry, I confess it is difficult to interpret the result.
 
Mihail Marchukajtes:

If you run dataset Hard, then the result I have 72% of generalization, by the way take the model that I uploaded it is already calculated from the HARD.mql file and compare it. And what does it mean victory in the dry, I admit it is difficult to interpret the result.

This is a cutscene, which I have attached. See True positives and True negatives, i.e. the number of successful predictions for buy and sell, R. successfully predicted more, 65% against 45% by other models. I.e. his model would give profit and others would give loss.
 
elibrarius:

I would expand the neuron to 10 inputs...
But we need to add rules to 1024:

r0 = (1 - A) * (1 - B) * (1 - C) * p0
r1 = (1 - A) * (1 - B) * C * p1
r2 = (1 - A) * B * (1 - C) * p2
r3 = (1 - A) * B * C * p3
r4 = A * (1 - B) * (1 - C) * p4
r5 = A * (1 - B) * C * p5
r6 = A * B * (1 - C) * p6
r7 = A * B * C * p7


.....

r1023 =


It's scary :D
Files:
rnn_10.mq5  115 kb
 
Dr. Trader:

It's scary :D

Ahem, ahem.... really does look, i would even say scary.....
 
Dr. Trader:

It's scary :D
I hope it wasn't made by hand? Was it done in cycles? By hand it would have taken more than an hour...
 
elibrarius:
I hope this wasn't manually compiled? Was it somehow in cycles? By hand it would take more than one hour...

I think you can make mistakes by hand...
 
Dr. Trader:

It's scary :D

Scary and a little useless, because in the optimizer will be very long :) in the cloud still can
Reason: