I am looking at the variance of (log) price changes in securities vs. the amount of social media discussion about them. I'm not interested in building a model. I'm just looking to see if there is a significant correlation.

Suppose the social media is represented by a numeric variable “sm”. All the series I'm working with are weakly stationary. The distribution of the price data is as one would expect: normal with fat tails. The basic stats of a typical set of “sm” observations, however, are:

nobs          240.000000
NAs             0.000000
Minimum         0.000000
Maximum       725.000000
1. Quartile    52.000000
3. Quartile   119.250000
Mean           99.245833
Median         82.000000
Sum         23819.000000
SE Mean         5.573789
LCL Mean       88.265806
UCL Mean      110.225861
Variance     7456.110861
Stdev          86.348775
Skewness        3.428570
Kurtosis       17.793173

For price vs. “sm” contemporaneous, lag(1), and sometimes lag(2), the correlation is positive but small, about what I would expect. Because the distribution is not normal, I'm wondering if the cross-correlation matrix (ccf() function in R) provides a reasonable assessment of cross correlation (assuming linearity). I welcome any comments regarding how to interpret these results as well as any comments on best-practices.

  • $\begingroup$ I too am interested in this $\endgroup$
    – jtromans
    Nov 13, 2013 at 13:44
  • $\begingroup$ A comment I have to make: You write: "normal with fat tails". A normal/Gaussian distribution does not have fat tails. So in fact it is a fat tailed distribution, I guess. Could be modelled using a t-distribution (as a first attempt). Better approaches do exist but are off-topic to your question. $\endgroup$
    – Richi Wa
    Nov 14, 2013 at 13:02
  • $\begingroup$ You write "Because the distribution is not normal, I'm wondering if the cross-correlation matrix" - how could normality imply anything about cross-correlation? $\endgroup$
    – Richi Wa
    Nov 14, 2013 at 13:04
  • $\begingroup$ Well, if the cross-correlation function scales by the variance and I'm unsure whether my sample variance is reasonable given the funky distribution of observations....Yes, you'll find the definition of "funky distribution" right next to “normal with fat tails”. $\endgroup$
    – SCallan
    Nov 14, 2013 at 22:36

1 Answer 1


You could use

rcorr(x, y, type=c("pearson","spearman"))


# Correlations with significance levels
rcorr(x, type="pearson") # type can be pearson or spearman

from the Hmisc package. It gives asymptotic p-values.

  • $\begingroup$ Thanks, user2964219, for your suggestion. I checked out rcorr() and the asymptotic P-values provide some additional color. A lot of people look at the correlations between asset price data & other numerical time series. While there is a lot academic work in the field, I'm looking for guidance from practitioners. I'm wondering about the if, how & when practitioners take into account the distribution of observations in their data set. I think the example above is interesting because while the number of observations is fine, the skewness and excess kurtosis are notable. $\endgroup$
    – SCallan
    Nov 14, 2013 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.