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

 
Yuriy Asaulenko:

You are absolutely right, when working with motions everything is drastically simplified - there is nothing to "code". Moreover, we don't even have to be "clad with indicators", we can see where the movement is going without them.) Everything is even simpler than you think.) A weather vane on a mast or even a finger held up is enough for us to know where the wind is blowing from. And how long it will last and how strong it will be is up to the wind.) We can enter the market at any time and we don't need to wait for any lines, levels, etc., we only need the "wind".

Recognition of the market as a random process saves us from any assumptions about the action of "higher forces" controlling the market, from any attempts to predict anything, from a search for certain predictors, which (due to the inability to find them ourselves) we entrust to the ME, and other unnecessary hypotheses. Even if "higher powers" exist, their actions will still remain largely unpredictable to us, that is, random. None of this matters to us now).

Are you a sadomasochist by any chance? Why make such a mockery of yourself. And the ederal sense (our speculations about where things will go) is impossible to algorithmize. And about the causes, we tend to learn and understand post-primary, after the consequence comes. Nobody cancelled the principle - do not involve unnecessary hypotheses. And in all hypotheses about "higher forces", controlling the market, and attempts of interpretation of their actions, it is exactly it is broken.

You're not a Cossack from some $2k kitchen, are you? Or maybe you're in the wrong branch?

The only thing that can give the "Recognition of the market as a random process" is to completely abandon the motive of independent trading, then either forget about the market at all or do something about it, for example open your own brokerage company.

In this case the question is not whether there are any regularities in the market, they are in the very nature of the market, and it is not even a question of "common sense is impossible to algorithmize", as it is possible, the question is how to algorithmize is much better than common sense, as common sense is no competitor to bots of large financial institutions.

 
Gianni:

Aren't you a Cossack from some $2k kitchen? Or maybe you have the wrong branch?

The only thing that can give "recognition of the market as a random process" is to completely give up the motive of independent trading, then either to forget about the market at all or to deal with the market, for example to open your own brokerage company.

In this case the question is not whether there are any regularities in the market, they are in the very nature of the market and not even that "common sense is impossible to algorithmize", as is possible, the question is how to algorithmize is much better than common sense, as common sense is not a competitor to the bots of large financial institutions.

Joining

 
I ask the masters to post the results of solving this mathematical problem with their own mathematical packages

Forum on trading, automated trading systems and trading strategies testing

MetaTrader 5 Strategy Tester!

Andrey Dik, 2016.11.21 16:38

Task:

#property library
#property strict

int  countRuns    = 0;

//+------------------------------------------------------------------+
int GetParamCount () export
{
  textLen = StringLen(Code);
  return (textLen);
}
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
void GetParamProperties (double &min, double &max, double &step) export
{
  min = 0.0;
  max = 40.0;
  step = 1.0;
}
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
double FF (double &param []) export
{
  countRuns++;
  
  int sizeArray = ArraySize (param);
  if(sizeArray != textLen)
    return (0.0);
  
  int ffVolue = 0;
  
  for (int i=0; i< textLen; i++)
  {
    if(GetCode(param [i]) == StringSubstr(Code, i, 1))
      ffVolue++;
  }
    
  return (double(ffVolue));
}
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
int GetCountRunsFF () export
{
  return (countRuns);
}
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
void PrintCodeToFile (double &param []) export
{
  int sizeArray = ArraySize (param);
  if(sizeArray != textLen)
  {
    Print ("Неверное количество параметров, печать в файл производится не будет!");
    return;
  }
  
  string code = "";
  
  for(int i=0; i<textLen; i++)
  {
    code+=GetCode (param[i]);
  }
  
  int handle = FileOpen ("decodeFF.csv", FILE_READ|FILE_WRITE|FILE_ANSI|FILE_CSV);
  
  if(handle==INVALID_HANDLE)
  {
    Print ("Ошибка записи в файл востановленного текста ФФ. Ошибка: "+ (string)GetLastError());
    return;
  }
  FileWriteString(handle, code);
  FileClose (handle);
}
//+------------------------------------------------------------------+

string GetCode (double param)
{
  int p = (int) MathRound (param);
  if(p <0)
    p = 0;
  if(p > 40)
    p = 40;

  return (Key [p]);
}

string Key [41] = {"а", "б", "в", "г", "д", "е", "ё", "ж", "з", "и", "й", "к", "л", "м", "н", "о", "п", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я", ";", ":", ".", ",", "-", "?", "!", " "};
int textLen = 0;
string Code = "редко научная статья сочетает в себе эти два типа";

Results of my algorithm and MT.

 
fxsaber:
I'm asking the wizards to post the results of solving this math problem with their math packages

rm(list=ls());gc()


library(GenSA)


letters_s <- c(LETTERS, month.name, 1, 2, ' ')


strings <- letters_s[round(runif(49, 1, 41))]


predictor_number <- 49

set.seed(1)

par_v <- as.numeric(runif(predictor_number, min = 1, max = length(letters_s)))

par_low <- as.numeric(rep(1, times = predictor_number))

par_upp <- as.numeric(rep(length(letters_s), times = predictor_number))


fitness_f <- function(par){

letters_s <- letters_s

strings <- strings

return(as.numeric(-sum(strings == letters_s[round(par)])))

# print(-sum(strings == letters_s[round(par)]))

}


start <- Sys.time()


sao <- GenSA(par = par_v, fn = fitness_f, lower = par_low, upper = par_upp

     , control = list(max.time = 2, smooth = FALSE, simple.function = FALSE))


trace_ff <- data.frame(sao$trace)$function.value

plot(trace_ff, type = "l")

percent(- sao$value)

final_vector <- letters_s[round(sao$par)]


Sys.time() - start


print(sum(letters_s[round(sao$par)] == strings))


It takes less than two seconds to solve.

 

Forum on trading, automated trading systems and trading strategies testing

MetaTrader 5 Strategy Tester!

fxsaber, 2016.11.23 08:33

It's a good idea to go to the optimization algorithm community and formulate a problem. If you tell them that you have torn R, they will be interested right away. And they will show their result.
 

fxsaber:

It would be good to go to the community of optimization algorithms and formulate the problem. If you tell them thatyou have torn R, they will be interested right away. And they will show their results.

Well, R has torn everyone.

https://www.mql5.com/ru/forum/852/page68#comment_3864317

 

To all the bike inventors of this site!

There is such an overgrown craftsman: as a child he assembled very interesting things out of lego, and then he grew up and assembled a bicycle, sometimes you can even ride, though there is nowhere to go.

But his pride strangles him and he goes over to Mercedes, the company that makes everything that rides on earth, and says: let's compete or I will tear him apart. And he tears it to pieces, but only the craftsman notices it. What about the concern? He has development, design, production, customer complaints... Hundreds of thousands of employees. In general, the headache is just that - not before the invention of bicycles.

PS.

Men, get busy with R. After all, most of you are capable of mastering a real tool for creating decision-making models. This is quite in a couple of years could be profitable.

 
SanSanych Fomenko:


Men, take up R. After all, most of you are capable of mastering a real decision-making modeling tool. It could very well be profitable in a couple of years.

Artificial Intelligence, Challenges and Risks - Through the Eyes of an Engineer

I recommend to read, in my opinion, the author adequately describes the essence of what is happening
Искусственный интеллект, вызовы и риски – глазами инженера
Искусственный интеллект, вызовы и риски – глазами инженера
  • habrahabr.ru
Добрый день, коллеги. Сегодня хочется трезво посмотреть глазами инженера на так популярные сейчас искусственный интеллект и Deep learning, упорядочить, выстроить факты и выработать выигрышную стратегию – как с этим … взлететь, пролететь и не упасть кому-нибудь на голову? Потому-что, когда дело от лабораторных моделей на python/matplotlib/numpy...
 
SanSanych Fomenko:

Men, take up R. After all, most of you are capable of mastering a real decision-making modeling tool. This may well be profitable in a couple of years.

A couple of years? Is it not profitable already?
 
J.B:

Artificial Intelligence, Challenges and Risks - Through the Eyes of an Engineer

I recommend to read, in my opinion the author presented the essence of what is happening in a relevant way

a lot of words, but the essence ....., may not catch it, or maybe it is not there, as for me the man just complained a little))

Reason: