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

 
Vladimir Perervenko:

The fitness function calculates the value of the optimization criterion during the optimization process. It has nothing to do with model training.

But in the same regression we have a target in the form of some numeric vector and we try to approximate it by vector from the model, those minimize error (those are also optimization) ? or search for correct weights of neurons

Here's what I'm doing now, I'm also creating a model out of harmonics, as it were

 
mytarmailS:

In the fitness function I inserted a new function to calculate the balance and taking into account the commission ...

it's getting worse, ......

maybe a validation should be added, to keep it classic

 
Maxim Dmitrievsky:

We need to spar multiclass catbust in the metaq to add "do not trade"

The range of strategies will increase.

It would be awesome if you do!

 
Aleksey Vyazmikin:

It would be awesome if you do!

you can use two differently oriented models

 
Maxim Dmitrievsky:

We need to spar multiclass catbust in the metaq to add "do not trade"

The range of strategies will increase

When marking it up, here.

....
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)
.....

change it to e.g.

rand = random.randint(min, max)
        if dataset['close'][i] - (dataset['close'][i + rand])>= 2*spred:
            labels.append(-1.0)
        elif dataset['close'][i] - (dataset['close'][i + rand])<= -2*spred:
            labels.append(1.0)              
        else:
            labels.append(0.0)

I.e. if the delta is less than some value, on the fence.

 
mytarmailS:

But in the same regression we have a target in the form of a numeric vector and we try to approximate it by a vector from the model, those minimize the error (those are also optimization) ? or search for the correct weights of neurons

What I'm doing now, I'm essentially creating a model out of harmonics.

Of course it's optimization, but this optimization is done by a regression model.

 
mytarmailS:

I have inserted a new function in the fitness function to calculate the balance and take into account the commission...

I think that now the algorithm is trying to minimize the number of deals to save the commission... As a result, fewer trades result in less experience...

Here are the charts, you can see that when there are few trades in training, then the training is not working ...

in gray, this is the TRAIN 1500 pips

the black is the 500-point TEST.

This was a few trades, the algo did not learn anything, very infrequent ...


It's nice to know my entry points two days ahead of time.)

But it's probably better to retrain constantly, I do not know how to test it all

How do you test it?

Where is the code for synthesizing the overall curve? I think I've seen it, but I can't find it now.

 
Vladimir Perervenko:

Of course optimization, but this optimization is done by the regression model.

then i don't get it((( why then can't the fitness fun. be built there?

 
mytarmailS:

Then I don't get it((( why then can't the fitness fun. be built in there?

Where in there?

 
Vladimir Perervenko:

Where is the code for synthesizing the summary curve? I think I saw it, but now I can't find it.

I deleted it, thought no one is interested, I can send you the code, but you need to translate it into a readable form

By the way, I faced the instability of the annealing method, I don't even know how to work with it, the results are very unstable, parameters jump a lot...


I've come to the following way

First I randomly initialize the starting point,

then when some solution is found I save it

Once again I save it, but with startup parameters from a solution I've found, so on and so forth...

Reason: