Machine learning in trading: theory, models, practice and algo-trading - page 2960
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
just like with a normal MO, we train and look at the track with one eye and the test with the other.
Here's the code for teaching the Rendom Forrest with AO tools,
fitness function (OUR OBJECTIVE) - to find a beautiful/stable profit growth, namely the maximum correlation between the balance sheet dynamics and a straight upward growth line
Here is the code of the profit and FF calculation functions
Here is the result, AO has found such a target for AMO that if we trade its signals we will get a beautiful profit growth
If it's not too much trouble, can you give me this example in python?
Rejects the dataset or skips those lines and doesn't factor them into the calculations?
And the same with + - INFINITY numbers?
There is no way to trade arbitrage there, if they are not initially cointegrated. You can only find pieces by time, where there are such moments. And what's the point of distorting symbol quotes, you can't open trades on them
I'm just showing by example that not everything can be expressed through a ready-made target.
Well, you get a random markup, which is then checked on new data. It is necessary to select the best markup variants through the same genetics. But this means hundreds and thousands of retraining of models.
So this is exactly what is being done, I did not want to complicate the example, I want a minimum of code, maximum clarity.
If it is not difficult, can you give this example in python?
as soon as I learn to write in python, I will translate it at once))))
Does anyone know what MO usually does with non NAN numbers?
Rejects the dataset or skips these strings and doesn't take them into account in calculations?
And the same with + - INFINITY numbers?
That's a strange question, it all depends on the specific implementation of AMO
If it's not too much trouble, can you give this example in python?
choose some good python library with AO, learn how to work with it and you will understand at once what you need to do.
Does anyone know what MO usually does with non NAN numbers?
Rejects the dataset or skips these strings and doesn't take them into account in calculations?
And the same with + - INFINITY numbers?
R usually has a na.action argument that defines what to do with them. I have always tried to avoid the need to use it (when preparing data), so I don't really understand the correct way.
R usually has a na.action argument that defines what to do with them. I have always tried to avoid the need to use it (when preparing data), so I don't really understand the correct way.
Thanks!!! Have read and considered other people's experience of working with this.
I think it's better to drop a column if it has a NAN in it.
In my case, just 1 column contained several hundred NANs and INFs. Something went wrong with the creation of the fiche.
Throwing out rows, I think, is wrong, because they can be used in other fiches to the benefit of the overall result.
Thanks! Have read and considered other people's experiences working with this.
I think it's better to drop a column if it has NANs in it.
In my case, just 1 column contained several hundred NANs and INFs. Something screwed up with the creation of the fiche.
Throwing out rows, I think, is wrong, as they can be used in other fiches to the benefit of the overall result.
You can interpolate or substitute with the mean
Substitution by the mean was used in statistics when there was simply no data, then the mean was substituted. They used NAN as a lack or omission of data - they needed to mark this moment somehow - they decided to use NAN for this purpose with subsequent replacement by the mean.
I have NAN - there is an error in data preparation and I get for example after /0 (but sometimes I get + - INF). I don't need to consider erroneous data as normal or even average.
Errors should be corrected (I print out that the column contains NAN and is missing). Although who reads these printouts...? )))
Substitution by the mean was used in statistics when there was simply no data, then the mean was substituted. They used NAN as a lack or omission of data - they needed to mark this moment somehow - they decided to use NAN for this purpose with subsequent replacement by the mean.
I have NAN - there is an error in the preparation of data and I get for example after /0 (but sometimes I get + - INF). I don't need to consider erroneous data as normal or even average.
Errors should be corrected (I print out that the column contains NAN and is missing). Although who reads these printouts...? )))
Well, then there's nothing to ask, what can you do but throw it away?
Just in case, an example of replacing NANs, since I've already written an example.
and solution