필터 지우기
필터 지우기

Simple correlation Question

조회 수: 1 (최근 30일)
Mate 2u
Mate 2u 2012년 3월 29일
Hi there. Here is my question.
Q) I have two time series of financial data. A = 1000 x 1 B = 1000 x 1
Now I want to find out the correlation of these at different frequencies.
So I want to test if A and all its lages is correlated with B and all its lags.
So I want to know for instance if the 5 minute price of A is correlated to the 2 minute price of B and etc etc....
I look forward to hearing a reply from you.

채택된 답변

Wayne King
Wayne King 2012년 3월 29일
xcorr()
crosscorr()
Be careful with the word "frequency", there is a frequency domain correlation called coherence, but what you are after sounds like xcorr() or crosscorr()
For example:
x = randn(1e3,1);
y = randn(1e3,1);
[xc,lags] = xcorr(y,x,'coeff');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by