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

 
mytarmailS #:

it's a combination of both.

1) rules can look at the last 10 candles ( hard indexing [1 : 10] )

2) rules can be searched on all data regardless of the index, it is a loop [i] , also these rules can look not only at their index but also at [i+n ].

1) I have a dissonance because of the discrepancy between what you call rules and what is usually called rules (in trading). Usually in trading they are the rules of trading - opening, closing or changing the volume/direction of a position. The question is how the trading logic builds from your rules

2) Regardless of the answer to the first point, there is a problem with too large a set of initial rules to form trading logic rules. The problem is that overfitting is possible. Somewhere on the forum I have already written on the example of choosing a "good hour" of the week, that even choosing from 120 variants gives the possibility to always "see" a trading opportunity, which in reality obviously does not exist. Roughly speaking, over-selection games with SB can be dangerous. It is clear that price is not exactly SB, but the similarities are too great to ignore.

 
Vladimir Perervenko #:

Drop me a line and I'll take a look. This could be interesting.

I'm sending it here, because I can't get it on PM.. (I guess we should be friends.)

There are only two main functions,

1) creating grammar

2) how to count the rules in the data frame.

Basically, you don't need anything else...

Then we just take the dataset and go through each data frame with function 2).

get the result, evaluate the fitness function...


I will try to make a full-fledged example with a fitness function if necessary, already a separate code.

Files:
fun.txt  4 kb
 
Aleksey Nikolayev #:

1) I have a dissonance because of the discrepancy between what you call rules and what is usually called rules (in trading). Usually in trading they are the rules of trading - opening, closing or changing the volume/direction of a position. The question is how trading logic is built from your rules

2) Regardless of the answer to the first point, there is a problem with too large a set of initial rules to form trading logic rules. The problem is that overfitting is possible. Somewhere on the forum I have already written on the example of choosing a "good hour" of the week, that even choosing from 120 variants gives the possibility to always "see" a trading opportunity, which in reality obviously does not exist. Roughly speaking, over-selection games with SB can be dangerous. It is clear that price is not exactly SB, but the similarities are too great to ignore.

1) A rule is an expression, a code.

2) Well then nothing from AMO can be applied at all because overfitting?

 
mytarmailS #:

1) a rule is an expression, a code

The question of converting these rules into rules of trade logic. According to my guesses - how tips are built when using associative rules: "with your goods take such and such other goods". In this case, the ordering of things is lost, which is not important for the goods in the basket, but important for the events on the chart. And the probability-frequency relation between events is reflected only in the simplest form. It might be worth looking at Bayesian networks.

mytarmailS #:

2) Well then nothing at all can be applied from AMO because overfitting?

I see two ways to deal with this (I prefer the second one myself)

1) Crossvalidation and forward

2) Restriction to a narrow set of patterns that occur quite often and that are specified by a small number of parameters.

 
Aleksey Nikolayev #:

1) The question of converting these rules into rules of trade logic.

2) According to my guesses - how tips are built when using associative rules: "with your goods take such and such other goods".

3) In this case, the ordering of things is lost, which is not important for goods in the basket, but important for events on the chart.

4) Well, the probability-frequency relation between events is reflected only in the simplest form. It might be worth paying attention to Bayesian networks.

1) So, what kind of rules are we talking about? The associative ones are one, the ones I build with grammar are another, you're saying I can't follow the thought...

There are no rules about "expressions" in asocial rules. there are labels of goods.

In my rules - rules, and there are many of them, and they must work in the sequence in which they are set, and there are also stop rules, that is a much more complex algorithm, on a very much....

2) Well, yes, that's the way it's structured.

3) Well this is a subjective judgement, I do not refute or disagree.

For example, tried to train forrest and a priori (ace. right) and it turned out that ace. right half a per cent worse classified. You can draw your own conclusions.

Also about the sequence of events, there are ace. rules in which the sequence is taken into account, and I even gave you at one time this algorithm, strange that you have forgotten....

4) I don't know anything about Bayesian networks.

 

But algorithms like ace. rules should definitely be tried.

Or rather we should exploit their concept that input data can be of different sizes and - what was long ago can strongly influence the current one.

Just like in the market, prices that were there a long time ago directly affect the current price....


For example today's trade (which I safely screwed up) , the entry was made from a level that was 4 hours ago from the entry point.

How to recognise this situation at least theoretically, seeing the last 10-20 candles? You can't...

How can this situation be found by normalising the data? You can't.

And if you look at returns? Even more information about past prices can be removed, no way and never...

But stubborn Neptushniki shout that returns are enough, in fact it is a diagnosis of dementia... Well, let's not talk about it....


So here in ace. rules can for example labels can be replaced by prices, and we will get an algorithm that searches for associations in unstructured data, already cool?

You could do your own thing.

 
mytarmailS #:

But algorithms like ace. rules should definitely be tried to apply.

To be more precise, it is necessary to exploit their concept that input data can be of different sizes and - what was long ago can strongly affect the current one.

Just like in the market, prices that were long ago directly affect the current price....


For example today's trade (which I safely screwed up) , the entry was made from a level that was 4 hours ago from the entry point.

How to recognise this situation at least theoretically, seeing the last 10-20 candles? You can't...

How can this situation be found by normalising the data? You can't.

And if you look at the returnees? Even more information about past prices, no way and never...

But stubborn Neptushniks shout that retournals are enough, in fact it's a diagnosis of dementia... but let's not talk about it....


So here in ace. rules can be for example labels can be replaced by prices, and we get an algorithm that searches for associations in unstructured data, already cool?

You can do your own thing.

Interesting theoretical approach. But why the next peak is not taken into account as an order, I understand. This pattern of action does not fit the current moment. I have an attempt to find analogies, but alas, there is no consistency and I think that it is not possible in principle in every similar case.

Analogy would be rooted in the variety of candlestick patterns. I.e. in OHLC variants in any time variant.

f667

 
Uladzimir Izerski #:

Interesting theoretical approach. But why the next peak is not taken into account as an order is clear to me. This pattern of actions does not fit the current moment.

You have a market model, a complex/global approach, an attempt to explain the whole market. This is very cool, I can't do it yet.

I have a situational / local approach, in the form of some local patterns, templates, it's not good, but I don't have another, yet...

To make you understand, I don't even watch other TFs, only 1m.

But it is still possible to trade ))



Uladzimir Izerski #:

The analogy will be based on the variety of candlestick patterns. I.e. in OHLC variants in any time variant.

I think it is better to just take the extrema

 
mytarmailS #:

You have a market model, a comprehensive/global approach, an attempt to explain the whole market. That's very cool, I can't do that yet.

I have a situational / local approach, in the form of some local patterns, templates, which is not good, but I don't have another one, yet.....

Just so you understand, I don't even watch other TFs, only 1m.

But it's still possible to trade.)



I think it's better to just take the extremes.

You can trade on any TF. The market in its pattern is the same on any TF.

The template is the same, the size of the template may differ.

________

Taking extrema is a tempting option, but how to find them specifically has already been fought by more than one generation of traders). There are variants for this case too. But again, they will not be 100%_ perfect. Because of non-standard market behaviour. Neither MO nor witch doctor will help here, only the current state of the market determines further behaviour.

Yusuf is right in many ways and I agree with him, but he lacked experience in deep understanding of financial markets.

Machine learning can estimate a market pattern and even a sequence of patterns, but not their guaranteed future behaviour.

Extremes are for pros. Those who read everything here, but keep silent).

 
Uladzimir Izerski #:

Taking extrema is a tempting option, but how to find them specifically has already been fought by more than one generation of traders).

I don't mean that extrema are like a grail or something)) no, just as you said the same pattern will be different if you look at candles, but with extrema the picture will be more regular... that's it, nothing more.

Reason: