由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - 怎样判断两个时间序列的相似度 (转载)
相关主题
[合集] 请教怎样估算股票的mu -- 就是mean rate of return?Re: 大马甲,你是数学phd.有用shit桶炒股吗:))???? (转载)
[合集] 多元Garch模型如何预测covariance和correlation?recruiter发给我一道面试模拟题,请大家说说用什么方法?谢谢大家了
[合集] GARCH and ARCH,ARIMA (转载)问一个Time Series的概念问题 (转载)
请问:Time Series 中常用的Model 有那几个呀保险精算的Predictive Modeler和银行的Risk Quant哪个好些? (转载)
GMARCH parameter estimationCipher Finance寻找Quant量化分析创业者(不是招工)!
除了Rsquare外还有什么可以判断regression模型的么?请教ARMA与impulse response的关系
Is Implied Volatility a good measure of future stock price???请问Quant方面关于Time Series的书
请教Time Series上的几个问题SV kalman filter parameter estimation
相关话题的讨论汇总
话题: 序列话题: granger话题: 相似话题: series话题: causality
进入Quant版参与讨论
1 (共1页)
s********k
发帖数: 6180
1
【 以下文字转载自 CS 讨论区 】
发信人: silverhawk (silverhawk), 信区: CS
标 题: 怎样判断两个时间序列的相似度
发信站: BBS 未名空间站 (Tue Apr 13 14:02:44 2010, 美东)
时间序列的见附件1,2,有红色蓝色两个flow,直观看蓝色flow2之间的相似度更高,
红色flow1的相似度低一些(相反,红色flow1和蓝色flow2)的相似度更高(这也是我
希望得到的结论)。但是用correlation算出来红色序列的correlation更高。可能是噪
声以及shift的原因,所以想请问下有没有比较好的方法判断时间序列的相似度,我用
了一些比如distance或者FFT的方法,但是得到的效果都不好。哪位高人给指点下应该
怎么做?
l******i
发帖数: 1404
2
统计专业的同学应该知道这方面成果是UCSD的Clive Granger的,叫做Granger Causality。
Granger causality test is a technique for determining whether one time series is useful in forecasting another.
比较两个时间序列的相似度只是Granger Causality的一个小应用。Granger Causality有成套的算法和程序,你不用自己想方法。
c*******o
发帖数: 1722
3
corr will definitely not do this type of time series. there is obvious
patten/trend in
the time series, which you want to get rid of before any statistics test.
i would suggest Fourier analysis first and do corr for the residues. or use
ar/garch
first and corr afterward.

【在 s********k 的大作中提到】
: 【 以下文字转载自 CS 讨论区 】
: 发信人: silverhawk (silverhawk), 信区: CS
: 标 题: 怎样判断两个时间序列的相似度
: 发信站: BBS 未名空间站 (Tue Apr 13 14:02:44 2010, 美东)
: 时间序列的见附件1,2,有红色蓝色两个flow,直观看蓝色flow2之间的相似度更高,
: 红色flow1的相似度低一些(相反,红色flow1和蓝色flow2)的相似度更高(这也是我
: 希望得到的结论)。但是用correlation算出来红色序列的correlation更高。可能是噪
: 声以及shift的原因,所以想请问下有没有比较好的方法判断时间序列的相似度,我用
: 了一些比如distance或者FFT的方法,但是得到的效果都不好。哪位高人给指点下应该
: 怎么做?

l******i
发帖数: 1404
4
我觉得楼主的意思是这两个时间序列的比较不依赖于任何模型,单纯比较,不能fit模型,没
有residual。

use

【在 c*******o 的大作中提到】
: corr will definitely not do this type of time series. there is obvious
: patten/trend in
: the time series, which you want to get rid of before any statistics test.
: i would suggest Fourier analysis first and do corr for the residues. or use
: ar/garch
: first and corr afterward.

s********k
发帖数: 6180
5
能详细点说吗,Fourier analysis 指的是做FFT之后然后分析吗还是什么?residues指
的是什么?我实际上也用了AR模型(简单的moving average),但是效果也不好,另外
garch是什么意思?

use

【在 c*******o 的大作中提到】
: corr will definitely not do this type of time series. there is obvious
: patten/trend in
: the time series, which you want to get rid of before any statistics test.
: i would suggest Fourier analysis first and do corr for the residues. or use
: ar/garch
: first and corr afterward.

s********k
发帖数: 6180
6
我想得到的结果是蓝色序列相似度高于红色序列的相似度,直观来看也是这样,但是用
correlation,或者moving average之后的correlation做出来的结果正好相反,所以想
找有没有更好数学表达能描述相似性。用distance来做蓝色序列相似性高一些,但是差
距不明显

模型,没

【在 l******i 的大作中提到】
: 我觉得楼主的意思是这两个时间序列的比较不依赖于任何模型,单纯比较,不能fit模型,没
: 有residual。
:
: use

s********k
发帖数: 6180
7
SSE做出来的结果应该跟distance做出来差不多吧?你说的减去期望我已经做了,实际
上我给出的图是nomalize之后的图(减期望除以方差),效果还是不好

后看SSE等等指标。
然后减去期望得到新的序列,平移后再看两序列的correlation是不是接近于1或者-1。

【在 l******i 的大作中提到】
: 我觉得楼主的意思是这两个时间序列的比较不依赖于任何模型,单纯比较,不能fit模型,没
: 有residual。
:
: use

z****g
发帖数: 1978
8
a1-a2, and test if it is independent noise series
z****g
发帖数: 1978
9
also, try var(a1-a2), var is a norm-like function
s********k
发帖数: 6180
10
怎么盘算是不是independent noise series?

【在 z****g 的大作中提到】
: a1-a2, and test if it is independent noise series
相关主题
除了Rsquare外还有什么可以判断regression模型的么?Re: 大马甲,你是数学phd.有用shit桶炒股吗:))???? (转载)
Is Implied Volatility a good measure of future stock price???recruiter发给我一道面试模拟题,请大家说说用什么方法?谢谢大家了
请教Time Series上的几个问题问一个Time Series的概念问题 (转载)
进入Quant版参与讨论
l******i
发帖数: 1404
11
统计专业的同学应该知道这方面成果是UCSD的Clive Granger的,叫做Granger
Causality。
Granger causality test is a technique for determining whether one time
series is useful in forecasting another.
比较两个时间序列的相似度只是Granger Causality的一个小应用。Granger Causality
有成套的算法和程序,你不用自己想方法。

【在 s********k 的大作中提到】
: 怎么盘算是不是independent noise series?
z****g
发帖数: 1978
12
many tests, just choose one.
The most intuitive way is just to fit a ARMA structure for the mean part
of the series. If there is no ARMA structure, basically it is independent.
If you want, you can also fit GARCH structure into the variance part,
however, variance part normally does not hurt.
A stationary ARMA structure basically means the two series is time
shifted.

【在 s********k 的大作中提到】
: 怎么盘算是不是independent noise series?
c*******o
发帖数: 1722
13
i kind of thinking that op is asking blue vs blue compared to red vs red.

a2相似吗?

【在 l******i 的大作中提到】
: 统计专业的同学应该知道这方面成果是UCSD的Clive Granger的,叫做Granger
: Causality。
: Granger causality test is a technique for determining whether one time
: series is useful in forecasting another.
: 比较两个时间序列的相似度只是Granger Causality的一个小应用。Granger Causality
: 有成套的算法和程序,你不用自己想方法。

z****g
发帖数: 1978
14
that depends on the definition of "similar". If the noise level is much
larger than the signal level, there is no way to tell.
When compare signal(something that is not stochastic), you compare the
shape. When compare noise(something that is stochastic), you compare the
distribution.

red.

【在 c*******o 的大作中提到】
: i kind of thinking that op is asking blue vs blue compared to red vs red.
:
: a2相似吗?

s********k
发帖数: 6180
15
正是这个意思

【在 c*******o 的大作中提到】
: i kind of thinking that op is asking blue vs blue compared to red vs red.
:
: a2相似吗?

s********k
发帖数: 6180
16
怎样定义“similar”确实是难,这个也是我问题的核心,我现在只能说从形状或者直
观看,不知道各位是不是直观上看也是两个蓝色序列之间相似度高于两个红色序列的相
似度。我是想找一种方法数学表述出来之后得到的也是同样的结果,但是现在用了几个
效果都不好

【在 z****g 的大作中提到】
: that depends on the definition of "similar". If the noise level is much
: larger than the signal level, there is no way to tell.
: When compare signal(something that is not stochastic), you compare the
: shape. When compare noise(something that is stochastic), you compare the
: distribution.
:
: red.

z****g
发帖数: 1978
17
Determine the nature of your series first. You can't mix the deterministic
part and stochastic part.

【在 s********k 的大作中提到】
: 怎样定义“similar”确实是难,这个也是我问题的核心,我现在只能说从形状或者直
: 观看,不知道各位是不是直观上看也是两个蓝色序列之间相似度高于两个红色序列的相
: 似度。我是想找一种方法数学表述出来之后得到的也是同样的结果,但是现在用了几个
: 效果都不好

l******i
发帖数: 1404
18
弄了半天是这个意思,那你直接fit seasonal ARIMA/GARCH model,对比t-statistic

【在 s********k 的大作中提到】
: 怎样定义“similar”确实是难,这个也是我问题的核心,我现在只能说从形状或者直
: 观看,不知道各位是不是直观上看也是两个蓝色序列之间相似度高于两个红色序列的相
: 似度。我是想找一种方法数学表述出来之后得到的也是同样的结果,但是现在用了几个
: 效果都不好

c*******o
发帖数: 1722
19
dude, told you.

statistic

【在 l******i 的大作中提到】
: 弄了半天是这个意思,那你直接fit seasonal ARIMA/GARCH model,对比t-statistic
s********k
发帖数: 6180
20
输入figure1的红蓝两个序列,经过一个系统,输出figure2里面红蓝两个序列,现在我
想得到的是红蓝两个序列的输入输出之间的相似性。这个算是deterministic不是
stochastic吧?

【在 z****g 的大作中提到】
: Determine the nature of your series first. You can't mix the deterministic
: part and stochastic part.

相关主题
保险精算的Predictive Modeler和银行的Risk Quant哪个好些? (转载)请问Quant方面关于Time Series的书
Cipher Finance寻找Quant量化分析创业者(不是招工)!SV kalman filter parameter estimation
请教ARMA与impulse response的关系有哪些continuous stochastic process具有autocorrelation?
进入Quant版参与讨论
z****g
发帖数: 1978
21
can't understand "蓝色flow2之间的相似度更高". Shouldn't you compare the blue
-flow with the red-flow?
s********k
发帖数: 6180
22
sorry, 可能我没有表述清楚,就是两个蓝色flow2之间有一个相似度s2,两个红色flow1
之间也有一个相似度s1,我想得到的结论是s2>s1(差距还比较大).

blue

【在 z****g 的大作中提到】
: can't understand "蓝色flow2之间的相似度更高". Shouldn't you compare the blue
: -flow with the red-flow?

g*****u
发帖数: 14294
23
FT is a good thought. Off the top of my head, the approach would likely work well
for signals (time series) with sharp dropoff in the frequency space. However
, the actual situation may not be always the case. Just a thought.

use

【在 c*******o 的大作中提到】
: corr will definitely not do this type of time series. there is obvious
: patten/trend in
: the time series, which you want to get rid of before any statistics test.
: i would suggest Fourier analysis first and do corr for the residues. or use
: ar/garch
: first and corr afterward.

z****g
发帖数: 1978
24
do you expect the same system produce the same output with the same input
if no noise is involved?
If yes, your problem is much easier.
Both the FFT and time series approach would have the same nature which is
the measure the energy of the noise the system adds into the output. In
time domain, variance of the noise give energy-kind measure, in frequency
domain, abs of coefficient give energy-kind measure.

flow1

【在 s********k 的大作中提到】
: sorry, 可能我没有表述清楚,就是两个蓝色flow2之间有一个相似度s2,两个红色flow1
: 之间也有一个相似度s1,我想得到的结论是s2>s1(差距还比较大).
:
: blue

s********k
发帖数: 6180
25
我希望得到的结果是flow2(蓝色)序列的输出主要决定于自己的输入(和少部分flow1
的输入),所以输入输出之间的相似性高。而flow1(红色)序列的输出主要决定于蓝
色序列的输入,它自己本身的输入输出之间的相似性低。可能是我FFT没做好,我会再
试一下。但是FFT也有一个问题,我希望能够实时判断,有没有更好的办法?谢谢

【在 z****g 的大作中提到】
: do you expect the same system produce the same output with the same input
: if no noise is involved?
: If yes, your problem is much easier.
: Both the FFT and time series approach would have the same nature which is
: the measure the energy of the noise the system adds into the output. In
: time domain, variance of the noise give energy-kind measure, in frequency
: domain, abs of coefficient give energy-kind measure.
:
: flow1

c******n
发帖数: 49
26
Any time shift between input and output?

flow1

【在 s********k 的大作中提到】
: 我希望得到的结果是flow2(蓝色)序列的输出主要决定于自己的输入(和少部分flow1
: 的输入),所以输入输出之间的相似性高。而flow1(红色)序列的输出主要决定于蓝
: 色序列的输入,它自己本身的输入输出之间的相似性低。可能是我FFT没做好,我会再
: 试一下。但是FFT也有一个问题,我希望能够实时判断,有没有更好的办法?谢谢

s********k
发帖数: 6180
27
有,但是很小。我把采样值增大之后按道理这个shift可以忽略不计

【在 c******n 的大作中提到】
: Any time shift between input and output?
:
: flow1

d*****l
发帖数: 8441
28
到底是自相似还是相互之间相似?说的不清楚。
w****j
发帖数: 6262
29
求两个序列的差值,然后计算差值的variance。variance越小越说明相似。
这样可行么?我瞎说的。

【在 s********k 的大作中提到】
: 有,但是很小。我把采样值增大之后按道理这个shift可以忽略不计
1 (共1页)
进入Quant版参与讨论
相关主题
SV kalman filter parameter estimationGMARCH parameter estimation
有哪些continuous stochastic process具有autocorrelation?除了Rsquare外还有什么可以判断regression模型的么?
怎么用historical record来fit任意stochastic process?Is Implied Volatility a good measure of future stock price???
some interview problems请教Time Series上的几个问题
[合集] 请教怎样估算股票的mu -- 就是mean rate of return?Re: 大马甲,你是数学phd.有用shit桶炒股吗:))???? (转载)
[合集] 多元Garch模型如何预测covariance和correlation?recruiter发给我一道面试模拟题,请大家说说用什么方法?谢谢大家了
[合集] GARCH and ARCH,ARIMA (转载)问一个Time Series的概念问题 (转载)
请问:Time Series 中常用的Model 有那几个呀保险精算的Predictive Modeler和银行的Risk Quant哪个好些? (转载)
相关话题的讨论汇总
话题: 序列话题: granger话题: 相似话题: series话题: causality