如何在时间序列中找到顶部和底部? [英] How to find tops and bottoms in time series?

查看:25
本文介绍了如何在时间序列中找到顶部和底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

起初,这个问题听起来很愚蠢,但这不是根本问题.也许,它看起来似乎无法通过任何算法完全解决,但我假装是这样.

At first, this question can sound really stupid, but it is not in fundamental. Maybe, it can seem like unresolvable exactly by any algorithm, but I pretend to say it is.

所以问题.我有图表,例如黄金.我需要找到时间轴上的顶部和底部在哪里.问题是我需要找到主要好转和主要低迷的开始.问题是有很多不相关的小涨和跌.

So question. I have chart, for example gold. I need to find where are tops and bottoms on time axial. The problem is I need to find where major upturns and major downturns start. The problem is that there is lot of small irrelevant upturns and downturns.

这是为了更好地理解的图片 - 红点是我想要找到的(不完全是,但在某种程度上像这样).

Here is the picture for better understanding - the red spots are that I want to find(NOT EXACTLY, but in some way like this).

所以我可能需要过滤掉小的上调和下调,但不知道该怎么做.我会对任何想法感到高兴.我不需要java等中的算法,只要用文字就足够了.

So I probably need to filter out small turnups and turndowns, but have no idea how to do it. I will be pleased by any ideas. I do not need algorithm in java etc, just in words it would be enough.

推荐答案

  1. 您可以先执行平滑低通滤波操作,并从平滑后的数据中找到局部最小值/最大值的位置.然后从原始数据中得到最小值和最大值.

  1. You could perform a smoothing or lowpass filtering operation first, and find the locations of the local minima/maxima from the smoothed data. Then get the values of the minima and the maxima from the original data.

您可以使用正常的最大/最小过滤器,它会找到所有个转折点,然后按阈值过滤转折点列表.

You could use a normal maximum/minimum filter, which finds all turning points, then filter the list of turning points by threshold.

我认为您真正想要做的是从信号中删除长期变化",而只查看短期变化".这可以使用经验模式分解来完成.请参阅 我的论文的第 2.3.2 节.经验模态分解"、EMD"或Hilbert-Huang 变换".)

I think what you really want to do is remove the "long-term variation" from the signal and look only at the "short term variation". This is can be done using the empirical mode decomposition. See Sec 2.3.2 of my thesis. (Alernately, Google around for "Empirical Mode Decomposition", "EMD", or "Hilbert-Huang Transform".)

下面是 EMD 的实际应用:

Here's the EMD in action:

请注意,随着 EMD 算法从最详细"开始到最普遍趋势"结束,提取信号的分量时,通用性越来越高.(注意显然有九个组件 - 只显示了几个.)

Notice the increasing generality as the EMD algorithm extracts components of the signal, starting at "most detailed" and ending with "most general trend". (Note there are apparently nine components - only a few are shown.)

这篇关于如何在时间序列中找到顶部和底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆