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

 
elibrarius #:
And which of the 100 predicted lines to make a prediction on? Average is the most obvious solution.
Well, let's say 50 forecasts up 50 down, averaged, got a horizontal forecast, and so what?)))
 
mytarmailS #:
Well, let's say 50 forecasts up 50 down, averaged, got a horizontal forecast, and so what?)))
and that's it... What are your options?
 
elibrarius #:
and that's it. What are your options?
Well, like the one I suggested above
 
elibrarius #:
And which of the 100 predicted lines to make a prediction on?
I didn't see a suggestion)
 

A variant of "informative" markup, a pen test:

def labeling_entropy(dataset, min_Mi = 0.1, min=15, max=15):
    labels = []
    MIs = []
    for i in range(max, dataset.shape[0]-max*2):
        rand = random.randint(min, max)
        curr_pr = dataset['close'][i]
        future_pr = dataset['close'][i + rand]
        full_pr = dataset[i-rand:i+rand]

        mi = mutual_info_regression(full_pr[full_pr.columns[1:]].iloc[0:rand], full_pr[full_pr.columns[0]].iloc[rand:rand*2])
        MIs.append(mi.mean())

        if future_pr + MARKUP < curr_pr and mi.mean() > min_Mi:
            labels.append(1.0)
        elif future_pr - MARKUP > curr_pr and mi.mean() > min_Mi:
            labels.append(0.0)
        else:
            labels.append(2.0)
    
    dataset = dataset.iloc[max:]
    dataset = dataset.iloc[:len(labels)].copy()
    dataset['labels'] = labels
    return dataset.dropna(), MIs

We take a set of signs and mark up labels as in my articles, but taking into account the mutual information (regression type) between n-strings of the set of signs before opening a trade and n-strings of future prices.

If the mutual information is below the threshold, we mark as not to trade.

then trained 2 models on signals and on trade/don't trade, starting in 2019

Res:

Nothing much was gained by this approach

 
elibrarius #:
Didn't see the suggestion)
Well, re-read my post, the last picture.
It still says
 

The logical thing to do was to try other options:

mi = mutual_info_regression(full_pr[full_pr.columns[1:]].iloc[0:rand], full_pr[full_pr.columns[0]].iloc[0:rand]) сравниваем фичи и цены в момент предсказания
mi = mutual_info_regression(full_pr[full_pr.columns[1:]].iloc[0:rand*2], full_pr[full_pr.columns[0]].iloc[0:rand*2]) сравниваем на глубину предсказания вперед + назад
mi = mutual_info_regression(full_pr[full_pr.columns[1:]].iloc[rand:rand*2], full_pr[full_pr.columns[0]].iloc[rand:rand*2]) только вперед
mi = mutual_info_regression(full_pr.iloc[0:rand], full_pr[full_pr.columns[0]].iloc[rand:rand*2])текущие цены и фичи в момент предсказания VS будущие цены

all the options don't produce anything

 
mytarmailS #:
Well, re-read my post, the last picture.
It's still written

There were only 2 variants up on the first 25 bars. And 2 errors are a small error.
And this is only 1 variant of the chart out of thousands, which happened to catch your eye. The situation will be different in others. You need to make a strategy (which you have not formulated) and watch the balance line on new data (Maxim brought his idea to the end and everything became clear at once).
 
I did the same thing with clustering more than a year ago, then I determined average levels as in the pictures and placed orders from them. Divided into 3 clusters up, down, mean reversion. It works great on training.
The funny thing is that no matter what special means you use, you can't get anything good out of random
 
Maxim Dmitrievsky #:
I did the same thing with clustering more than a year ago, then I determined average levels as in the pictures and placed orders from them. Divided into 3 clusters up, down, mean reversion. It works great on training.
The funny thing is that no matter what special means you use, you can't get anything good out of random

Yeah. Apparently you can't get anything out of prices. There's nothing else. There are also volumes on the stock exchange.
Apparently, FA is the only thing that can give something. And it's probably better to do it manually. But even there you can be mistaken, fake news are actively working.

Reason: