Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Let's say I have a line graph with a $1-\text{minute}$ moving average as pictured below.

I would like to use a script find the $X'd$ positions on the line. The $X's$ represent beginnings of changes in momentum/direction.

Is there an algorithm or mathematical formula(s) to accomplish this? Perhaps a combination of standard deviation and slope?

enter image description here

share|improve this question
1  
Are you trying to make some money on the stock market? The "change in momentum" theoretically happens at the tops of the peaks and the bottoms of the valleys. This is where the slope of the graph is momentarily zero before changing direction. You will need to be a little bit more precise about what you want to find. –  orlandpm Jan 29 '13 at 21:21
    
Ahh..."momentarily zero"..."peaks"..."valleys"......that is helpful. Thank you. –  Chad Johnson Jan 29 '13 at 21:33
    
I think if you are looking to apply this idea in finance you will soon run into problems regarding the smoothness of the data –  user50407 Jan 29 '13 at 21:53
    
Maybe I can only focus on "major" changes or use a neural network for fuzziness. –  Chad Johnson Jan 29 '13 at 21:55
1  
Possibly, I don't know enough to say anything about that though. By the way, if you don't get a good answer here, it might be worth trying on quant.stackexchange.com. –  user50407 Jan 29 '13 at 22:01
show 1 more comment

1 Answer 1

It seems to me that you are looking for points with zero curvature.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.