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

 
Come on.!!!!!!!!!! It's a new year! What a way to start.
 
mytarmailS #:
Come on.!!!!!!!!!! It's a new year! And this is where you start?!

And I'm in favour of machine learning in the new year to be profitable for the dreamers and not a disappointment for the followers).

 
Aleksey Nikolayev #:

I understand that we need to distinguish more carefully between the length of columns and the number of columns. The former is equivalent to the number of rows, the latter to the length of rows)

Although, with different row lengths, the concept of columns becomes somewhat blurred - instead of a rectangular table (dataframe), the concept of a list of rows becomes relevant.

PS. I also suggested for simplicity to limit ourselves to the case when all signs are only prices on the previous section (with different length)

Alexey, I think you know, but maybe not, so I will show you how algorithms that take variable length sheets/vectors as input work.


We have a sheet with vectors of variable length, one vector == one observation.

li <- list()
 for(i in 1:10) li[[i]] <- LETTERS[sample(1:26,sample(1:10),replace = F)]
 li
[[1]]
[1] "B" "W" "C"

[[2]]
[1] "J" "F" "C" "M" "Y" "W"

[[3]]
[1] "M" "L" "F" "U" "P" "C" "Q" "A"

[[4]]
[1] "B" "R" "U" "I" "N" "J" "Y"

[[5]]
[1] "P" "Y" "D" "R" "C" "W"

[[6]]
[1] "V" "O" "D"

[[7]]
[1] "Y" "X" "M" "H"

[[8]]
[1] "J" "P" "Y" "Z" "N" "O"

[[9]]
[1] "R" "A" "G" "H" "J" "Y"

[[10]]
[1] "I"

What does the model, the algorithm "under the bonnet" do when it accepts such data? It turns it into a matrix.

library(qdapTools)
 dt <- as.matrix(mtabulate(li))
 dt
      A B C D F G H I J L M N O P Q R U V W X Y Z
 [1,] 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
 [2,] 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0
 [3,] 1 0 1 0 1 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 0 0
 [4,] 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 1 1 0 0 0 1 0
 [5,] 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0
 [6,] 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0
 [7,] 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0
 [8,] 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 1
 [9,] 1 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0
[10,] 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

But since the matrix is huge for real data, the algorithm turns the data into a memory-efficient sparse matrix.

library(Matrix)
 dt2 <- as(dt, "dgCMatrix")  
 dt2
10 x 22 sparse Matrix of class "dgCMatrix"

                                                 
 [1,] . 1 1 . . . . . . . . . . . . . . . 1 . . .
 [2,] . . 1 . 1 . . . 1 . 1 . . . . . . . 1 . 1 .
 [3,] 1 . 1 . 1 . . . . 1 1 . . 1 1 . 1 . . . . .
 [4,] . 1 . . . . . 1 1 . . 1 . . . 1 1 . . . 1 .
 [5,] . . 1 1 . . . . . . . . . 1 . 1 . . 1 . 1 .
 [6,] . . . 1 . . . . . . . . 1 . . . . 1 . . . .
 [7,] . . . . . . 1 . . . 1 . . . . . . . . 1 1 .
 [8,] . . . . . . . . 1 . . 1 1 1 . . . . . . 1 1
 [9,] 1 . . . . 1 1 . 1 . . . . . . 1 . . . . 1 .
[10,] . . . . . . . 1 . . . . . . . . . . . . . .

So it's still a matrix under the bonnet.) (careful data)


 object.size(li)
426456 bytes
 object.size(dt)
106104 bytes
object.size(dt2)
70336 bytes
 
Maxim Dmitrievsky #:
You'd have shut up a long time ago if you'd been a bit smarter

Hi Maxim!

Sorry about the spam and insults.

Won't happen again.

 
Alexander Ivanov #:

Hi Maxim!

Sorry for the spam and insults.

Won't happen again.

What's it got to do with you? 😀 I'm just weeding out the 50 centers from the thread. But they live like bedbugs because they're brainless
 
Uladzimir Izerski #:

And I'm all for machine learning in the new year to be profitable for the dreamers and not a disappointment for the followers).

We're all for it, it's just that sometimes it's just one or the other or a few at a time.

 
mytarmailS #:

We're all for it, it's just that sometimes one or the other or a few at a time.

It's interesting that everyone follows a ready-made path, even if it's false, and doesn't want to think with their own head.

Apparently, the new generation already thinks that everything has been invented before them and there is no need to think. ))

I can show for Maksimka the input with neural network without training.

No one will suspect me of forgery today because the markets are already closed and prices are real according to the server.

If Maksimka shows a better result with MO, I will clap my hands and say that I was wrong)).

a666
 
Uladzimir Izerski #:

It's interesting that everyone follows the ready-made path, even if it's false, rather than wanting to think with their own head.

Apparently, the new generation already thinks that everything has been invented before them and there is no need to think. ))

I can show for Maximka the input with neural network without training.

No one will suspect me of forgery today because the markets are already closed and prices are real according to the server.

If Maksimka shows a better result with MO, I will clap my hands and say that I was wrong)).

Great entry, I am more and more inclined to think that the degree of understanding of the market by a trader is measured by the size of his stop, the smaller the stop, the greater the understanding

I posted mine too, , also eurus, also 1m :)


neural network without training, how is it?

 
mytarmailS #:

Great entry, I'm more and more inclined to think that the degree of understanding of the market by a trader is the size of his stop, the smaller the stop is, the more understanding there is

I've posted mine too, also eurus, also 1m :)

But I have trouble with psychology, half a day I earn, half I lose, but that's another story, maybe I just don't want to trade with my hands....


neural network without training, how is it?

I want to tell you, but it may affect my results in the future.

I can only advise you not to follow the path of false prophets, but to think with your own head.

Maybe I am a false prophet, too))))

 
Uladzimir Izerski #:

I can only advise you not to follow the path of false prophets.

I do.
Reason: