Correlation, allocation in a portfolio. Calculation methods - page 5

 
Aleksey Nikolayev:
There is a problem with the trivial correlation calculation. Because of the non-stationarity inherent in price increments, it gives wrong (often inflated) results. That is why econometrics usually takes the difficult route of constructing an autoregressive model for the series.
Could you please explain the question in more detail in a PM?
 
CHINGIZ MUSTAFAEV:
Could you please elaborate on the question in a private message?

Here is a simple example of this effect. I'm not ready to describe how to deal with it in general terms, since it is essentially an econometrics course)

Let's generate four independent samples of the same length with different expected payoffs - the first two have zero and the rest have one. All pairwise correlations are expected to be close to zero. Now let's make two samples of them, one of the first and the third, and one of the second and the fourth. They are, of course, independent and hence not correlated, but the sample correlation is noticeably greater than zero. The code on R and its result:

n <- 1000
v1 <- rnorm(n, mean = 0, sd = 1)
v2 <- rnorm(n, mean = 0, sd = 1)
v3 <- rnorm(n, mean = 1, sd = 1)
v4 <- rnorm(n, mean = 1, sd = 1)

v5 <- c(v1, v3)
v6 <- c(v2, v4)

print(cor(v1, v2))
print(cor(v3, v4))
print(cor(v5, v6))

0.01907343
0.01391064
0.2173542
 
Aleksey Nikolayev:

Here is a simple example of this effect. I'm not ready to describe how to deal with it in general terms, since it is essentially an econometrics course)

Let's generate four independent samples of the same length with different expected payoffs - the first two have zero and the rest have one. All pairwise correlations are expected to be close to zero. Now let's make two samples of them, one of the first and the third, and one of the second and the fourth. They are, of course, independent and hence not correlated, but the sample correlation is noticeably greater than zero. The code on R and its result:

Isn't that done in the RNG?
 
CHINGIZ MUSTAFAEV:
Isn't it done in RNG?

More like PRNG, but you can connect to a quantum RNG if you want).

Yes, the rnorm() function in R generates a normally distributed independent sample with specified parameters.

 
CHINGIZ MUSTAFAEV:
Answer the question, or go on to the other threads.
I don't know what you're counting, but it doesn't seem right.
That's what the post was about.
And your answer smells like rose-tinted glasses.
After all, the 100% correlating pairs you have are off the table.
The pairs are pre-synchronized, I hope?
 
Aleksey Nikolayev:

More like PRNG, but you can connect to a quantum RNG if you want).

Yes, rnorm() function in R generates normally distributed independent sample with given parameters.

very-very picky: do they subtract/use entropy ? the technical process (function) which takes unpleasantly long time. it (entropy) slowly accumulates, and without it anything is not crypto-resistant

about mixing - what result was expected ? it seems to me that even in theory partial correlation will be obligatory.

 
Maxim Kuznetsov:

very-very picky: do they read/use entropy? the process (function) takes an unpleasantly long time. it (entropy) accumulates slowly, and without it things are not crypto-proof.

about mixing - what result was expected ? it seems to me that even in theory partial correlation will be obligatory.

There is some package in R that allows you to connect to a quantum computer and take true SF. Somewhere on the forum I already posted them for your namesake) For PRNG in R you can choose from a bunch of algorithms (you can read the help), but I didn't really get into the question.

Correlation and selective correlation are very different things. For example, correlation may well be nonexistent, while sample correlation can be calculated for almost any sample. The problem is a total misunderstanding of the simple fact that sample correlation is not the definition of correlation (but only an estimate of it, not always accurate).

 
Aleksey Nikolayev:

There is some package in R that allows you to connect to a quantum computer and take true SFs. Somewhere on the forum I already posted them for your namesake) For PRNG in R you can choose from a bunch of algorithms (you can read the help), but I didn't really get into the question.

Correlation and selective correlation are very different things. For example, correlation may well be nonexistent, while sample correlation can be calculated for almost any sample. The problem is a total misunderstanding of the simple fact that sample correlation is not the definition of correlation (but only an estimate of it, not always accurate).

Gsc used to estimate it by plotting the distribution of the number of identical generated counts. The flatter the line, logically the better. Took a few million generations. And you can clearly see everything. Usually the same algorithm gives a copy of the distribution all the time, no matter how supposedly random it is.
 
Renat Akhtyamov:
Gsc was usually estimated by plotting a distribution of the number of identical generated ss. The flatter the line, logically the better. Took several million generations. And you can clearly see everything. Usually the same algorithm gives a copy of the distribution all the time, no matter how supposedly random it is.

A typical example of how human intuition does not work well in theoretical problems. The probability of there being coincidences is very high (the paradox of birthdays)

 
Aleksey Nikolayev:

There is some package in R that allows you to connect to a quantum computer and take true SFs. Somewhere on the forum I already posted them for your namesake) For PRNG in R you can choose from a bunch of algorithms (you can read the help), but I didn't really get into the question.

Correlation and selective correlation are very different things. For example, correlation may well be nonexistent, while sample correlation can be calculated for almost any sample. The problem is a total misunderstanding of the simple fact that sample correlation is not the definition of correlation (but only an estimate of it, not always accurate).

so how much did science dare to say ? what exactly is the result unsatisfactory.

Reason: