Bayesian regression - Has anyone made an EA using this algorithm? - page 48

 
comp:
Saw a primitive trade today for 7500 lots (one way). With 100:1 leverage it takes ~$5700K equity to open such a position.
A slippery slope? You again?
 
Vasiliy Sokolov:
A slip? You again?
You don't get it. Seventy-five hundred lots on history I've seen. Never seen anything like this before. But since he trades on MT4, he must be primitive.
 
comp:
Today I saw the primitive trade 7500 lots (one way). With 100:1 leverage it takes ~$5700K equity to open such a position.

I didn't mean to stigmatise anyone personally.

I am in favour of discussing statistics here, Bayesian and not only, as applied to trading.

To your example, primitive is what? Have you seen his primitive code or not?

 
comp:
You don't get it. 7500 lots of history has been seen. Never seen anything like this before. But since it trades on MT4, it must be primitive.
There are 600+ file projects on Metatrader here, so it may be very difficult on MT.
 
Alexey Burnakov:

...

I haven't worked with trees, there's nothing to advise, but I have some experience with training classifiers in general:

1) If there is a row of prices P[0], P[1], P[2], P[3], P[4]; then the row for input data of the classifier is P[0]-P[3]. But do not take the value of P[4] as the required result of the classification for training. Trades will not be opened and closed at every bar. It's more profitable to open a position at the beginning of the channel and close it at the end. That is, the classifier must predict the channel direction: up or down, not the price of the next bar. For example, plot a zigzag on initial data and take the direction of the zigzag instead of P[4] as a required result.

2) Patterns are time dependent. Train on a separate classifier for each day of the week, or try adding the phase of the moon to the raw data (I'm serious), or the time of day, I don't know what to do exactly, but it's very important.

 
Alexey Burnakov:

To your example, a primitive is what? Have you seen his primitive code or not?

I haven't, of course. But the code is in MQL4 and there are trades every day. Have you seen any complex mathematical twists and turns in MQL4 that could be optimized adequately with many thousands of passes in GA? I haven't.

If mathematics is complicated, in MT4 optimizer it barely works. But if a trader works in real account it means that he or she is optimizing in MT4. That means that it is a simple calculation. And there is no complicated mathematics, with a high probability.

 
Dr.Trader:

I haven't worked with trees, so I can't advise, but I have some experience with training classifiers in general:

1) If there is a row of prices P[0], P[1], P[2], P[3], P[4]; then the row for input data of the classifier is P[0]-P[3]. But do not take the value of P[4] as the required result of the classification for training. Trades will not be opened and closed at every bar. It's more profitable to open a position at the beginning of the channel and close it at the end. That is, the classifier must predict the channel direction: up or down, not the price of the next bar. For example, plot a zigzag on initial data and take the direction of the zigzag instead of P[4] as a required result.

2) Patterns are time dependent. Train on a separate classifier for each day of the week, or try adding the phase of the moon to the raw data (I'm serious), or the time of day, I don't know what to do exactly, but it's very important.

Thank you.

In order.

1) The idea is interesting. You could also do this: measure what is fastest to meet - the maximum or minimum price over a certain period of time. If the maximum (let's code it as 1), then it makes sense to open a buy, and vice versa. BUT - one big but - the closing rule for such a trade will be very blurred, there is none.

I look like a zigzag. Maybe really try it. What confuses me about this approach - one knee may be in 1 hour and another in 9 hours. So the timing is a mess. I think the classifier might not like that.

Although, you're just talking about direction.... You could try.....

2) Yes, I've already done that. I have a big dataset - I can share it right here - where I've added to the price data:

- hour

- minute

- day of the week

- month

- day of the month

BUT - another big but - if these variables taken individually don't say anything significant about the target, then decision trees (all their varieties) don't include them in the top important variables. This is because trees are greedy algorithms and they start making rules from the most important predictors for the target variable. And generally speaking, it's not easy to get a machine to use the variables you want. If it has a built-in mechanism for prioritising predictors, it will sift out your "wants".

Some of the best known training machines for data (but NOT image) classification are Gradient Boosted trees (GBM / XGBOOST libraries) do exactly that - first they select variables that represent price vs. past, e.g. the difference with moving average with different window (for me these are consistently the most important predictors).

Neural networks are conventional (shallow) - multilayer perceptrons do not consider interactions.... That is, their nodes are all weighted sums processed by a kernel. But maybe I'm wrong and they implicitly work out interactions... I don't know for sure.

 
Alexey Burnakov:
There are comrades here doing 600+ file projects on Metatrader, so it can be very difficult on MT.
600+ files are frills, not maths.
 
comp:
600+ files - this is frills, not maths.

Well, yeah. Especially when you have no idea what's in there ))

Here's my personal primitive (not a product, not for sale): https://www.mql5.com/ru/blogs/post/381081

Logic of opening and closing positions fits in 50-100 lines with nice markup. About 4-6 important parameters. Expert Advisor has been going forward for 5-7 years. Really one idea was taken and thoroughly analyzed. It is abandoned for now.

Тестирую
Тестирую
  • 2015.02.15
  • Alexey Burnakov
  • www.mql5.com
Разрабатываемая торговая система. Провел тестирование на majors. На трех получил приемлемые показатели. Эта троица имеет шанс пойти на реал-тест в обозримом будущем. Не на всех парах торгуемый паттерн...
 
Alexey Burnakov:

Here is my personal primitive (not a product, not for sale): https://www.mql5.com/ru/blogs/post/381081

The logic for opening and closing positions fits into 50-100 lines with nice markup. About 4-6 important parameters. Expert Advisor has been going forward for 5-7 years. Really one idea was taken and thoroughly analyzed. It is abandoned for now.

I admit that you have a robust TS. But you don't take into account floating spread and you don't take into account that it may not work with another broker for the same symbol even in tester.

Each symbol has its own pattern. The history of each symbol depends on the broker. When, like you, you get a paltry mathematical expectation, you have to realise that these features are affecting and very seriously. And complex mathematics can run into the Butterfly effect. When the underlying data is slightly different (a different broker or spread) kills or exalts the next mathematical model.

And you may have had the grail in your hands. But only you didn't know it was a grail not on the majors but on some GBPCHF. And not on Alpari, which you used to test, but on some FXCM. And you threw that grail away, not knowing that you held such a great mat model, but rejected it only because you did not know about GBPCHF and FXCM.

Reason: