Машинное обучение в трейдинге: теория, модели, практика и алготорговля - страница 2510
Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
В справке поиск ничего не дает.
У меня информация только отсюда.
А матрицы пригодятся.
Работает задание размера через переменные
int m1=2; int m2=2;
matrix m(m1, m2);
А раньше через динамические массивы приходилось париться.
Ну, Ренат вообще обещал машинное обучение в MQL5 -- поддержку ONNX, например. Посмотрим)
Пересечение двух машек ещё никто не переплюнул
... а запаздывание можно уменьшить предиктом НС))
Если кто пользуется пакетом СанСаныча https://www.mql5.com/ru/code/17468 для соединения с R, то:
В файле R.mqh имена переменных vector и matrix стали выдавать ошибку при компиляции. Переименуйте их в другие и все будет работать. Я использовал vectr и matr.
Редактор подсвечивает эти слова синим, как тип данных наподобие int, double. Видимо зарезервировали слова под новые типы.
Хм, ничего не знал об этой библиотеке. А как ей собственно пользоваться, какой у неё функционал?
Короче, все тщетно, с МО рынок не обмануть.
Нашел признаки и целевую, распределение классов которых показано на первом рисунке.
Точность на тестовой и тренировочной моделей катбуста, обученной по этому датасету составляла 93%
На втором рисунке показан график баланса и эквити торговли по целевой:
На третьем рисунке показан график баланса и эквити торговли по сигналам обученной модели катбуста:
Так что, дамы и господа, расходимся.
Что за целевая, как нашли?
Прикрутить тралл не пробовали?
Если просто смотреть по балансу ошибок (+1 правильно -1 не правильно для класса 1), то сильно ли разный результат?
Хм, ничего не знал об этой библиотеке. А как ей собственно пользоваться, какой у неё функционал?
Двусторонняя передача переменных и массивов между МТ и R. Туда котировки, обратно результат и команды.
Описание функций:
/**
* Return the dll version. The upper 16 bit of the return value
* are the major version and the lower 16 bit the minor. This
* is used in RInit() to make sure that this header file and
* zzthe dll fit together.
*/
int RGetDllVersion();
/**
* This is not meant to be called directly, it will be
* called by RInit() after the successful version check.
* You should call RInit() to start a new R session.
*/
long RInit_(string commandline,int debuglevel);
/**
* Teminate the R session. Call this in your deinit() function.
* After this the handle is no longer valid.
*/
void RDeinit(long rhandle);
/**
* return true if the R session belonging to this handle is
* still runing. R will terminate on any fatal error in the
* code you send it. You should check this at the beginning
* of your start function and stop all actions. The last
* command prior to the crash will be found in the log.
* If R is not running anymore this library won't emit any
* more log messages and will silently ignore all commands.
*/
bool RIsRunning(long rhandle);
/**
* return true if R is still executing a command (resulting
* from a call to RExecuteAsync())
*/
bool RIsBusy(long rhandle);
/**
* execute code and do not wait. Any subsequent call however
* will wait since there can only be one thread executing at
* any given time. Use RIsBusy() to check whether it is finished
*/
void RExecuteAsync(long rhandle,string code);
/**
* execute code and wait until it is finished. This will not
* return anything. You can basically achieve the same with
* the RGet*() functions, evaluating the expression is also
* just executig code, the only difference is that these
* RGet*() functions will additionally try to parse and return
* the output while RExecute() will just execute, wait and
* ignore all output.
*/
void RExecute(long rhandle,string code);
/**
* assign a bool to the variable name. In R this type is called "logical"
*/
void RAssignBool(long rhandle,string variable,bool value);
/**
* assign an integer to the variable name.
*/
void RAssignInteger(long rhandle,string variable,int value);
/**
* assign a double to the variable name.
*/
void RAssignDouble(long rhandle,string variable,double value);
/**
* assign a string to the variable namd. In R this type is called "character"
*/
void RAssignString(long rhandle,string variable,string value);
/**
* assign a vector to the variable name. If the size does not match
* your actual array size then bad things might happen.
*/
void RAssignVector(long rhandle,string variable,double &vectr[],int size);
/**
* assign a vector of character (an array of strings) to the variable. If you need
* a factor then you should execute code to convert it after this command. In
* recent versions of R a vector of strings does not need any more memory than
* a factor and it is easier to append new elements to it.
*/
void RAssignStringVector(long rhandle,string variable,string &vectr[],int size);
/**
* assign a matrix to the variable name. The matrix must have the row number as the
* first dimension (byrow=TRUE will be used on the raw data). This function is much
* faster than building a huge matrix (hundreds of rows) from scratch by appending
* new rows at the end with RRowBindVector() for every row. This function is optimized
* for huge throughput with a single function call through using file-IO with the
* raw binary data. For very small matrices and vectors with only a handful of elements
* this might be too much overhead and the other functions will be faster. Once you
* have the matrix with possibly thousands of rows transferred to R you should then
* only use RRowBindVector() to further grow it slowly on the arrival of single new
* data vectors instead of always sending a new copy of the entire matrix.
*/
void RAssignMatrix(long rhandle,string variable,double &matr[],int rows,int cols);
/**
* append a row to a matrix or dataframe. This will exexute
* variable <- rbind(variable, vector)
* if the size does not match the actual array size bad things might happen.
*/
void RAppendMatrixRow(long rhandle,string variable,double &vectr[],int size);
/**
* return true if the variable exists, false otherwise.
*/
bool RExists(long rhandle,string variable);
/**
* evaluate expression and return a bool. Expression can be any R code
* that will evaluate to logical. If it is a vector of logical then only
* the first element is returned.
*/
bool RGetBool(long rhandle,string expression);
/**
* evaluate expression and return an integer. Expression can be any R code
* that will evaluate to an integer. If it is a floating point it will be
* rounded, if it is a vector then only the first element will be returned.
*/
int RGetInteger(long rhandle,string expression);
/**
* evaluate expression and return a double. Expression can be any R code
* that will evaluate to a floating point number, if it is a vector then
* only the first element is returned.
*/
double RGetDouble(long rhandle,string expression);
/**
* evaluate expression and return a vector of doubles. Expression can
* be anything that evaluates to a vector of floating point numbers.
* Return value is the number of elements that could be copied into the
* array. It will never be bigger than size but might be smaller.
* warnings are output on debuglevel 1 if the sizes don't match.
* >>> Limited to 100000 elements
*/
int RGetVector(long rhandle,string expression,double &vectr[],int size);
/**
* do a print(expression) for debugging purposes. The outout will be
* sent to the debug monitor on debuglevel 0.
*/
void RPrint(long rhandle,string expression);
Двусторонняя передача переменных и массивов между МТ и R. Туда котировки, обратно результат и команды.
Спасибо за информацию, буду знать о такой возможности. А большие вообще там задержки на туда/сюда?
Пересечение двух машек ещё никто не переплюнул
Очень быстро. Через память обмен. Не файлы и не пипеты.
Это хорошо.
Это хорошо.
Объясните, зачем вы боритесь за эти миллисекунды и все время интересуетесь быстро или медленно?