calculating correlation of a Supply/Demand measure and price change (in high frequency time series data)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

calculating correlation of a Supply/Demand measure and price change (in high frequency time series data)

Ken Spriggs
Regarding "financial" data:  I have a high frequency (1 minute) measure of
supply/demand and I'd like to know if it has any influence on short term
price changes (also 1 minute).

Question: How do I calculate the correlation between this supply/demand
measure and price changes (correctly)?

Some facts about that data:
The price changes and supply/demand measure are non-normal. An assumption of
stationarity in either measure is certainly questionable. There is
non-homogeneity in variance in both measures.

In R there are 3 methods used with the cor() function, "pearson", "kendall",
"spearman". Can any of these be used without a gross violation of the
assumptions?

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: calculating correlation of a Supply/Demand measure and price change (in high frequency time series data)

Uwe Ligges


Kenneth Spriggs wrote:
> Regarding "financial" data:  I have a high frequency (1 minute)

I never understand people from economics, that 1 minute *high* frequency
sampling is roughly 2500000 times less frequent than things I am
analyzing. ;-)

 > measure of

> supply/demand and I'd like to know if it has any influence on short term
> price changes (also 1 minute).
>
> Question: How do I calculate the correlation between this supply/demand
> measure and price changes (correctly)?
>
> Some facts about that data:
> The price changes and supply/demand measure are non-normal. An assumption of
> stationarity in either measure is certainly questionable. There is
> non-homogeneity in variance in both measures.
>
> In R there are 3 methods used with the cor() function, "pearson", "kendall",
> "spearman". Can any of these be used without a gross violation of the
> assumptions?

If you need a "robust" version of a corelation  measure, choose Kendall
or Spearman, otherwise going with Pearson should be fine in most cases.

Anyway, I'd propose to look at ?acf. You certainly expect some delay
between your measures, hence you want to look at autocorrelations at
different time lags.

Uwe Ligges


> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: calculating correlation of a Supply/Demand measure and price change (in high frequency time series data)

A.R. Criswell
In reply to this post by Ken Spriggs
Wow... Some people can really be high frequency snobs!

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.