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

 
Maxim Dmitrievsky:

I read but don't understand


Creating training labels (random sampling)

Training examples are sets of features (or tokens) and corresponding labels. The output of the model should be some information, which it should learn to predict. We will consider the case of binary classification, the model will predict the probability of assigning the training example to class 0 or 1. It follows logically that zeros and ones can be assigned transaction directions: buy or sell. In other words, the model must learn to predict the direction of a trade given the environment parameters (a set of attributes).

def add_labels(dataset, min, max):
    labels = []
    for i in range(dataset.shape[0]-max):
        rand = random.randint(min, max)
        if dataset['close'][i] >= (dataset['close'][i + rand]):
            labels.append(1.0)
        elif dataset['close'][i] <= (dataset['close'][i + rand]):
            labels.append(0.0)              
        else:
            labels.append(0.0)
    dataset = dataset.iloc[:len(labels)].copy()
    dataset['labels'] = labels
    dataset = dataset.dropna()
    return dataset



What is the essence of this randomization, what is it for? What does it give?

Why these random distances for the marks?
 
mytarmailS:

I read but don't understand


Creating training labels (random sampling)

Training examples are sets of features (or tokens) and their corresponding labels. The output of the model should be some information, which it should learn to predict. We will consider the case of binary classification, the model will predict the probability of assigning the training example to class 0 or 1. It follows logically that zeros and ones can be assigned transaction directions: buy or sell. In other words, the model must learn to predict the direction of a trade given the environment parameters (a set of attributes).



What is the essence of this randomization, what is it for? what does it give?

Why these random distances for the marks?

The prediction for n-bars ahead. When you don't know how long you should keep the deal. If you don't know what time it will take to keep the deal open, you may ask your question in the comments to the article.

 

You'd better get yourself a bottle of whiskey for your 1,000 cents... counselor )))

drowned himself... once again ))))

 
Maxim Dmitrievsky:

he'd better buy himself a bottle of whiskey for his 1,000 cents... you're a counselor )))

Go get it yourself.

I don't drink that stuff.

 
Renat Akhtyamov:

Go get it yourself on your demozit.

I don't drink that stuff.

Hide it, don't embarrass yourself. You proved it to everybody.

 
Maxim Dmitrievsky:

hide it, don't embarrass yourself. Already proved it to everyone.

None of your business.

 
Maxim Dmitrievsky:

You'd better get yourself a bottle of whiskey for your 1,000 cents... counselor )))

drowned himself... once again ))))

If the price behaved like a radio signal, then dwelling on it would be the perfect way to get out of a wrong trade.)

 
Aleksey Nikolayev:

If price behaved like a radio signal, then overbidding would be the perfect way to get out of a wrong trade)

Well said!

 
Aleksey Nikolayev:

If price behaved like a radio signal, then overbidding would be the perfect way out of a wrong trade)

It's simple, you have to accept the fact of wrong decisions and as the norm.

And if taking these decisions the final profit will be in the negative zone, then there is no need for any additional evidence that the chosen method is fundamentally wrong.

I think that all these overexposure has arisen because of forex, because forex is designed for beggars (I'm one of them)). For example, if you do not know anything about the real profit, you cannot afford to take a long position, especially if the position is loss-making.
Совершение сделок - Торговые операции - Справка по MetaTrader 5
Совершение сделок - Торговые операции - Справка по MetaTrader 5
  • www.metatrader5.com
Торговая деятельность в платформе связана с формированием и отсылкой рыночных и отложенных ордеров для исполнения брокером, а также с управлением текущими позициями путем их модификации или закрытия. Платформа позволяет удобно просматривать торговую историю на счете, настраивать оповещения о событиях на рынке и многое другое. Открытие позиций...
 
Aleksey Nikolayev:

If price behaved like a radio signal, then overbidding would be the perfect way to get out of a bad trade.)

The radio signal is not eternal) and it can be turned off)

Reason: