Discussion of article "Econometric approach to finding market patterns: Autocorrelation, Heat Maps and Scatter Plots"

 

New article Econometric approach to finding market patterns: Autocorrelation, Heat Maps and Scatter Plots has been published:

The article presents an extended study of seasonal characteristics: autocorrelation heat maps and scatter plots. The purpose of the article is to show that "market memory" is of seasonal nature, which is expressed through maximized correlation of increments of arbitrary order.

Let us perform an additional check on the M15 timeframe. Suppose we are looking for the same correlation between the current hour and the same hour of the previous day. In this case the effective lag must by 4 times larger and be about 24*4 = 96, because each hour contains four M15 periods. I have optimized the Expert Advisor with the same settings and with the M15 timeframe.

In the optimized interval, the resulting effective lag is <60, which is strange. Probably the optimizer found another pattern, or the EA was overoptimized.

 

Fig. 16. Relationship of the 'Lag' variable to the 'Order threshold' variable in the optimized interval

As for the forward test results, the effective lag is normal and corresponds to 100, which confirms the pattern. 

Fig. 17. Relationship of the 'Lag' variable to the 'Order threshold' variable in the forward interval

Let us view the best backtest and forward results:

Author: Maxim Dmitrievsky

 
Great article. I have learnt a lot of useful ideas and solutions.
 

Maxim, well done, a big respect for the research work!

The question is this. Am I right in thinking that:

"корреляции приращений первого часа текущего дня и первого часа предыдущих дней, которая уменьшается при увеличении дельты (расстояния в днях)"

is essentially a partial autocorrelation function (PACF) ?

 
Denis Kirichenko:

Maxime, well done, big respect for the research work!

The question is this. Am I right in understanding that:

is essentially a partial autocorrelation function (PACF) ?

Thanks, yes, that's exactly what it is.

 

The article is good in itself and as an example of what trading articles should be.

The disadvantage, as in the author's previous article, is the lack of evaluation of the significance of positive profitability. A low significance would show the necessity to refine the strategy before trading on it. In the case of the TS from the article, at first glance, the significance can be roughly estimated based on the number of trades and Sharpe ratio.

 
Aleksey Nikolayev:

The article is good in itself and as an example of what trading articles should be.

The disadvantage, as in the author's previous article, is the lack of evaluation of the significance of positive profitability. A low significance would show the necessity to refine the strategy before trading on it. In the case of the TS from the article, at first glance, the significance can be roughly estimated based on the number of trades and Sharpe ratio.

Thank you. Detailed testing and significance assessment can be added when the whole topic is exhausted. That is, I don't think that this is an optimal trading algorithm, but rather just an additional check of some regularities through the optimiser.

The problem with switching modes has not been solved yet, which seems to be a logical continuation of the topic. Otherwise, all estimations will be for a particular market mode (in this case, for the last 5 years), which is wrong.

 

Видно, что закономерность сохраняется на всем интервале 2015-2020гг. Можно считать, что наш эконометрический подход сработал на отлично.

It would be strange if the optimisation showed poor results in the same area where the "pattern search" was conducted, no?

 
Andrey Khatimlianskii:

It would be strange if the optimisation showed poor results in the same area where the "pattern search" was conducted, no?

If it showed a different lag, then the study would have turned out wrong. Just a test.

 
Maxim Dmitrievsky :

If she showed another lag, then the study would be wrong. Just a check.

hi maxim

please answer my question at

https://www.mql5.com/en/forum/219788/page2#comment_15129306

thank to you

Discussion of article "Fuzzy Logic in trading strategies"
Discussion of article "Fuzzy Logic in trading strategies"
  • 2017.11.21
  • www.mql5.com
New article Fuzzy Logic in trading strategies has been published: Author: Maxim Dmitrievsky...
 

Greeting,

Thank you very much. The article was very insightful and helpful.


I face error while I try practice your code in jupyter Notebook (really thanks a lot for your supportive file), 

---------------------------------------------------------------------------AttributeError Traceback (most recent call last) <ipython-input-32-a563182e2f90> in <module> 12 13 ---> 14 seasonal_autocorrelation('EURUSD',25, 12,13) <ipython-input-32-a563182e2f90> in seasonal_autocorrelation(symbol, lag, hour1, hour2) 3 columns=['time', 'open', 'low', 'high', 'close', 'tick_volume', 'spread', 'real_volume']) 4 rates = rates.drop(['open','low', 'high','tick_volume', 'spread','real_volume'], axis=1).set_index('time')----> 5 rates = rates.drop(rates.index[~rates.index.hour.isin([hour1, hour2])]).diff(lag).dropna() 6 7 AttributeError: 'Int64Index' object has no attribute 'hour'


 
baqmisz:

Greeting,

Thank you very much. The article was very insightful and helpful.


I face error while I try practice your code in jupyter Notebook (really thanks a lot for your supportive file), 

---------------------------------------------------------------------------AttributeError Traceback (most recent call last) <ipython-input-32-a563182e2f90> in <module> 12 13 ---> 14 seasonal_autocorrelation('EURUSD',25,12,13)<ipython-input-32-a563182e2f90> in seasonal_autocorrelation(symbol, lag, hour1, hour2) 3 columns=['time', 'open', 'low', 'high', 'close', 'tick_volume', 'spread', 'real_volume']) 4 rates = rates.drop(['open','low','high','tick_volume','spread','real_volume'], axis=1).set_index('time')----> 5 rates = rates.drop(rates.index[~rates.index.hour.isin([hour1, hour2])]).diff(lag).dropna() 6 7 AttributeError: 'Int64Index' object has no attribute 'hour'


Hi, MetaQuotes has change python API, so this functions not work now. Maybe later I'll fix this and attach a new notebook

Also, you can check new documentation on this site