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

 
Maxim Dmitrievsky #:
There is a constant substitution of concepts, it is impossible to communicate.

.

 
Maxim Dmitrievsky #:

re-read it and find where I said that, if you're gonna say that.

or stop talking rubbish.

first you brought in the wrong approximation, about which there was no discussion at all. then you said that optimisation is not the point, while Sanych was talking about extrema, which I commented on.
All right, enough, let's stop here.
 
Maxim Dmitrievsky #:
I also noticed that there should be few signs, then all sorts of kozul inferences are counted normally. Otherwise algorithms get confused in their readings.

Can you show an example where you managed to establish any causal relationship on the quote data?

In general, I was saying that if there is no effect of influence (it is impossible to detect it in development), which changes the probabilistic outcome of predictors, it is not clear what the point of this approach is.

Maxim Dmitrievsky #:
In general, how many indicators should be in the TS for it to work properly. Obviously not 100 or 500. Usually it is 2-3, well 10 at most.

Here I found an indicator that correlated with 270 other indicators by more than 0.7.

The point is not the number of indicators in training, but what information can be obtained from them and how much it will be statistically significant and stable.

 
Andrey Dik #:

First you brought in the wrong approximation, about which there was no discussion at all. then you said that optimisation was not the point, while Sanych was talking about extrema, which I commented on.
All right, enough, let's stop here.

Sanych said that there are no extremes there, and he was right. But he still didn't understand what I wrote originally.

You were the one who brought up optimisation, which was not discussed. The reply was that it was the case of approximation, not optimisation, that was being considered.

Finita la comedy.

 

there is a function that checks a rule by identifier

n - identifier (rule number)

x - data


here is a simple layout of the function

rule <- function(n,x){
  
  res <- NULL
  
  if(n==1)  res <- x[1] < x[5] 
  if(n==2)  res <- x[2] >= x[1]
  if(n==3)  res <- x[4] == x[5]
  if(n==4)  res <- x[1] != x[5]
  if(n==5)  res <- x[2] >= x[1]
  if(n==6)  res <- x[4] =< x[5]
  if(n==7)  res <- x[1] < x[5]
  if(n==8)  res <- x[2] >= x[1]
  if(n==9)  res <- x[4] <= x[5]
  if(n==10) res <- x[4] > x[5]

  return(res)
}

The question is whether this function will be effective if there are a million such strings.

 if(n==... )  res <- x...

there will be a million of them.

If not, how would you implement it?

 
mytarmailS #:

there is a function that checks the rule by identifier

n - identifier (rule number)

x - data


here is a simple function layout

The question is whether this function will be effective if there are such strings

there are a million of them.

If not, how would you implement it?

Use switch

 
Aleksey Vyazmikin #:

Use the switch

You can also, theoretically, use an array of functions.
 
Aleksey Vyazmikin #:

Use the switch

like that?

bool rule(int n, NumericVector x) {
  bool res = false;
  switch(n) {
    case 1: res = x[0] < x[4]; break;
    case 2: res = x[1] >= x[0]; break;
    case 3: res = x[3] == x[4]; break;
    case 4: res = x[0] != x[4]; break;
    case 5: res = x[1] >= x[0]; break;
    case 6: res = x[3] <= x[4]; break;
    case 7: res = x[0] < x[4]; break;
    case 8: res = x[1] >= x[0]; break;
    case 9: res = x[3] <= x[4]; break;
    case 10: res = x[3] > x[4]; break;
    default: stop("Invalid rule number");
  }
  return(res);
}


and it will actually be able to handle a million conditions?

 
mytarmailS #:

like that?

I don't know the syntax of R - just checked that there is such a possibility there too. Otherwise - yes it looks like it.

mytarmailS #:

and it can actually handle a million conditions?

I used about 500 thousand in MQL5. Works much faster than IF.

 
mytarmailS #:

like that?


and can it really handle a million conditions?

Judging by the type of x it is Rcpp. In C++ you can make arrays of pointers to functions and there will be an immediate call of the necessary function by index, but with the switch it seems to be a sequential search from the beginning to the necessary variant. Of course, the problem of generating the code of all these functions remains and it is not clear how it will work with Rcpp.

About pointers to functions and their arrays in C++.

C++ | Указатели на функции
  • metanit.com
Указатели на функции в языке программирования C++, определение и использование, массив указателей на функции
Reason: