Обсуждение статьи "Продвинутый ресемплинг и выбор CatBoost моделей брутфорс методом" - страница 12

 
Evgeni Gavrilovi:

добавил пути к файлам - трейнинг prnew.csv и тест prnews.csv 

но полученный R2 почти всегда выше 0.9, может быть look_back неправильно установлен и поэтому полученный файл mqh ошибочный, из-за которого не получается тестить в терминале 


https://colab.research.google.com/drive/1eeyRA5bGaFMfX1THnMsL5hwKmxBkqvqP 


https://drive.google.com/file/d/1LIRhpk5iU_dYQbefZ-FFQM6XMV_cOh26/view?usp=sharing  test data


https://drive.google.com/file/d/18RpJec9EGSCSknwaHsevgHcZuCeoOvP5/view?usp=sharing  training data

потом попозже посмотрю, пока аврал по работе

 
Maxim Dmitrievsky:

потом попозже посмотрю, пока аврал по работе

Хорошо. 

Вот этот файл mqh: https://drive.google.com/file/d/1UquXcaRJjIR2lxE81P8Pm2BWFQ9uM0N1/view?usp=sharing 

В тестере указана ошибка: 2020.12.01 21:19:23.252 2020.08.03 00:05:00   array out of range in 'cat_model.mqh' (288,51) 

 
Maxim Dmitrievsky : Hi, Rasoul. Try to reduce the training set size. It can depends of different settings, but key trick is that then less train size, better generalization on new data. In the next article I'll try to explain this effect.

Hi Maxim,

I changed the periods of the sets to following,

1. Training Set: from 2018.01.01 to 2019.01.01
    This only be used to train GMM.

2. Validation Set: from 2019.01.01 to 2020.01.01
    This set will be used in brute force algorithm  to find the best model.

3. Test Set: from 2020.01.01 to 2021.01.01

    This set only be used to test the best model obtained from brute force algorithm.

Below is a typical result of running the script,

I am attaching the code, so you can take a look at it to find a possible mistake.

Файлы:
 
Rasoul Mojtahedzadeh:

Hi Maxim,

I changed the periods of the sets to following,

1. Training Set: from 2018.01.01 to 2019.01.01
    This only be used to train GMM.

2. Validation Set: from 2019.01.01 to 2020.01.01
    This set will be used in brute force algorithm  to find the best model.

3. Test Set: from 2020.01.01 to 2021.01.01

    This set only be used to test the best model obtained from brute force algorithm.

Below is a typical result of running the script,

I am attaching the code, so you can take a look at it to find a possible mistake.

Sometimes just need to change learning interval an settings, then model can capture better dependencies, for example:

LOOK_BACK = 1
MA_PERIODS = [15, 25, 55, 100, 150, 200, 250, 300]

SYMBOL = 'EURUSD'
MARKUP = 0.00010
TIMEFRAME = mt5.TIMEFRAME_H1
START_DATE = datetime(2018, 9, 1)
VSTART_DATE = datetime(2019, 3, 1)
TSTART_DATE = datetime(2019, 7, 1)
STOP_DATE = datetime(2021, 1, 1)


 
Evgeni Gavrilovi:

Хорошо. 

Вот этот файл mqh: https://drive.google.com/file/d/1UquXcaRJjIR2lxE81P8Pm2BWFQ9uM0N1/view?usp=sharing 

В тестере указана ошибка: 2020.12.01 21:19:23.252 2020.08.03 00:05:00   array out of range in 'cat_model.mqh' (288,51) 

у меня такое подозрение, что вы используете версию бота из прошлой статьи. Бот в этой статье отличается. Проверьте, такой ошибки не должно быть. 

R^2 0.9 это же хорошо, у меня тоже часто такое бывает

 
Maxim Dmitrievsky:

Sometimes just need to change learning interval an settings, then model can capture better dependencies, for example:


Thanks for your quick reply!

Looks good with your settings! :)

Best regards,

Rasoul

 
Rasoul Mojtahedzadeh:

Thanks for your quick reply!

Looks good with your settings! :)

Best regards,

Rasoul

look_back just need to set 1, from my experience.. and more different MA's. And sometimes need to change learning periods

sometimes need to change number of clusters in GMM from 75 to another.. and so on )

maybe need to add better features instead MA's, but I don't know which exactly.. need to experiment

 
Maxim Dmitrievsky:

у меня такое подозрение, что вы используете версию бота из прошлой статьи. Бот в этой статье отличается. Проверьте, такой ошибки не должно быть. 

R^2 0.9 это же хорошо, у меня тоже часто такое бывает

только в новой версии есть функция brute_force, но дело в другом - полученный файл mqh выдает ошибку array out of range это и не позволяет тестить бота и с высоким R^2 

 
Evgeni Gavrilovi:

только в новой версии есть функция brute_force, но дело в другом - полученный файл mqh выдает ошибку array out of range это и не позволяет тестить бота и с высоким R^2 

я про файл самого советника, который компилируете

 
Maxim Dmitrievsky:

я про файл самого советника, который компилируете

да, он самый. 

там прописано

#include <MT4Orders.mqh>

#include <Trade\AccountInfo.mqh>

#include <cat_model.mqh> 

и самое главное, что при загрузке mqh напрямую из jupyter notebook все работает нормально, меня это удивило

Причина обращения: