[SciPy-user] concave and convex function

mudit sharma mudit_19a at yahoo.com
Wed May 27 11:11:32 EDT 2009


M and W curves represents peak-trough-peak pattern, probably I should have used the later term. It's commonly used in finance to identify trend reversals. I could have used first and second derivative but it's doesn't give appropriate results when applied to noisy data. This can be avoided by identifying every peak and valley , then filtering out shallow peaks and valleys based on an arbitrary depth parameter.


----- Original Message ----
From: "josef.pktd at gmail.com" <josef.pktd at gmail.com>
To: SciPy Users List <scipy-user at scipy.org>
Sent: Wednesday, 27 May, 2009 15:27:25
Subject: Re: [SciPy-user] concave and convex function

On Wed, May 27, 2009 at 10:13 AM, mudit sharma <mudit_19a at yahoo.com> wrote:
>
> Thanks Robert.. I appreciate your response.
>
> I found the solution finally, which is, using Savitzky Golay filter for smoothing as it preserves the shape. Then using peak and trough points detection algorithm. Some useful links here:
> http://terpconnect.umd.edu/~toh/spectrum/PeakFindingandMeasurement.htm.. Unfortunately, all these matlab scripts so will have to write python equivalent.
>
> Mudit
>
>
>
> ----- Original Message ----
> From: Robert Kern <robert.kern at gmail.com>
> To: SciPy Users List <scipy-user at scipy.org>
> Sent: Monday, 18 May, 2009 23:20:24
> Subject: Re: [SciPy-user] concave and convex function
>
> On Mon, May 18, 2009 at 02:57, Sebastian Walter
> <sebastian.walter at gmail.com> wrote:
>> On Sun, May 17, 2009 at 3:50 PM, mudit sharma <mudit_19a at yahoo.com> wrote:
>>>
>>> Thanks for your response.
>>>
>>> By M & W curve I meant M & W shape curves( subset ) and by cycle I meant wave cycle.
>> Is that supposed to describe what is meant by M & W?
>
> Peak-trough-peak and trough-peak-trough patterns, respectively, like
> the shapes of the letters.
>
>> No offense, but
>> if you want help, you should
>> state your problem in a way that other ppl understand....
>
> His actual question is reasonably well-worded (he wants to classify
> the signal into convex and concave portions), but you got distracted
> by the irrelevant portion.
>
> --


I still don't see identifying peaks and troughs anywhere in the
initial question.
Identifying peaks and troughs is a question for zeros in the first
derivative; identifying convex and concave regions is a question for
zeros in the second derivative.

There is an entire "industry" trying to do this for the business cycle.

Josef
_______________________________________________
SciPy-user mailing list
SciPy-user at scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user



      




More information about the SciPy-User mailing list