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

 

I was thinking about alternative ways of price feed into the network, I noticed that almost all successful traders trade levels, those take into account not only the series of recent price values, but also that piece of the chart which was in the past at the same prices

at

If you think about realization of such an approach a lot of problems appear, I wonder who did something like that?

I've put this approach on hold for now, but I think it's promising...

I've shifted my attention to more simple things, I thought, I can try to consider past prices in some other way, even if not completely, and it's possible to compress price information, I mean the price profile (or volume profile), you can really think about several hundreds of bars compressed into one histogram, so we consider many past prices and compress them at the same time... I'm a beginner programmer and I can't realize profile yet, that's why I took a simple way, just took distribution and built it by price segment, what's not a market profile? ;)

PRICE <- cumsum(rnorm(300))+1000
layout(1:2)
plot(PRICE,t="l",ylab = "цена" , xlab = "индексы",lwd=2)
Max <- max(PRICE)
Min <- min(PRICE)
range.vector <- seq(Min, Max, length.out=50)
H <- hist(PRICE, breaks = range.vector,
          xlab = "все цены которые есть в етом участке", 
          ylab = "сколько раз график был на одной и той же цене",col = 5)


ss

There is a kind of hope that the network will understand better this distribution (profile) than the raw price, because this profile takes into account all pro-trading events that happened by calculating the number of chart hits at one price, and pro-trading is theoretically level ... It should be checked ... It's done :) Thanks toD.trader for his help in analyzing the distribution

I took a slice of 200 price values in the sliding window, scaled it, centered it, then distributed it and fed to the RF

outputs

H$breaks

H$counts

and the last 5 values from the cutting from which I made the allocation, so the algorithm could take the last value from H$breaks and H$counts, since all prices have already been prorated

5 min chart, target as always, reversals

The result is not so good... sometimes the net doesn't know what to do

at

Sometimes the inputs are great, the quality of the inputs is super

aa

and what is interesting, there is no hard sell on the new data

vvvv


i did not adjust anything, i simply trained the model and i saw the result

If you're interested you may try to do some training with your targets, maybe you'll get something useful together...

Thanks for the tip ;)

 
There are many problems in this approach, which are either insoluble or solvable but do not give good training.

At a minimum, the non-stationarity of the raw cotier distribution.
 
Alexey Burnakov:
This approach has a lot of problems that are either unsolvable or solvable but do not give good learning.

At a minimum, the non-stationarity of the raw cotier distribution.
I simply replaced the market profile with a distribution, the normal distribution and its properties are not taken into account here, or didn't I understand your comment? :)
 
mytarmailS:
Well, I kind of just replaced the market profile with a distribution, those normal distribution and its properties are not taken into account here, or I don't understand the comment? :)
No, you didn't.

It is necessary to make not 960, 970, ...
But bring it to a stationary form, for example, by counting the difference from the last price. That would be -10, -5, 0, 5, ... 50. Otherwise you will have one average on one segment, and a completely different average on the other. 900 on one, 600 on the other. Nothing will work outside of the sample.
 
Alexey Burnakov:
I do not understand.

It's not 960, 970, ...

960, 970, ... -- If I had marked the prices as -2 to 2 it would not be so clear.

 
mytarmailS:

960, 970, ... -- If in the example on the picture I would put the prices in the form from -2 to 2 it would not be very clear for understanding

Well, then okay. But if there is no reference to the last price, then the machine does not understand where your average is. If you subtract all prices from the last price, then the average will be zero and the position of this average relative to the price is fixed.
 
Alexey Burnakov:
Well then ok. But if there is no reference to the last price, it is not clear to the machine where your average is. If all prices are subtracted from the last price, then the average will be zero and the position of this average is fixed relative to the price.
There is a binding:)

Highlighted in bold blue in my post

 
mytarmailS:
There is a binding:)

Highlighted in bold blue in my post

Well, that's great. The idea is interesting in general!

But there is not enough dynamic information to complete the training. The machine doesn't understand what went before and what went after in this distribution. We need to add more inputs.
 
Alexey Burnakov:
Very good. It's an interesting idea in general!

But there is not enough dynamic information to complete the training. The machine does not understand what in this distribution went before and what went after. We need to add more inputs.

How can this be solved? do I feed not one slice of the distribution, but a series of several slices at once?

I am afraid that there will be no retraining because of the large amount of information, my RF model is the one on the picture with the parameters ntree = 20 , mtry = 5.

If I set ntree =100 then the model does not make any transaction with the new data, it is so overtrained

=============================================

I have to find out how to solve the problem of the network seeing charts which were in the past at the same prices.

THIS is what the network sees now

dd

the blue area is what is visible to the net, the blue bars represent the price distribution in this area, and although the net sees many, 200 candlesticks, it doesn't see the main thing , those charts that were earlier at the same prices

Ë

And it seems to me that this is the key information

And the network knows nothing about it

 
mytarmailS:


We still need to figure out how to solve the problem of the network seeing charts that were in the past at the same prices


This is a big problem. It is something that is almost impossible to solve without impairing learning.

The point here is that the more you look into the past, the more dependent your neighboring observations are.

If you feed the machine Unthinned observations, you lose the most important thing, which is meeting the independence requirement of the observations. After that, learning will be drastically inadequate. And the statistics don't work.

And to avoid this you have to thin observations so that lag of maximal looking back is less or equal to step of thinning of observations. And this would lead to what? Hundredfold reduction of sample size for training.

We need a compromise here. The depth of looking versus the number of examples in the sample.
Reason: