Finding subset of least correlated time series from a set of time series
Finding subset of least correlated time series from a set of time series
Loading saved threads...
Rocco · External communityPost link
External question — Cross Validated Stack Exchange
Author: Rocco
Original post: https://stats.stackexchange.com/questions/669061
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I have got a set
$T = \{t_1, t_2, t_3, ...\}$
that contains some stock prices time series. I am trying to find a way to construct a new set
$S \subset T$
that satisfies the following characteristics:
Is of predefined size
$s < |T|$
The time series that compose
$S$
are "as little related as possible between them", meaning that as a group of time series the correlation of each one with the others is the lowest possible.
To build such a set i thought of the following algorithm:
Calculate the correlation coefficient between all pairs of time series in
$T$
, using something like the absolute of Pearson correlation, obtaining a correlation matrix similar to the following:
$t_i$
$t_{i+1}$
$...$
$t_i$
1
$abs(pearson(t_i, t_{i+1}))$
$...$
$t_{i+1}$
1
$...$
$...$
1
For every possible subset of
$T$
of size
$s$
, take the correlation coefficient for every pair of time series in this new subset and average them, obtaining a kind of "correlation index" (let's call it
$c$
) for the subset. If
$s = 3$
and the test subset is
$\{t_1, t_2, t_3\}$
then the correlation index would be
$c = (abs(pearson(t_1, t_2)) + abs(pearson(t_2, t_3)) + abs(pearson(t_3, t_1)))/3 $
Take the subset with the lowest
$c$
Now, i am not sure if this can work, because i read that stock prices must be pre-processed before attempting a correlation (
https://stats.stackexchange.com/a/554837/489630
) and i am generally unsure about the averaging of the Pearson coefficients. Is there a better way to do it? Any other things i should be aware of?
Clarification:
The time series are the sequence of closing prices of every trading day in a period of 2 years. If it helps, it is also possible to calculate a moving average to "smooth" the curves.
Quote
Report
Post Reply
Checking account access…