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

 
elibrarius:

The column is taken as follows

LearnY<-MatrixLearnY[,i]

Where i is the column number. I.e. all rows and the i-th column. And if so MatrixLearnY[j,] - it takes the jth row and all the columns in it

I'm thinking of writing a script and a question, how can I organize a loop to be able to run through the whole table and compare it with the output? Thank you!

 
y<-Qwe[,78]
for(i in 1:77)
{
x<-Qwe[,i]
z<-mutinformation(x,y)
Qwe[45,i]<-z

}

This is the script I wrote, but I don't know how to execute it..... Is it correct at all????

 
Mihail Marchukajtes:

I'm thinking of writing a script and immediately a question, how to organize a loop, so you can run through the whole table and compare it with the output? Thank you!

Something like this

n_targ=ncol(MatrixLearnY);

target<-MatrixLearnY[,n_targ];

n_cols =ncol(MatrixLearnY) - 1; # -1 последний столбец не брать

for(i in 1:n_cols){#перебор - столбцов
        colN<-MatrixLearnY[,i];#выбрать  искомый столбец

# ..... операции со столбцами

}
 
Mihail Marchukajtes:
y<-Qwe[,78]
for(i in 1:77)
{
x<-Qwe[,i]
z<-mutinformation(x,y)
Qwe[45,i]<-z

}

This is the script I wrote, but I don't know how to execute it..... Is it correct at all????

The code is the same as in my example, only I have the last column by itself).
Execute directly in Rgui.exe or in Rstudio (or in Rterm.exe - when you connect to it from the terminal)
 
Renat Akhtyamov:

It doesn't depend on time

Dependence, naturally irrelevant, of course there is, and it is:

People trade the standard way - against the trend - with a net, against the trend - with one order (when you're in the plus, that is).

I found out after observing forex trading volumes at the Chicago Board of Trade

The price goes strictly following the alignment of volumes, hence the wave.

Very interesting.

 
Hmm... It's interesting, but how to take not the entire column, but only its first 40 rows??? Let's say I need column number 10 from rows 1 to 40?
 
Aleksey Terentev:

About the time. IMHO:

The question of using time as a parameter is worth considering. There are definitely correlations between volatility and the time of day, day of the week, quarters, and some dates in the year. These temporal "anomalies" are visible to the untrained eye on the charts.

By the way, by using the window method, you are indirectly using a time parameter. By using derivatives, etc., you are indirectly using a time parameter. You could go on for a long time.

Another question, what conclusions can be drawn from the above? At least that at some points in time you should expect some changes.

Clearly, it is difficult to deduce any pattern in mathematical terms from observations of temporal "anomalies." But that is why we are discussing machine learning here, not to derive complex algorithms, but to put it all on the shoulders of computational resources.

I'll also add: time is cyclical, wavelike, and also fractal - minutes in hours, hours in days; day - night; lunar activity; week numbers in the year; rhythms of nations and countries; cyclical trends; the transience of events.
You may spit, but how can you claim, not knowing the more complex (or invisible to the eye) cause-and-effect relation, that there is no influence of time on asset's value.

Okay, let's look at it this way: on Thursday at 11-45 there was a 50pp movement on the pair in a time of 45 minutes. How can we use this next Thursday?

 
Vizard_:

Misha, don't be a cheeky bastard)))

x[1:40,10]

Yeah, yeah... I already guessed that... All in all, thank you all, I'm getting pretty damn good at R.... The important thing is to understand the syntax....

 
Vizard_:

I didn't look at the data. Looked at the number of lines, hucked and closed. Now I looked... I'm crying)))

setwd("E:/1_Models")

x <- read.csv2("Qwe.txt", head=T)

boxplot(x)


Explain.....

 

In the rigid formulation of the law of causality that says, "If we know the present precisely, we can calculate the future," it is not the second part but the premise that is false. We fundamentally cannot know the present in all its details.

I suppose Alexander_K2-you just have to know this quote).