Discussion of article "Exploring Seasonal Patterns of Financial Time Series with Boxplot" - page 30

 
Aleksey Nikolayev:

It isn't. If you add any numbers to the samples (or multiply), the medians will change accordingly, but the correlation coefficient will not change.

Then I don't understand what it's for at all. not given
 
Maxim Dmitrievsky:
Then I don't understand what it's all about. I don't get it.

You just need to understand a little about conditional and unconditional distributions. If they do not match, it is possible to predict one random value from the value of the other.

 
Aleksey Nikolayev:

You just need to get a little insight into the concepts of conditional and unconditional distributions. When they do not coincide, it becomes possible to predict one random variable by the value of another.

There should be no correlation there, the increments depend on the previous hours, which are completely differently distributed for non-intersecting samples. Otherwise it would be a very strong pattern, I guess. Alternatively, look for a non-linear one.
 

Here is the next step in the study using OLAP. The covariance of 2 contiguous bars by hour of the day was estimated.

EURUSD data for 2019, H1 and M15 timeframes:

OLAPQTS (EURUSD,H1)     Bars read: 137206
OLAPQTS (EURUSD,H1)     Filters: FilterSelector<QUOTE_RECORD_FIELDS>(FIELD_DATETIME)[1546300800.0 ... 1577836800.0];
OLAPQTS (EURUSD,H1)     Selectors: 1
OLAPQTS (EURUSD,H1)     Processed records: 5958
OLAPQTS (EURUSD,H1)     ProfitFactorAggregator<QUOTE_RECORD_FIELDS> FIELD_CUSTOM1 [24]
OLAPQTS (EURUSD,H1)     X: DayHourSelector<QUOTE_RECORD_FIELDS>(FIELD_DATETIME) [24]
OLAPQTS (EURUSD,H1)          [value] [title]
OLAPQTS (EURUSD,H1)     [ 0] 1.76350 "2"    
OLAPQTS (EURUSD,H1)     [ 1] 1.66279 "17"   
OLAPQTS (EURUSD,H1)     [ 2] 1.38255 "18"   
OLAPQTS (EURUSD,H1)     [ 3] 1.18235 "14"   
OLAPQTS (EURUSD,H1)     [ 4] 1.13689 "11"   
OLAPQTS (EURUSD,H1)     [ 5] 1.13528 "7"    
OLAPQTS (EURUSD,H1)     [ 6] 1.09896 "0"    
OLAPQTS (EURUSD,H1)     [ 7] 1.08717 "15"   
OLAPQTS (EURUSD,H1)     [ 8] 1.02414 "12"   
OLAPQTS (EURUSD,H1)     [ 9] 0.94678 "19"   
OLAPQTS (EURUSD,H1)     [10] 0.93321 "3"    
OLAPQTS (EURUSD,H1)     [11] 0.91988 "6"    
OLAPQTS (EURUSD,H1)     [12] 0.87820 "20"   
OLAPQTS (EURUSD,H1)     [13] 0.86920 "21"   
OLAPQTS (EURUSD,H1)     [14] 0.84253 "4"    
OLAPQTS (EURUSD,H1)     [15] 0.76796 "8"    
OLAPQTS (EURUSD,H1)     [16] 0.76243 "9"    
OLAPQTS (EURUSD,H1)     [17] 0.72190 "5"    
OLAPQTS (EURUSD,H1)     [18] 0.63495 "13"   
OLAPQTS (EURUSD,H1)     [19] 0.62381 "10"   
OLAPQTS (EURUSD,H1)     [20] 0.58573 "16"   
OLAPQTS (EURUSD,H1)     [21] 0.42907 "22"   
OLAPQTS (EURUSD,H1)     [22] 0.37804 "23"   
OLAPQTS (EURUSD,H1)     [23] 0.34422 "1"    
OLAPQTS (EURUSD,M15)    Bars read: 526080
OLAPQTS (EURUSD,M15)    Filters: FilterSelector<QUOTE_RECORD_FIELDS>(FIELD_DATETIME)[1546300800.0 ... 1577836800.0];
OLAPQTS (EURUSD,M15)    Selectors: 1
OLAPQTS (EURUSD,M15)    Processed records: 23831
OLAPQTS (EURUSD,M15)    ProfitFactorAggregator<QUOTE_RECORD_FIELDS> FIELD_CUSTOM1 [24]
OLAPQTS (EURUSD,M15)    X: DayHourSelector<QUOTE_RECORD_FIELDS>(FIELD_DATETIME) [24]
OLAPQTS (EURUSD,M15)         [value] [title]
OLAPQTS (EURUSD,M15)    [ 0] 1.39463 "0"    
OLAPQTS (EURUSD,M15)    [ 1] 1.35711 "16"   
OLAPQTS (EURUSD,M15)    [ 2] 1.23327 "7"    
OLAPQTS (EURUSD,M15)    [ 3] 1.17403 "11"   
OLAPQTS (EURUSD,M15)    [ 4] 1.11581 "3"    
OLAPQTS (EURUSD,M15)    [ 5] 1.00457 "19"   
OLAPQTS (EURUSD,M15)    [ 6] 0.96975 "9"    
OLAPQTS (EURUSD,M15)    [ 7] 0.96723 "18"   
OLAPQTS (EURUSD,M15)    [ 8] 0.96129 "14"   
OLAPQTS (EURUSD,M15)    [ 9] 0.96037 "13"   
OLAPQTS (EURUSD,M15)    [10] 0.93684 "2"    
OLAPQTS (EURUSD,M15)    [11] 0.93045 "10"   
OLAPQTS (EURUSD,M15)    [12] 0.89618 "15"   
OLAPQTS (EURUSD,M15)    [13] 0.87404 "6"    
OLAPQTS (EURUSD,M15)    [14] 0.85640 "20"   
OLAPQTS (EURUSD,M15)    [15] 0.85201 "12"   
OLAPQTS (EURUSD,M15)    [16] 0.84614 "4"    
OLAPQTS (EURUSD,M15)    [17] 0.83936 "5"    
OLAPQTS (EURUSD,M15)    [18] 0.82625 "21"   
OLAPQTS (EURUSD,M15)    [19] 0.81286 "23"   
OLAPQTS (EURUSD,M15)    [20] 0.81071 "17"   
OLAPQTS (EURUSD,M15)    [21] 0.74142 "1"    
OLAPQTS (EURUSD,M15)    [22] 0.73999 "8"    
OLAPQTS (EURUSD,M15)    [23] 0.72040 "22"  

Aggregator conditional profit factor was calculated as before. Where two bars are in the same direction, the product is positive and PF > 1, where bars are multidirectional, the product is negative and PF < 1. Sorting by PF value to make it easier to see the hours optimal for trading in continuation of the previous bar and reversal.

 
Stanislav Korotky:

Here is the next step in the study using OLAP. We estimated the covariance of 2 adjacent bars by hour of the day.

EURUSD data for 2019, H1 and M15 timeframes:

Aggregator conditional profit factor was calculated as before. Where two bars are in the same direction, the product is positive and PF > 1, where bars are multidirectional, the product is negative and PF < 1. Sorting by PF value to make it easier to see the hours optimal for trading in continuation of the previous bar and reversal.

Sometimes correlations are in groups, example for the last 5 years.

Correlation dropout >0.9

This group of 0-4 hours is invariably cool, then there are groups at the European session for 2-3 hours in a row. On the American session, it's usually bad.

My brain refuses to work before the New Year, I can't figure out how to make a good visual statistical test of the predictive ability of these phenomena, to make it beautiful.


 
Maxim Dmitrievsky:

The brain refuses to work before the New Year, I do not understand how to make a good visual stat test of the predictive ability of these phenomena, so that the beauty of the

Predictive means only in one direction: from the past to the future. Accordingly, the question is whether it is possible to take into account only products of counts for indices under the condition i > j in the correlation calculation? Visualise in the same way.

 
Stanislav Korotky:

Predictive means only in one direction: from the past to the future. Accordingly, the question is whether in the calculation of correlation it is possible to take into account only products of counts for indices under the condition i > j? Visualise in the same way.

Do you have any idea what of this can be visualised in 3D? I wanted to master this trick in Python at the same time. There you can twist and turn very nicely. Then, whoever wants to, will convert the 3D mql kanvas to 3D mql, good luck to him )).

It's like boxplots, when you rotate a chart, other boxplots stick out from the side)).

 

I checked the thesis of our opponents that correlation on overlapping samples is false.

Actually, I did not check it specially, but continued the statistical study according to the planned plan, the check is as a consequence

Increments with a lag of 24h. (day), look at the correlation of hours >0.9.

Let's take a couple of intervals with high and low correlation, predict the next close and compare with the fact. close

For well correlated clocks:

0-1

2-3

For poorly correlated clocks:

16-17

22-23

I will double-check the logic, but it seems to be a direct correlation, although the correlation of pure predictions looks worse than the correlation of increments (probably due to the errors of the correlation itself).

 
Maxim Dmitrievsky:

I checked the thesis of the opponents that correlation on overlapping samples is false.

It does not lie, it is by definition large for overlapping samples. There is no sense in it, because the value of the predicted increment is absorbed by the long common area and does not carry information.

If we compare one-hour increments (actually on one bar, without crossings) with a step of 24 hours, we have an estimate of daily fluctuations. We get about the same as in the article - some boxplots/hours demonstrate a statistical trading opportunity.

 
Stanislav Korotky:

It does not lie, it is by definition large for overlapping samples. There is no point in it, because the value of the predicted increment is absorbed by the long common plot and carries no information.

If we compare one-hour increments (actually on one bar, without crossings) with a step of 24 hours, we have an estimate of daily fluctuations. We get about the same as in the article - some boxplots/hours demonstrate a statistical trading opportunity.

Ok, you're on )) first I'll check what I've done with the bot, then I'll look at the non-overlapping ones.

the fact is that it is far from always large for overlapping samples, and it shows exactly the same clusters that I found earlier through boxplots, only from the side.