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

 
Maxim Dmitrievsky #:

Or maybe they do that on purpose because real information about open poses would help trading profitably? )

They have nothing to do with trading, they're just retractors...
And DCs give their data with small delays, which is enough to make it impossible to make money on it head-on.
 
Forester #:

Apparently your MO has learnt to trade back to the mean. Cheap - buy, expensive - sell.

Another experiment

We train the model to understand in what state of the zigzag we are in, falling or rising. We do not predict anything, real recognition.

Target = "ZZ is now falling or rising".

Signs = normalised prices in a window of 10.

Data = million m5 euros.

Train = 50k


Calculate capital gains WITHOUT commissions.

To the left of the vertical blue line is the treyne.


It's clear, the model has been trained well, but on new data it fails (as usual).





Now let's reverse the signals and trade in reverse.

trade in reverse (instead of buy-sell instead of sell-buy).


GRRAAL? ))


code below.

library(randomForest)
d <- file.choose() |> read.csv(sep = "", check.names = FALSE)

X <- d$`<CLOSE>` |> rollapplyr(width=10, \(x) x[10]-x, by.column = FALSE)
Y <- d$`<CLOSE>` |> ZigZag(percent = FALSE, change = 0.001) |> diff() |> sign() |> append(0,0) |> tail(nrow(X)) |> as.factor()
close <- d$`<CLOSE>` |> tail(nrow(X))

tr <- 100:50000
rf_pred <- randomForest(Y[tr]~., X[tr,], ntree=100) |> predict(X) |> as.character() |> as.numeric()

count_balance <- function(prices, signal) c(0,diff(prices) * signal[-length(signal)]) |> cumsum()

bal <- count_balance(close, rf_pred/-1)

par(mar=c(2,2,2,2))
plot(bal, t="l", main="РЕВЕРС СИГНАЛОВ торговли модели")
abline(v=50000, col=4, lty=2)
abline(h=0, col=2)



By the way on synthetic prices the effect is identical, who can explain this effect? Is it somehow related to the trend in the data?


 
mytarmailS #:

Another experiment

We train the model to understand in what state of the zigzag we are in, whether it is falling or rising. We are not predicting anything, real recognition.

Target = "ZZ is falling or rising".

Signs = normalised prices in a window of 10.

Data = million m5 euros

Train = 50k


Calculate capital gains WITHOUT commissions.

To the left of the vertical blue line is Train.


It is clear, the model has been trained well, but on the new data it fails (as usual).





Now, let's turn the signals over and we'll be

trade in reverse (instead of buy-sell-sell-sell-buy)


GRRAAL? ))


code below



By the way on synthetic prices the effect is identical, who can explain this effect? Is it somehow related to the trend in the data?


I'm only training with valving forwards. Train is 10 or more times more than test. The results are either a drain like yours or horizontal chatter. With commission.
Why you waste your time on tests without commission is unclear. In reality, there will be one. And you have to add slippages, etc.
 
I trained with third-party software WITHOUT SPREAD on M1 (or M5, I don't remember)

Result 400 000 fucking pips of profit

When you switch on spread - dive.



That is, neuronka is able to follow the price and win pips, but why they lie at the level of spread and commission - it is not clear.
 
Forester #:
I only teach valking forward. Train more than the test by a factor of 10 or more. The results are either a drain like yours, or horizontal chatter. With commission.
Why you waste your time on tests without commission is unclear. In reality, there will be one. And you have to add slippages, etc.

You missed the point of the example and lost the context of the conversation.... commission and wolf forward have nothing to do with it.

 
Ivan Butko #:
I trained with third-party software WITHOUT SPREAD on M1 (or M5, I don't remember)

Result 400 000 fucking pips of profit

When you switch on spread - dive.



That is, neuronka is able to follow the price and win pips, but why they lie at the level of spread and commission - it is not clear.

I explain it by the fact that on small TFs there is a small average rate of profit on each trade - a few pips. And NS averages (approximates) everything, i.e. trades do not cover spread/commission/slippages after training. You can try to calibrate the model and use only high probabilities.

But there is a better way - train NS on hours, take signals from them, and trade on small TFs, add trades artificially on each bar, average positions. There will be a lot of trades too.

If you hate hour bars, you can take the same zigzag by ticks. Or build some of your own bars. You can use renko or anything else, it makes no difference at all.
 
Maxim Dmitrievsky #:

I attribute this to the fact that the small TFs have a small average rate of return per trade - a few pips.

This is consistent with the fact that all known NS in the market have a short stop.

I have never seen an NS trained on the classic approach TP:Sl 3:1

 
Maxim Dmitrievsky #:

I attribute this to the fact that the small TFs have a small average rate of return per trade - a few pips.

This is consistent with the fact that all known NS in the market have a short takeout.

I have never seen an NS trained on the classic approach TP:Sl 3: 1

 
Ivan Butko #:

This is consistent with the fact that all known NS in the market have a short takeout.

I have never seen an NS trained on the classic TP:Sl 3: 1approach .

This is also why. I have trained NS to trade arbitrage. The results were worse than simple logic ahead of one of the instruments. The reason is the same averaging (approximation). This trick is not obvious, but in practice you constantly face it.
 
Ivan Butko #:

This is consistent with the fact that all known NS in the market have a short takeout.

I have never seen an NS trained on the classic TP:Sl 3: 1approach .

When you make a long takeout, you reduce the sample, which is also a negative factor.

Of course, a very short takeout is a story about moving by inertia for a little more.

And at the market people want a lot of money at once, so an Expert Advisor with a small number of trades is not interesting.