如何确定股票价格数据的转折点 [英] how to identify turning points in stock price data

查看:306
本文介绍了如何确定股票价格数据的转折点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题是一个延续的这一个

我的目标是找到转折点的股票价格数据。

My goal is to find the turning points in stock price data.

到目前为止,我:

试图区分平滑价格集,博士的帮助安德鲁·伯内特汤普森使用该中心的五点法,作为解释这里

Tried differentiating the smoothed price set, with the help of Dr. Andrew Burnett-Thompson using the centered five-point method, as explained here.

我用刻度数据的EMA20平滑数据集。

I use the EMA20 of tick data for smoothing the data set.

有关图表我得到的一阶导数(DY / DX)上的每个点。 我创建第二个图表转折点。 每次DY / DX之间[-some_small_value]和[+ some_small_value] - 我补充一点,这个图表。

For each point on the chart I get the 1st derivative (dy/dx). I create a second chart for the turning points. Each time the dy/dx is between [-some_small_value] and [+some_small_value] - I add a point to this chart.

的问题是:   我没有得到真正的转折点,我得到的东西接近。   我得到过多或过少点 - depening上[some_small_value]

The problems are: I don't get the real turning points, I get something close. I get too much or too little points - depening on [some_small_value]

我尝试添加一个点的第二个方法时DY / DX由负转正,这也创造了太多了点,也许是因为我用打勾的数据EMA(而不是1分钟收盘价)

I tried a second method of adding a point when dy/dx turns from negative to positive, which also creates too many points, maybe because I use EMA of tick data (and not of 1 minute closing price)

一个第三种方法是将套入的n个点的切片的数据,并找到最小和最大点。这工作正常(不理想),但它的落后。

A third method is to divide the data set into slices of n points, and to find the minimum and maximum points. This works fine (not ideal), but it's lagging.

任何人有一个更好的方法?

Anyone has a better method?

我附上2张图片的输出(一阶导数和n个最小/最大)

I attached 2 pictures of the output (1st derivative and n points min/max)

推荐答案

您可以采取的二阶导数考虑在内,这意味着你应该额外(您的一阶导数)计算(Y_ {I-1} + Y_ {I + 1} - 2y_i)/(DX)2 。如果这是高于某个阈值你有一个最大值,如果是下面你有一个最小和其他可以丢弃它。这应该扔掉了很多分,您继续使用寻找极值的方法( Y'= 0 ),因为这种情况也适用于鞍点。

You could take the second derivative into account, meaning you should additionally (to your first derivative) evaluate (y_{i-1} + y_{i+1} - 2y_i) / (dx)². If this is above a certain threshold you have a maximum, if it is below you have a minimum and else you can discard it. This should throw out a lot of points that you keep using your method of finding extrema (y' = 0), because this condition is also valid for saddle points.

这篇关于如何确定股票价格数据的转折点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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